Raise the bngsim floor to 0.15.0, and make CI install what the project declares - #649
Merged
Conversation
…t declares PyBNF now requires bngsim 0.15.0. The reason is a contract rather than a feature PyBNF wants. bngsim 0.15.0 publishes event_sensitivities as a real capability key. Until it existed PyBNF answered that question by reading a different key, effective_ic_sensitivity, as a stand-in, which worked only because the two landed a few commits apart. That is a fact about the order of commits, not about what either key means, and it stops being evidence the moment the two are decoupled. Guessing wrong is not symmetric. A build without the event fixes does not refuse the case it cannot handle, it returns a gradient with a term missing, so the fit finishes and reports a number that looks fine. 0.15.0 is the first release where PyBNF can ask the real question. It also carries the codegen cache decline reason PyBNF reads, and a re-vendored RuleMonkey that declines a TotalRate rule where RuleMonkey and NFsim genuinely disagree rather than picking one reading. The floor was written in six places and two had drifted. The CI action pinned bngsim 0.11.35 while pyproject.toml declared 0.12.2. Both were set to the same number on 24 July. pyproject moved twice over the following fortnight and the action never followed, so for three weeks continuous integration tested against a bngsim older than the project said it required and nothing said so. Both files carried a comment asking a person to keep them in sync. A comment was all that held it, so this adds a test. The action does not resolve pyproject.toml, it installs a hand written list that mirrors it, because a leg that must run without bngsim cannot re-resolve. The new test reads both files and fails when they name different version ranges for a package, or when the action never installs something pyproject declares. Both directions fail quietly today. Too low a floor means CI passes on a build the published wheel would reject, and a test dependency the action leaves out does not fail a job either, because the suite that needs it skips instead. A second test covers the same class of problem in the release itself. The version is written by hand into four files. pybnf/__init__.py is the source of truth because pyproject.toml reads it, and CITATION.cff, docs/conf.py and CHANGELOG.md are separate copies a release has to remember to bump. Nothing was checking them. A stale CITATION.cff gives anyone citing PyBNF the wrong version, and a stale docs/conf.py labels the published documentation with the previous release. Both tests were checked by reintroducing each mistake one at a time and watching them fail. The floor also settles a question a third test was leaving open. The warm codegen cache test accepted either a replayed decline reason or silence, because the old pin admitted builds on both sides of the change that writes the reason down beside the cached artifact. 0.15.0 carries it, so the test now asserts the replayed reason word for word.
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.
PyBNF now requires bngsim 0.15.0.
Why 0.15.0
The reason is a contract rather than a feature PyBNF wants. bngsim 0.15.0 publishes
event_sensitivitiesas a real capability key. Until it existed PyBNF answered thatquestion by reading a different key,
effective_ic_sensitivity, as a stand-in. Thatworked only because the two landed a few commits apart, which is a fact about the order
of commits and not about what either key means.
Guessing wrong is not symmetric. A build without the event fixes does not refuse the case
it cannot handle. It returns a gradient with a term missing, so the fit finishes and
reports a number that looks fine. 0.15.0 is the first release where PyBNF can ask the
real question and get an answer in both directions.
0.15.0 also carries the codegen cache decline reason that PyBNF reads, and a re-vendored
RuleMonkey that declines a
TotalRaterule where RuleMonkey and NFsim genuinely disagreerather than picking one reading.
The drift
The floor is written in six places and two of them had come apart. The continuous
integration action pinned bngsim 0.11.35 while
pyproject.tomldeclared 0.12.2. Bothwere set to the same number on 24 July.
pyproject.tomlmoved twice over the followingfortnight and the action never followed, so for three weeks the test runs used a bngsim
older than the project said it required, and nothing said so. Both files carried a
comment asking a person to keep them in sync.
The tests this adds
A comment was all that held it, so there is now a test. The action does not resolve
pyproject.toml. It installs a hand written list that mirrors it, because a job that hasto run without bngsim cannot re-resolve. The new test reads both files and fails when
they name different version ranges for a package, or when the action never installs
something
pyproject.tomldeclares. Both directions fail quietly today. Too low a floormeans the tests pass against a build the published package would reject, and a test
dependency the action leaves out does not fail a job either, because the suite that needs
it skips instead.
A second test covers the same kind of problem in the release itself. The version is
written by hand into four files.
pybnf/__init__.pyis the source of truth becausepyproject.tomlreads it, andCITATION.cff,docs/conf.pyandCHANGELOG.mdareseparate copies a release has to remember to bump. Nothing was checking them. A stale
CITATION.cffgives anyone citing PyBNF the wrong version, and a staledocs/conf.pylabels the published documentation with the previous release.
Both tests were checked by putting each mistake back one at a time and watching them
fail, rather than only by watching them pass.
The floor also settles a question a third test was leaving open. The warm codegen cache
test accepted either a replayed decline reason or silence, because the old pin allowed
builds on both sides of the change that writes the reason down beside the cached
artifact. 0.15.0 carries it, so the test now asserts the replayed reason word for word.
How this was checked
The whole suite was run against bngsim 0.15.0, including the slow and recovery tiers that
the test jobs skip. 4763 passed, 13 skipped, and one failed.
That one failure is not from this change.
25_island_derecovers the wrong rate, it doesso identically on bngsim 0.13.0 and 0.15.0, and it fails the same way on main without any
of these edits. It is a differential evolution convergence regression from #561 and it is
reported as #648.