Repository navigation
Structure_Engine: Extend IsValid for ICase - #3643
Conversation
IsValid(ICase) now also checks a LoadCombination: at least one case, no null cases, finite factors, no case or number repeated, and that it does not contain itself directly or through nested combinations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copies of a combination share its number, and packages identify cases by number, so a combination factoring a copy of itself is now caught. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@BHoMBot check required |
|
@Chrisshort92 to confirm, the following actions are now queued:
|
|
@BHoMBot check copyright-compliance |
|
@Chrisshort92 to confirm, the following actions are now queued:
|
|
@BHoMBot check dataset-compliance |
|
@Chrisshort92 to confirm, the following actions are now queued:
|
|
@BHoMBot check unit-tests |
|
@Chrisshort92 to confirm, the following actions are now queued:
|
IsakNaslundBh
left a comment
There was a problem hiding this comment.
Generally looks good!
Have added a few comments however. Please see below.
The factor check no longer sits in an else after the null check, so every problem with a factored case is recorded. A null case is named as such in the factor message instead of reading its number. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@BHoMBot check code compliance |
|
@Chrisshort92 sorry, I didn't understand. |
|
@BHoMBot check code-compliance |
|
@Chrisshort92 to confirm, the following actions are now queued:
There are 22 requests in the queue ahead of you. |
|
@BHoMBot check required |
|
@Chrisshort92 to confirm, the following actions are now queued:
There are 16 requests in the queue ahead of you. |
|
The check |
|
@BHoMBot check required |
|
@Chrisshort92 to confirm, the following actions are now queued:
There are 17 requests in the queue ahead of you. |
Shorten the method and test descriptions, and move implementation detail into short inline comments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@BHoMBot check required |
|
@Chrisshort92 to confirm, the following actions are now queued:
There are 6 requests in the queue ahead of you. |
|
@BHoMBot check copyright-compliance |
|
@Chrisshort92 to confirm, the following actions are now queued:
|
|
@BHoMBot check dataset-compliance |
|
@Chrisshort92 to confirm, the following actions are now queued:
|
|
@BHoMBot check unit-tests |
|
@Chrisshort92 to confirm, the following actions are now queued:
|
|
@BHoMBot check null-handling |
|
@Chrisshort92 to confirm, the following actions are now queued:
|
IsakNaslundBh
left a comment
There was a problem hiding this comment.
Happy with this now. All looks good, and have tested it though.
Happy to approve!
|
@BHoMBot check ready-to-merge |
|
@IsakNaslundBh to confirm, the following actions are now queued:
|
|
@BHoMBot check ready-to-merge |
|
@Chrisshort92 to confirm, the following actions are now queued:
|
Issues addressed by this PR
Closes #3642
IsValidon a LoadCombination now also checks what it contains, following on from #3635:IsValid)A new public
ContainsItselfmethod does the self-containment check, so it can also be used on its own.Test files
https://burohappold.sharepoint.com/:f:/r/sites/BHoM/02_Current/12_Scripts/02_Pull%20Request/BHoM/BHoM_Engine/Structure_Engine/%233643-Extend-IsValid-for-ICase?d=w01eeab4bbeca476581852e306991e835&csf=1&web=1&e=N2vvcG
Unit tests for
ContainsItselfare added inStructure_Engine_Tests.Changelog
Added
Query.ContainsItself(this LoadCombination)in Structure_EngineChanged
Query.IsValid(this ICase)in Structure_Engine: also checks a LoadCombination's cases and factorsQuery.IsValid(this ICase)in Structure_Engine: new optional hiddenmessageinput, added to the end of every errorAdditional comments
messageinput, asIsValid(ICase)was added in Structure_Engine: Add IsValid LoadCase and LoadCombination #3635 this milestone.Number, or by reference if they have no positive number.