What does HackerNews think of pint?
Operate and manipulate physical quantities in Python
My business is thermodynamics of power plants. Professionals in the industry tend to use convenient units like C, bars, kJ/kg and so on. But the formulas usualy need basic SI units. Using this library not only streamlines the conversion process but also keeps track of the unit itself. So instead of variable turbine_output_gj and turbine_output_mw I can have just turbine_output which is convenient.
It is hard to put a value on that but I believe it has already spared me many trivial mistakes that I had to explain to my clients.
The https://numpy.org/ pyolite (WASM) IPython demo has SymPy installed in the env but not Pint?
[1] - https://docs.astropy.org/en/stable/units/index.html
The file-based approach to defining data is a good way to go I reckon - it's simple and easy to update (especially with source control). You can always upgrade to something more sophisticated in future.
How complete/challenging does the unit conversion component feel, out of interest? (I'm reading through `conversion.ts` in the codebase at the moment)
By chance I'm working on some ingredient unit conversion code too - I'd be happy to learn from & share experiences. FWIW the tools I'm exploring are Pint[0] and convert-units[1].
This can easily run local. If you prefer online repl, it's available on repl.it [1]. There you can keep your scripts in the cloud for later, with rudimentary versioning.