-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Use packages to extract version information #258
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #258 +/- ##
=======================================
Coverage 96.33% 96.33%
=======================================
Files 15 15
Lines 1909 1911 +2
=======================================
+ Hits 1839 1841 +2
Misses 70 70 ☔ View full report in Codecov by Sentry. |
@jagerber48 What problem does this solve? If this is desirable, you would probably want to take out the creation of It's sort of exhausting trying to keep up. I am going to have to take a break from this project and will not be able to participate in discussions, reviews, or development of |
I also don't have much time for the next couple of weeks still. I wanted to note though that Also, I think we agreed that we would only support Python 3.8+, but I just want to note that this might be the first change that actually breaks Python 3.7 (since |
the "single source of the version" should be the git tag. I totally agree with @newville there is nothing gained from this, it just unnecessarily add random dependencies. |
Ok, pretty negative response to this one. I'll just go ahead and close it. Thanks for the responses nonetheless. For what it's worth, I'll give my responses to say my peace. First off, I had my bout of about a month or two when I wasn't able to keep up here and a lot seemed to have happened. I'm still catching up on things. Sincere apologies for rehashing anything. @newville I think the move to using That said, using the @wshanks that would be interesting if this is the first change to break @reneeotten Yes, I agree git tag should be the single source. This PR still has git tag as the single source. I argue it holds better to the "single source" spirit than the current version of the code because it writes the version information to one less place. As far as I can tell, the current version of code writes the version number to go |
Closes # (insert issue number)
Executed
pre-commit run --all-files
with no errorsThe change is fully covered by automated unit tests
Documented in docs/ as appropriate
Added an entry to the CHANGES file
Use
importlib.metadata
to extract__version__
andpackaging.version
to extract__version_info__
tuple. In my opinion, this is an improvement over importing from the dynamically generatedversion.py
.The goal here is to "single source" the version number. In this configuration with
setuptools_scm
the single source is the git tag. Package metadata is populated at build time and version information is extracted from there.