Open
Conversation
One downside of the VCS-based versioning is that when the project is installed in editable mode, the version encoded in the package metadata will remain the one from installation time and get stale. There was some additional code in MuData that attempted to address this, but I believe it does more harm than good: * while it would have updated __version__ (which is a convention, but not a standard), the standard way to retrieve the version via importlib.metadata would still have returned the version number * It goes hunting for the version number at import time and things can go wrong while doing so. In fact, building the conda recipe for scirpy fails on CI exactly because some dependency for getting the version at runtime is missing (https://github.com/scverse/scirpy/actions/runs/21799752388/job/62893203310?pr=672) or it might fail because one has a shallow clone without git history etc. With this PR, I propose to get rid of all the additional version handling and be more aligned with the cookiecutter template. Risking stale metadata in editable mode is a trade-off that we conciously took in the template, because the consequences are low-impact and only affect developers.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #119 +/- ##
==========================================
- Coverage 68.57% 68.50% -0.08%
==========================================
Files 12 11 -1
Lines 1906 1889 -17
==========================================
- Hits 1307 1294 -13
+ Misses 599 595 -4
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One downside of the VCS-based versioning is that when the project
is installed in editable mode, the version encoded in the package
metadata will remain the one from installation time and get stale.
There was some additional code in MuData that attempted to address this,
but I believe it does more harm than good:
__version__(which is a convention, butnot a standard), the standard way to retrieve the version via
importlib.metadata would still have returned the version number
things can go wrong while doing so. In fact, building the conda
recipe for scirpy fails on CI exactly because some dependency for
getting the version at runtime is missing
(https://github.com/scverse/scirpy/actions/runs/21799752388/job/62893203310?pr=672)
or it might fail because one has a shallow clone without git history
etc.
With this PR, I propose to get rid of all the additional version
handling and be more aligned with the cookiecutter template. Risking
stale metadata in editable mode is a trade-off that we conciously took
in the template, because the consequences are low-impact and only affect
developers.