-
-
Notifications
You must be signed in to change notification settings - Fork 804
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
fix: package version #2816
fix: package version #2816
Conversation
this is a hybrid approach. previously we used bumpversion to bump the version and then appended the commithash to the `--version` output. as of 0.3.1, we used setuptools-scm to append the commit hash. however, setuptools-scm did not have a way to create multiple versions -- one for our `--version` output, and one for PKG-INFO. this commit uses setuptools-scm to automate the global (ex. v0.3.2) version string calculation, while using an auxiliary file to keep track of the commit hash for `--version`.
Codecov Report
@@ Coverage Diff @@
## master #2816 +/- ##
==========================================
- Coverage 87.48% 87.46% -0.03%
==========================================
Files 94 94
Lines 9997 10001 +4
Branches 2478 2432 -46
==========================================
+ Hits 8746 8747 +1
- Misses 784 785 +1
- Partials 467 469 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there's not a way to do this with setuptools_scm
(add __commit__
to version.py
separately from __version__
) then this approach makes sense
there is not. see here https://github.com/pypa/setuptools_scm/blob/ca3855ba66fa4cb100f5039eea909932f815a4a4/src/setuptools_scm/__init__.py#L34-L43 -- there is no way to get anything besides the package version string into |
even though we don't generate them anymore, they sometimes get generated when building old releases locally
this is a hybrid approach. previously we used bumpversion to bump the
version and then appended the commithash to the
--version
output. asof 0.3.1, we used setuptools-scm to append the commit hash. however,
setuptools-scm did not have a way to create multiple versions -- one for
our
--version
output, and one for PKG-INFO.this commit uses setuptools-scm to automate the global (ex. v0.3.2)
version string calculation, while using an auxiliary file to keep track
of the commit hash for
--version
.What I did
How I did it
How to verify it
Commit message
Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)
Description for the changelog
Cute Animal Picture