It is pretty common wanting to access/log a package/app version.
I wonder if (optionally?) adding:
from importlib.metadata import version
__version__ = version("km3aim")
to the __init__.py file could be a welcome improvement.
On a side note: when using poetry I had the problem that if the pyproject.toml was updated without running poetry install, importlib would not be able to pick up the change so I had to parse pyproject.toml. With uv this should no longer be a problem.
It is pretty common wanting to access/log a package/app version.
I wonder if (optionally?) adding:
to the
__init__.pyfile could be a welcome improvement.On a side note: when using
poetryI had the problem that if thepyproject.tomlwas updated without runningpoetry install,importlibwould not be able to pick up the change so I had to parsepyproject.toml. Withuvthis should no longer be a problem.