-
Notifications
You must be signed in to change notification settings - Fork 21
PJS001 conversion based units (IVS-680) #471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
(IVS-680)
aothms
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice, but have a look at the two scenario suggestions. I think the schema still allows for some situations we need to check.
| if 'npath' in inspect.getargs(fn.__code__).args: | ||
| kwargs = kwargs | {'npath': current_path} | ||
| top_level_index = current_path[0] if current_path else None | ||
| max_index = len(current_path) - 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠
This is exactly related to my comment on #468
We should not be doing this, because in this way we're linking the wrong instance to the outcome presentation. We just really should make sure that the stack of values we build forms a proper tree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something needs to be done because this feature file generates an IndexError as-is. The code tries to access element at index 1 when there is a single value in the list. I'll review your comment for clues. Maybe the Given statement needs to be revised.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, the IndexError makes sense in #468 based on the Given statement. I'm working through that now & will use lessons learned to resolve this PR.
Co-authored-by: Thomas Krijnen <t.krijnen@gmail.com>
Co-authored-by: Thomas Krijnen <t.krijnen@gmail.com>
Co-authored-by: Thomas Krijnen <t.krijnen@gmail.com>
…units' into IVS-680-PJS001-conversion-based-units
(IVS-680)
(IVS-680)
(IVS-680)
…erkin-rules into IVS-680-PJS001-conversion-based-units
| case "CONVERSIONFACTOR": | ||
| unit_name = inst.Name | ||
| if unit_name in accepted_names: | ||
| inst_factor = inst.ConversionFactor.ValueComponent.wrappedValue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, one more scenario for a next iteration
We could also check the corresponding measure type of the IfcValue-typed ValueComponent of IfcMeasureWithUnit here. Not sure if this is written constrained somewhere, sometimes you see IFCRATIOMEASURE sometimes you see the measure that corresponds to the Unit, such as IFCTIMEMEASURE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it - I grabbed a link to this comment for future reference.
Co-authored-by: Thomas Krijnen <t.krijnen@gmail.com>
Co-authored-by: Thomas Krijnen <t.krijnen@gmail.com>
closes #107