alan-turing-institute / python-project-template

15 stars 3 forks source link

update versioning to rely on pyproject.toml #26

Closed phinate closed 7 months ago

phinate commented 8 months ago

This changes the dynamic versioning scheme, which relied on __version__ being defined in pyproject.toml, in favor of a static scheme that only looks in pyproject.toml, using importlib.metadata.version(__name__) to define __version__ instead. Picks up the right version on the setuptools backend when tested locally.

Thanks for the idea @jack89roberts!

phinate commented 7 months ago

LGTM (at least the versioning bit, I've not looked at the pre-commit CI stuff)

Thanks! And yes, the CI is a work-in-progress, trying to touch it up in the PR :)

phinate commented 7 months ago

Test work, and are failing for the right reasons. Will fix in follow-up PR.