Repository navigation
fix(ids): don't crash on properties without data; match any value of list, bounded, enumerated and table properties - #828
Merged
Conversation
…list, bounded, enumerated and table properties
Merged
5 of 8 tasks
Contributor
Author
|
A note for merging this together with #822: #822 gives |
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.
Fixes #827.
IDSProperty: everyName/_categoryread is guarded, so a property the importer didn't write (a stub item without data) counts as missing instead of throwing.getValueKeyis replaced bygetValueAttrs/getValues, which collect every value attribute of a property (NominalValue,ListValues,LowerBoundValue/UpperBoundValue/SetPointValue,EnumerationValues,DefiningValues/DefinedValues, quantity values).evalValuepasses when any value matches (keeping the numeric-to-string alignment from IDS wrong auto conversion #731), andevalDataTypewhen any value's type matches. Each records one check throughaddCheckResult.This touches
Property.tslike #822 (cardinality); whichever lands second needs a rebase.Test
New fixture
tests/fixtures/property-values.ifc(written for this test: one wall, one property set with a list, a bounded, an enumerated and a table property, in metres) andfacets/property-values.test.ts:importer.classes.abstract.add(...)), a value matches when any of the property's values matches (list, lower / upper / set point, enumerated values but not the rest of the enumeration, defining and defined values), anddataTypeis checked.Results:
packages/corevitest run60 of 60. Lint onProperty.tsreports the same 4 pre-existing formatting errors as main.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following:
feat(examples): add hello-world example).fixes #123).