Skip to content
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

Improve handling of units #154

Open
jesper-friis opened this issue Nov 14, 2023 · 0 comments
Open

Improve handling of units #154

jesper-friis opened this issue Nov 14, 2023 · 0 comments

Comments

@jesper-friis
Copy link
Contributor

Consider to add a thin abstraction layer around pint to make it easier to replace it later with another unit package. It could be a new module called tripper.mappings.units. This module could define two classes

  • UnitRegistry - wrapper around pint.UnitRegistry
  • Quantity - wrapper around pint.Quantity

As suggested by @sygout, an additional benefit with this is that it would allow for not calling pint if the source and destination units are the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant