Allow custom units to be registered with Pint

This commit is contained in:
Russ Garrett 2018-04-14 12:27:06 +01:00
commit 3c985ec271
No known key found for this signature in database
GPG key ID: 68880BB652AB0570
2 changed files with 15 additions and 1 deletions

View file

@ -79,7 +79,14 @@ Column units are configured in the metadata like so::
}
Units are interpreted using Pint_, and you can see the full list of available units in
Pint's `unit registry`_.
Pint's `unit registry`_. You can also add custom units to the metadata, which will be
registered with Pint::
{
"custom_units": [
"decibel = [] = dB"
]
}
.. _Pint: https://pint.readthedocs.io/
.. _unit registry: https://github.com/hgrecco/pint/blob/master/pint/default_en.txt