Repository navigation
Derive __version__ from the metadata, and gate it - #8
Merged
Merged
Conversation
dcio 0.1.1 was published with pyproject.toml saying 0.1.1 and dcio/__init__.py still saying 0.1.0, so `pip install "dcio>=0.1.1"` succeeds and `dcio.__version__` then reports 0.1.0. My error, in the release that lowered the Python floor: I bumped one of the two places. Rather than bump the other, __version__ now comes from the installed package metadata, so there is one place for it to be wrong and pyproject.toml is that place. A source tree that was never installed reports 0.0.0+unknown rather than lying. SCALCS has a versions-agree gate for exactly this and dcio had none. It gets two: the tag must match the version it claims to publish, which SCALCS and HJCFIT both check and dcio did not; and the built wheel, installed into a clean environment, must report the version pyproject declares. The second is the one that would have caught this, because it asserts against the artifact rather than against the source tree. 0.1.1 cannot be replaced, so this is 0.1.2. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
remislp
added a commit
to DCPROGS/HJCFIT
that referenced
this pull request
Sep 11, 2026
The fitting layer goes here, and mechanisms, rate constants and constraints
stay in SCALCS, so HJCFIT needs SCALCS to handle a mechanism. That is a
dependency it has never had, and making it a hard one would cost something
worth keeping: the likelihood needs numpy and scipy and nothing else, and a
test asserts that importing HJCFIT leaves dcio and scalcs out of sys.modules.
Someone who wants Log10Likelihood on a Q matrix they already have should not
acquire a mechanism library and a plotting stack to get it.
pip install hjcfit the likelihood
pip install hjcfit[fitting] records, mechanisms, fits, displays
dcio for records, scalcs for mechanisms and theoretical curves, matplotlib for
the displays. All three resolve from PyPI; verified in a clean virtualenv.
dcio is pinned at >=0.1.2 rather than >=0.1.1 because 0.1.1 reports the wrong
__version__ (DCPROGS/dcio#8).
EKDIST is deliberately not an extra. Exponential mixtures and t_crit
estimation belong to the displays that want them, but EKDIST is not on PyPI,
and declaring it would make pip install hjcfit[...] fail outright rather than
install what it can -- which is exactly how EKDIST's own dcio dependency
behaved until dcio was published.
This is metadata only; no import changes. What actually goes in the fitting
layer follows.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.
dcio 0.1.1 is published with
dcio.__version__reading0.1.0. My error,in the release that lowered the Python floor:
pyproject.tomlanddcio/__init__.pyboth carried the version and I bumped one.So
pip install "dcio>=0.1.1"succeeds and thendcio.__version__says0.1.0. I found it while verifying HJCFIT's new[fitting]extra, which pinsdcio>=0.1.1.Fixed at the source, not by bumping the other copy
__version__now comes from the installed package metadata, so there is oneplace for the version to be wrong and
pyproject.tomlis that place. A sourcetree that was never installed reports
0.0.0+unknownrather than a stalenumber.
Two gates, because SCALCS had one and dcio had none
did not;
declared version — this is the one that would have caught the bug, because
it asserts against the artifact rather than against the source tree.
0.1.1cannot be replaced, so this is 0.1.2. 358 passing.🤖 Generated with Claude Code