-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add Pint integration for unit conversions #273
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
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #273 +/- ##
===========================================
- Coverage 100.00% 98.67% -1.33%
===========================================
Files 6 7 +1
Lines 278 301 +23
===========================================
+ Hits 278 297 +19
- Misses 0 4 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Many thanks 👍! I will review this properly tomorrow. |
eduardo-rodrigues
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.
This looks great. Many thanks.
I added a couple of examples of usage.
It will be useful to update the README with a subsection on "Conversions to/from Pint" (or alike) at the bottom so that people realise this new functionality exists. See if you have a nice example to add or else we follow it up in a new PR.
Co-authored-by: Eduardo Rodrigues <[email protected]>
|
Ok I added a section to the README |
|
I already made a release, https://github.com/scikit-hep/hepunits/releases/tag/v2.4.0, in case you have use cases already for your work. |
|
Thanks, I likely will be using it! |
https://build.opensuse.org/request/show/1310617 by user dirkmueller + dimstar_suse - update to 2.4.2: * Add more subunits and unit aliases - update to 2.4.1: * Add new SI prefixes from 2022 * fix: Use the correct unit registry in pint - update to 2.4.0: * Introduced integration with the `Pint` package for unit conversions (scikit-hep/hepunits#273) - update to 2.3.6: * Several new units (notably for electromagnetism) added. - update to 2.3.5: * Added support for 3.13. - update to 2.3.4: * Dropped support for Python 3.7 and added support for 3.12.
Closes #262
Example usage:
resulting in