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

Added automatic generation of the __version__ attribute. #295

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smarie
Copy link

@smarie smarie commented Apr 12, 2021

Fixes #253

  • setuptools_scm was added as a setup dependency and ci dependency
  • use_scm_version (from setuptools_scm) is used instead of version to always generate the right version number based on git.
  • in addition, write_to is used in use_scm_version so that a _version.py file is automatically created when building the wheel.
  • Finally the __init__.py contains code supporting the two cases: either the _version.py file is present and it should be read, or it is not present and setuptools_scm is used programmatically to generate the version based on git information

.gitignore was modified so that the _version.py file cannot be added by mistake.

All these best practices come from https://smarie.github.io/python-getversion/#package-versioning-best-practices

@coveralls
Copy link

coveralls commented Apr 12, 2021

Pull Request Test Coverage Report for Build 1951

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 95.463%

Totals Coverage Status
Change from base Build 1889: 0.005%
Covered Lines: 4902
Relevant Lines: 5135

💛 - Coveralls

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.

pyod does not have a __version__
2 participants