Repository navigation
test(bngsim): follow bngsim 0.17.0's per-species atol, and refresh the declined-model fixture - #1021
Merged
Merged
Conversation
…e declined-model fixture Main's tests workflow went red when CI started installing bngsim 0.17.0. Four tests fail on the bngsim legs; none of them is a PyBNF defect. bngsim 0.17.0 reads a scalar atol as a ceiling per species, min(atol, rtol*max(|x_i(0)|, floor)) (lanl/bngsim#1420). PyBNF keeps handing the number over as written, so that reading is what a run gets. test_the_backend_default_atol_is_what_corrupted_those_sensitivities pinned sbml_atol to the old 1e-8 default on a species seeded at 1e-8 and expected the sensitivities corrupted; on 0.17.0 the ceiling resolves them (2.3e-07, 7.6e-07, 1.1e-06 against the closed form). It now runs only where bngsim holds a scalar exactly, through 0.16.0, and a new test asserts the 0.17.0 reading resolves the same columns inside the 1e-4 budget the derived tolerance is held to. The reading is probed by bngsim.ExactAtol's presence, which arrived with it. bngsim 0.17.0 also differentiates abs/min/max of the state (lanl/bngsim#1126), so k*S*|S-Km| no longer declines the analytic sensitivity RHS. The three sensitivity-fallback tests take k*S*floor(Km), which every build declines, and request parameter columns only, as #1018 worked out. docs/config_keys.rst said a number in sbml_atol integrates every species at that value; it now says that holds through 0.16.0 and what 0.17.0 does. Both tolerance docs carry #1018's correction of the abs/min/max claim. Checked on bngsim 0.16.0 and 0.17.0, petab 0.10.0: the two changed files plus test_petab_convert.py and test_packaging_metadata.py, 387 passed, 9 skipped on each, with the old tolerance test running on 0.16.0 and the new one on 0.17.0. Mutations: wrapping a stated atol in ExactAtol fails the new tolerance test; the abs() fixture fails the three fallback tests. Supersedes #1018, which passed every atol as ExactAtol instead.
wshlavacek
added a commit
that referenced
this pull request
Nov 4, 2026
Bump __version__ 1.8.1 -> 1.8.2, with CITATION.cff and docs/conf.py, and fold the 108 staged fragments into CHANGELOG.md's [v1.8.2] section: 12 added, 10 changed, 1 removed, 85 fixed. Raise the bngsim floor from 0.16.0 to 0.17.0 (pyproject dependencies, the antimony extra, and the CI install in setup-pybnf), released together with this version. The fixes the test suite credits to bngsim main rather than to 0.16.0 are all in a released build from 0.17.0 on, so an install resolved from PyPI gets the answers those tests assert. The gradient fit's run-time gate still names 0.16.0, the oldest build that code is right on. The two packaging tests that pin the floor string follow it. Built on main after #1017 (petab 0.10) and #1021 (bngsim 0.17.0's per-species atol), which turned main's tests workflow green again. Checked against bngsim 0.17.0 and petab 0.10.0 from PyPI: test_packaging_metadata.py, test_sbml_solver_tolerances.py, test_gradient_sens_fallback.py and test_petab_convert.py, 387 passed, 9 skipped; uv build and twine check --strict pass, and the wheel declares Requires-Python >=3.12 and bngsim<1,>=0.17.0.
This was referenced Nov 4, 2026
Merged
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.
main'stestsworkflow went red when CI started installing bngsim 0.17.0. Four tests fail on the bngsim legs, and none of them is a PyBNF defect. This updates the tests and docs to bngsim 0.17.0's behaviour and leaves PyBNF passing tolerances to bngsim as written.Supersedes #1018, which passed every
atolasbngsim.ExactAtoland so bypassed bngsim 0.17.0's per-species reading.bngsim 0.17.0 reads a scalar
atolas a per-species ceiling (lanl/bngsim#1420)Each species is held to
min(atol, rtol·max(|x_i(0)|, floor)).test_the_backend_default_atol_is_what_corrupted_those_sensitivitiespinnedsbml_atolto the old 1e-8 default on a species seeded at 1e-8 and expected corrupted sensitivities. On 0.17.0 the ceiling resolves them: errors of 2.3e-07, 7.6e-07 and 1.1e-06 against the closed form.test_a_per_species_ceiling_resolves_what_the_old_default_corrupted, asserts that the 0.17.0 reading resolves the same columns inside the 1e-4 budget.bngsim.ExactAtolexists, since it arrived in the same release.bngsim 0.17.0 differentiates
abs/min/maxof the state (lanl/bngsim#1126)k*S*|S-Km|no longer declines the analytic sensitivity RHS. The three sensitivity-fallback tests now usek*S*floor(Km), which every build declines, and request parameter columns only. This is #1018's fixture change, taken as is.Docs
docs/config_keys.rstsaid a number insbml_atolintegrates every species at that value. It now says that holds through bngsim 0.16.0, and describes what 0.17.0 does.abs/min/maxclaim.+bngsim-017-atol-ceiling.changed.md.Checked
test_petab_convert.pyandtest_packaging_metadata.py. Each build gave 387 passed, 9 skipped. The old tolerance test runs on 0.16.0 and the new one on 0.17.0.atolinExactAtol(the bypass) fails the new tolerance test.abs()fixture fails the three fallback tests.