pint
pint copied to clipboard
Supporting multiple CODATA versions (variants)
Would it make sense to enable Pint to have different table for different requests.
I.e. one could wish to benchmark stuff using CODATA 2014 and 2018 and 2022 against each other. Currently it seems that units are fixed and needs new releases when data is updated.
It would be useful for backwards compatibility of dependent libraries to be able to selectively choose a variant.
You may create and use your own registry files and load them via pint.UnitRegistry(filename='myreg')
. Is that maybe good enough?
see also https://pint.readthedocs.io/en/stable/tutorial.html?highlight=registry#using-pint-in-your-projects
I think it is in general a good idea to derive a smaller domain-adjusted registry and use that instead of the big default one.
Agreed about the work-around.
However, the idea here is to have a backward-compatible data-shipped. I think this could be nice. Of course one shouldn't polute the repo with lots of different variants, only some acknowledged set of variants.