-
Notifications
You must be signed in to change notification settings - Fork 27
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
Support "x_unit": unit conversions, ranges and validation #2894
Support "x_unit": unit conversions, ranges and validation #2894
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2894 +/- ##
========================================
+ Coverage 73.1% 79.3% +6.2%
========================================
Files 551 671 +120
Lines 23736 27613 +3877
Branches 2626 3223 +597
========================================
+ Hits 17365 21923 +4558
+ Misses 5702 4941 -761
- Partials 669 749 +80
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
I assume that this PR will only introduce units for single-type values i.e. not objects or lists (that comes in another PR?).
packages/models-library/src/models_library/function_service/demo_units.py
Show resolved
Hide resolved
packages/models-library/src/models_library/function_service/demo_units.py
Outdated
Show resolved
Hide resolved
services/director/src/simcore_service_director/api/v0/schemas/project-v0.0.1.json
Show resolved
Hide resolved
packages/models-library/src/models_library/function_service/demo_units.py
Outdated
Show resolved
Hide resolved
Exactly, since the input values do not support objects, I didn't see the point on supporting them in the units. Let's discuss it offline. |
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.
pair reviewed, great!
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.
Fine with me, nothing to add.
very nice!! |
…mcore into feature/x-unit-to-gui
What do these changes do?
BackEnd:
inputsUnits
added to project schema and model:project:workbench:{nodeId}:inputsUnits
FrontEnd:
x_unit
in inputs field (updateble): short label (µs, km) in field and long label (microsecond, kilometer) in tooltipx_unit
in outputs field (non updatable): short label (µs, km) in field and long label (microsecond, kilometer) in tooltipinputsUnits
inputsUnits
minimum
/maximum
value for an input field, they are validated in the frontend.Inputs from Demo Units service more:
Related issue/s
Related to ITISFoundation/osparc-issues#515
How to test
Checklist