8000 feat: show a status matrix per recipe and make ready reachable by rafatahmed · Pull Request #370 · rafatahmed/Flahax · GitHub
[go: up one dir, main page]

Skip to content

feat: show a status matrix per recipe and make ready reachable - #370

Merged
rafatahmed merged 11 commits into
mainfrom
feat/status-matrix
Nov 29, 2026
Merged

rafatahmed merged 11 commits into
mainfrom
feat/status-matrix

Conversation

@rafatahmed
Copy link
Copy Markdown
Owner

Closes #369

What changes

  • summary['matrix'] reports a verdict per cell (target fit, chemical stability, model basis: ready, review or blocked) with findings that name their code, and a separate preparation verdict (fits, not verified, does not fit). summary['status'] is the worst of the three cells and can now be ready ("calculation complete, not physically validated"). Words are in GLOSSARY.md; the decision is ADR 0004.
  • Equipment (tank count, tank capacity, stock solubility, reagent volume) no longer blocks the recipe: it is a preparation finding (Preparation: does not fit - <need>).
  • A pH plan that cannot be made (solver incomplete, no reagent offered, activity model out of range) is a model-basis review instead of blocked; a precipitation risk makes chemical stability review.
  • blocked reads "not usable as planned"; "do not mix" is retired. A declared maximum that is exceeded still blocks. A rounded delivery that misses its declared requirements still holds the recipe.

Behaviour changes to check

  • Exit codes: flahax batch and flahax mix exit 3 only for a blocked recipe. A preparation that does not fit, or a recipe with no pH plan, exits 0. Scripts that relied on exit 3 for those cases change.
  • Sheets for a preparation that does not fit still list the quantities and tick boxes beside the "Preparation: does not fit" line (an insoluble concentrate, or a tank the grower did not declare). Hiding them is a decision the spec does not cover.
  • ready is uncommon on the shipped catalogue: it needs every target met (or inside a declared range), every incidental nutrient given a declared maximum, a planned pH and no precipitation risk. Ion balance stays information only (G10).
  • Recalculate saved recipes; the migration guide has a new 0.7.1 to 0.7.2 row.

Verification

  • Full suite on Windows, Python 3.14, in timed batches before the last fixes: 2,089 tests passed. Five test_mix_cli failures were disk-full errors and passed on rerun; the slow ratio tests pass one at a time.
  • After the review fixes: the status matrix, wording, canonical result, wiring (18), Sonneveld Appendix I, deviation range, requirement fit, report boundary, equipment, tank layout, pH adjustment and result acceptance tests pass.
  • Not verified locally after the last fixes (timed out at 295 s under machine load; they passed before): test_grower_journey segments 03 and 04, test_mix_cli segment 03, test_independent_reagent_capacity, test_precipitation_report. Also not run locally: the coverage-gap comparison, the wheel and sdist check, the strict docs build (Sphinx is not installed). CI covers them.
  • No chemistry input is touched, so the PHREEQC fixture is unchanged.

@rafatahmed rafatahmed added the enhancement New feature or request label Nov 29, 2026
@rafatahmed rafatahmed self-assigned this Nov 29, 2026
@read-the-docs-community
read-the-docs-community Bot commented Nov 29, 2026 •
Copy link
Copy Markdown

@codecov
codecov Bot commented Nov 29, 2026 •
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (cdef82a) to head (e3aa50f).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main      #370    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          151       152     +1     
  Lines        17816     17968   +152     
  Branches      3599      3632    +33     
==========================================
+ Hits         17816     17968   +152     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rafatahmed
rafatahmed marked this pull request as ready for review November 29, 2026 04:23
@rafatahmed
rafatahmed merged commit b9894ac into main Nov 29, 2026
29 checks passed
@rafatahmed
rafatahmed deleted the feat/status-matrix branch November 29, 2026 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show a status matrix per recipe and make ready reachable

1 participant

0