-
Notifications
You must be signed in to change notification settings - Fork 1
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
Units #10
Conversation
Closes #6 |
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.
Hi @siligam, great PR! Just a few suggestions :)
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 think this is a good start but it still needs some work, in particular some of the key logic for integration into the rest of the toolchain is not yet there.
Co-authored-by: Paul Gierz <[email protected]>
Co-authored-by: Paul Gierz <[email protected]>
Co-authored-by: Miguel <[email protected]>
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.
It's getting there, keep up the good work :-)
I still have a design point, one major, and a few minor comments. The major missing part still has not yet been addressed, namely a function to hook into the pipeline. See the in-line comments for some minor revision recommendations in addition to the checklist below.
Design
- I am not sure about the chemistry units still. The unit is mol or gram. mmol is still mole, prefixed by milli, and
pint
should be able to handle prefixes. A mole of carbon is still a mole, it just happens to be of the element carbon, (just like a kilogram of flour is a kilogram, or sugar, or butter, or whatever you want to use to bake cookies with)
Major Suggestion
- Missing a key function to tie together all the logic
General Minor Suggestions
-
f-strings
everywhere for consistency - Make sure all
print
statements arelogger
statements. It's up to you to think about what level they can have.
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.
Excellent work @siligam! I only have one more small thing that you should look at, just to be sure: The metadata attribute name on units
should be plural (it already is), but I am not 100% sure so I'd like to double check.
You can also add a call to handle_unit_conversion
to the generic pipeline. We can have a brief meeting so I can show you where to do that! Once that is in place, we can merge this into the main branch 🙂
Co-authored-by: Paul Gierz <[email protected]>
Co-authored-by: Paul Gierz <[email protected]>
I checked that
Sure we can discuss this in a brief meeting. |
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.
Looks good, we can merge this!
addressing issue #6
Just implemented the bare logic to handle unit conversion. No API design yet.
Features:
Normalisation of non-standard notation of units in netcdf4 so pint can read them.
added unit definitions which are not available in pint library.