Repository navigation
fix(ci): the same-project bodies check reads a property set that holds an enumerated or list value (#1524) - #1590
Merged
Conversation
…s an enumerated or list value (#1524) properties() read prop.NominalValue on every property of every product it compares. An IfcPropertyEnumeratedValue, such as a duct's Pset_DuctSegmentTypeCommon.Shape, has no NominalValue, so ifcopenshell raised AttributeError, the scorer wrote a traceback instead of its result and the same-project gates failed for every rme_advanced and rme_basic save of 2025 to 2027 once an export typed their ducts. Measure run 42585494298 on #1524 is the instance: six samples red, the other 9 passing. A property with no NominalValue is now skipped, as one whose NominalValue is None already was. placement_source reads the same way.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tools/re/bodies_across_saves.pyskips a property that holds no single value instead of raising on it, so the same-project gate can judge an export in which a product carries an enumerated or list property.Motivation
Measure run 42585494298 on #1524 failed
Same-project gatesfor the sixrme_advancedandrme_basicsaves of 2025, 2026 and 2027. Each one'sbodies_across_saves.txtholds a traceback in place of its result:AttributeError: entity instance of type 'IFC4.IfcPropertyEnumeratedValue' has no attribute 'NominalValue', fromproperties. The other nine samples (rac_advanced,rac_basic,rst_basic, each of 2025 to 2027) passed.#1524 types the 724 and 728 ducts of those samples, and a typed duct carries
Pset_DuctSegmentTypeCommon.Shape, which the writer emits as anIfcPropertyEnumeratedValue(#686).propertiesreadprop.NominalValueon every property of every product it compares, and an enumerated or list value has none. No export the check had read held one before: the same six saves passed in run 42583038481 on #1587's head, whose exports type no duct there.Changes
tools/re/bodies_across_saves.py:propertiesreadsNominalValuewithgetattr(prop, "NominalValue", None)and skips a property without one, as it already skipped one whoseNominalValueisNone.placement_sourcereads it the same way (it tested the property's name first, so it was not reached for a Shape, but it had the same pattern).Testing
Unit tests: N/A. The check is the scorer run on the exports that tripped it.
keep_ifcrun 42585486357 of feat(ifc)!: ducts take their type, section, line and ports from their own record on Revit 2015 to 2027, and ports their SystemType (#1190) (RE-371) #1524's head, through this branch's scorer with each save held to the 2024 and 2025 saves as Measure holds it: all six printbodies across saves: PASSand exit 0, with their ports, cut openings, door and window sizes, properties and census lines compared against the 2025 save (for examplerme_advanced2026: ports 7,276 of 7,276 the same, properties 5,158 equal and none different, census 6,605 bodies the same). The same scorer frommainraises theAttributeErroron all six, as the run's own files show.same-project gatesverdict is the check on that pull request.Audit-honesty checklist
Legal and contribution hygiene
Breaking changes
None.