Repository navigation
Derive __version__ from package metadata - #799
Merged
milton-minervino merged 2 commits intoOct 9, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #799 +/- ##
===========================================
+ Coverage 80.13% 80.14% +0.01%
===========================================
Files 59 59
Lines 7406 7410 +4
Branches 1557 1557
===========================================
+ Hits 5935 5939 +4
Misses 902 902
Partials 569 569
🚀 New features to boost your workflow:
|
guillaume-vignal
approved these changes
Oct 9, 2026
milton-minervino
force-pushed
the
fix/version-metadata
branch
from
October 9, 2026 13:25
415c03f to
6a73182
Compare
milton-minervino
force-pushed
the
fix/version-metadata
branch
from
October 9, 2026 13:31
6a73182 to
ca0e498
Compare
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.
pyproject.tomlnow uses setuptools-scm for dynamic versioning, butshapash/__version__.pystill hard-codedVERSION = (2, 9, 0). As a result,shapash.__version__stayed at2.9.0whatever version was actually built and published.Changes
shapash/__version__.py: read the version withimportlib.metadata.version("shapash"), so it always matches the version setuptools-scm puts on the wheel. When the package isn't installed (running from a source tree), it falls back to"0+unknown".tests/unit_tests/utils/test_load_smartpredictor.py: the major/minor version-mismatch tests now patchshapash_versionto a fixed value instead of reading the installed version, so they behave the same whether or not shapash is installed.test_version.pyto cover the file.Impact
shapash_version) and its load-time compatibility check now use the real version instead of the stale2.9.0.python -c "import shapash; print(shapash.__version__)") now prints the version that was actually released."0+unknown"fallback can't be parsed as a version, so in an uninstalled tree the compatibility check is skipped. A fallback like"0.0.0"would have raised a false "Major version mismatch" error there.