-
Notifications
You must be signed in to change notification settings - Fork 134
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
Fix/issue 609 #616
Fix/issue 609 #616
Conversation
units = _find_units_in_dependent_variables(variable_value, full_variables) | ||
|
||
if loc: | ||
loc_units = loc.span()[0] | ||
extract_units = variable_value[loc_units:] | ||
if unit_system(extract_units): |
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.
@maxcapodi78 This unit_system()
method is using the dictionary AEDT_UNITS
. This dictionary does not contain units such as area m², volume m^3. Consequently it was not working for "3.123456m2" as described in issue #609.
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. Do you think we should add it or your fix handles all conditions?
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.
Great job. Thanks also for detailed UT
Fix the issue #609 .
The variable decomposition was not working for units including both letters and digits such as 'm2'.
With the new modification we get the index of the first letter in the
variable
string and then we split it to get the unit and the value.