Repository navigation
fix: state a limit for each value of the two reduced-model PHREEQC fixtures - #509
Merged
Merged
Conversation
…xtures One absolute tolerance of 0.05 accepted a zero molality and the earlier unconserved phosphate balance. Fixtures can now give an absolute or relative limit per value; each is 1.2 times the measured difference. Reference values and PHREEQC inputs are unchanged. Closes #504
|
📖 2 files modified Preview · build overview · Flahax · built Dec. 5, 2026, 9:54 a.m. UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #509 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 155 155
Lines 18403 18417 +14
Branches 3719 3723 +4
=========================================
+ Hits 18403 18417 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 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.
Summary
Closes #504
In both fixtures
absoluteTolerancegoes from 0.05 to 0, so a value without its own limit must match exactly (only pH, and ionic strength where it is an input). Every other value has a limit: 1.2 × the difference measured today, rounded up to two significant figures. The reason is written in each fixture astoleranceBasis.target_ph_nitric_dose.json, legacy solver against PHREEQC 3.8.6:ca_mg_phosphate_complexation.json,calcium_magnesium_phosphate_speciationagainst PHREEQC 3.8.9:No reference value or PHREEQC input changes. The two pinned hashes in
tests/reference_inventory.jsonchange with the files. The separate 0.0005 mol/kgw acid assertion is removed: the fixture limit (0.00025) is tighter.Evidence
After: all pass. Run against the earlier solver source (
77b506a0), the new limits reject it: H2PO4- 8.8020e-4 against 8.6018e-4 ± 2.1e-6.ruff checkandruff format --checkpass.test_product_phreeqcandtest_acid_referencepass (6 tests).Remaining limit
Checked against earlier work
#503 and #508: the solver values that #508 corrected are now rejected by this fixture. #507 stays open. No other open pull request.
Merge Danger
Door: two-way
Blast Radius: small.
reference_fixturesgains an optional field; fixtures without it behave as before. A later chemistry change that moves these two models by more than about 20 % of their present gap fails the tests.