Closed AdamRJensen closed 8 months ago
Thanks!
On purpose the version number is kept in the metadata file, e.g. pyproject.toml. In there the dummy value of 0.0.0 is automatically updated when a new wheel is created. The value to reverted back to 0.0.0. The version however shows up correctly in the metadata of PyPI wheel being generated: https://pypi.org/project/openterrace/#files
I found some additional information on the topic here: https://stackoverflow.com/questions/72167802/adding-version-attribute-to-python-module
While some people actually advise not to add a version attribute, I still see its relevance. I'll look into how to automatically update a _version.py file using dynamic versioning provided by Poetry.
The version number can be retrieved from metadata by:
from importlib import metadata
metadata.metadata('openterrace')['version']
The version number can be retrieved from metadata by:
from importlib import metadata
metadata.metadata('openterrace')['version']
This doesn't seem like an ideal solution. I still think I would prefer being able to do .__version__
The __version__
attribute has now been added from v0.0.11 onwards.
Closing this one.
Addressed in #132
It's fairly standard for python packages to support returning the pacake version by the command
.__version__
. This currently isn't supported by the package.