Justus Magin
Justus Magin
> why not having a clearer distinction between the data sections and the tree node headers in the repr? my knowledge of HTML and CSS is pretty limited, so I...
the fixed width is a hack, as I had no idea how to fix it otherwise. I'm not sure how exactly `min-width` works (my guess is that the content should...
that particular issue has been fixed in recent versions of [`setuptools-scm`](https://github.com/pypa/setuptools_scm#git-archives), but still requires additional configuration
you can [yank](https://peps.python.org/pep-0592/) a release on PyPI, such that installers avoid installing it but someone who pinned their environment to exactly that version can still install it. For future debug...
I think it might be easier to do the split into unit / magnitude formatters earlier: ```python mspec, uspec = split_quantity_format(spec) ``` then `uspec` can be modified without affecting `mspec`....
upon further consideration, it might be a good idea to rethink our string formatting mini-language: at the moment, we allow to freely mix magnitude, unit, and quantity formatters, but inevitably...
just for reference, there's a experimentation repo for custom dtypes here: https://github.com/seberg/unitdtype/
the issue is that `pint.get_application_registry()` returns the global `ApplicationRegistry` object, so your isolation mechanism doesn't work. Try this instead: ```python @pytest.fixture def custom_ureg_global(): ureg = pint.UnitRegistry() ureg.define("test_unit = 123 kg")...
Right, it might probably make sense to convert `pint.set_application_registry` to a `contextmanager`. With that, you would be able to shorten your fixture to: ```python @pytest.fixture def custom_ureg_global(): ureg = pint.UnitRegistry()...
I might be wrong, but I think you're looking for [`Quantity.to_compact()`](https://pint.readthedocs.io/en/latest/tutorial.html#simplifying-units) (see also the [reference](https://pint.readthedocs.io/en/latest/developers_reference.html#pint.Quantity.to_compact)) and the [`#` quantity modifier](https://pint.readthedocs.io/en/latest/formatting.html#modifiers).