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

Add __version__ #47

Closed
wants to merge 1 commit into from
Closed

Add __version__ #47

wants to merge 1 commit into from

Conversation

ekiefl
Copy link
Contributor

@ekiefl ekiefl commented Jul 17, 2024

I just updated my arcadia-pycolor version but besides checking my lock file I had no good way to confirm I was importing the correct version.

It is standard to put a package's version in the top-level __init__.py under the variable __version__:

>>> import importlib
>>> importlib.import_module("numpy").__version__
'1.26.4'
>>> importlib.import_module("pandas").__version__
'2.2.2'
>>> importlib.import_module("biotite").__version__
'0.40.0'
>>> importlib.import_module("dask").__version__
'2024.6.2'
>>> importlib.import_module("arcadia_pycolor").__version__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'arcadia_pycolor' has no attribute '__version__'

This PR adds __version__. Since we are now between 0.5.1 and 0.5.2, I've appended a pre-release identifier -dev. We could start doing -dev.X, -rc.X, -alpha.X, -beta.X, etc, but IMO this package doesn't require anything more complex than -dev.

@ekiefl ekiefl requested a review from keithchev July 17, 2024 21:40
@keithchev
Copy link
Member

Oops, yes, totally. This is my bad. I think the best way to do this is probably to use dynamic versioning, so that we can create new a release simply by creating a new tag on Github. This will avoids the need to hard-code the version anywhere.

@keithchev
Copy link
Member

Update: I've added dynamic versioning in #48.

@ekiefl
Copy link
Contributor Author

ekiefl commented Jul 18, 2024

Superseded by #48

@ekiefl ekiefl closed this Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants