Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved single source of truth for versioning #2229

Open
1 task done
ppfeister opened this issue Jul 17, 2024 · 2 comments
Open
1 task done

Improved single source of truth for versioning #2229

ppfeister opened this issue Jul 17, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@ppfeister
Copy link
Member

Description

Current SSOT is .__version__ defined in __init__.py. This makes packaging locally less than ideal as the default version will always be zero.

We threw this together after realizing that no poetry plugins supported it -- but it really doesn't need poetry

It's suggested that we make the pyproject the SSOT and update __init__ to use the metadata submodule of importlib. Package is build with the version number from pyproj, and when processed by sherlock, it's pulled at runtime from whatever the created bin/entry is (in theory)

from importlib.metadata import version
__version__ = version('sherlock')

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ppfeister ppfeister added the enhancement New feature or request label Jul 17, 2024
@sdushantha
Copy link
Member

I support this suggestion for having SSOT

@ppfeister
Copy link
Member Author

Note for later:

Make sure to validate against Windows, since Windows doesn't use standard binaries or entry points

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants