8000 feat: accept small ammonium and sodium amounts without a declared maximum by rafatahmed · Pull Request #396 · rafatahmed/Flahax · GitHub
[go: up one dir, main page]

Skip to content

feat: accept small ammonium and sodium amounts without a declared maximum - #396

Merged
rafatahmed merged 2 commits into
mainfrom
feat/acceptable-incidental-amounts
Nov 30, 2026
Merged

rafatahmed merged 2 commits into
mainfrom
feat/acceptable-incidental-amounts

Conversation

@rafatahmed
Copy link
Copy Markdown
Owner

NOT READY until CI is green.

Closes #395

Ammonium the products add, up to the documented allowance (10 % of the nitrogen target, at most 1.5 mmol/L), and sodium up to 5 mg/L need no declared maximum. A default recipe whose only review reason was these two is now ready.

  • Each amount is printed as an "Assumed:" line on the sheet, the terminal result, the full-screen view and the report, and listed in summary['assumed_limits'].
  • Recipes are unchanged: the amounts never limit the fit.
  • Decline with --ammonium-allowance 0 and --trace-sodium 0 (ammonium_allowance_percent=0, trace_sodium_mg_per_l=0 in BatchOptions). Library recommend() is unchanged.
  • A formula whose products add more than the amount still asks for a maximum (Strawberry Drip Irrigation stays requires review).

Verified on this branch:

  • 76 affected test modules, run one at a time: all pass (16 new tests in tests/test_acceptable_incidental.py).
  • Real run: default Cucumber is ready with two "Assumed:" lines on its sheet; Strawberry Drip Irrigation is requires review.
  • Lint passes. Records are in outputs/test-runs/2026-11-30-feat-acceptable-incidental-amounts/seq/.
  • Older tests that assumed a default recipe needs review now expect ready, or pin the no-maximum path with both options set to 0.

Not yet verified: the full CI gate (exact coverage, Python 3.11) has not run.

…out a declared maximum (#395)

Ammonium up to the documented allowance (10 % of the nitrogen target, at most 1.5 mmol/L) and sodium up to 5 mg/L need no declared maximum. They are listed as assumptions on every output, never change a recipe, and can be declined with --ammonium-allowance 0 and --trace-sodium 0.
@rafatahmed rafatahmed added the enhancement New feature or request label Nov 30, 2026
@rafatahmed rafatahmed self-assigned this Nov 30, 2026
@read-the-docs-community
read-the-docs-community Bot commented Nov 30, 2026 •
Copy link
Copy Markdown

Documentation build overview

📚 Flahax | 🛠️ Build #36256317 | 📁 Comparing 31a8326 against latest (a6fa51a)

  🔍 Preview build  

6 files changed · ± 6 modified

± Modified

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

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #396   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          152       152           
  Lines        18074     18111   +37     
  Branches      3650      3657    +7     
=========================================
+ Hits         18074     18111   +37     
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 30, 2026 08:05
@rafatahmed
rafatahmed merged commit 8ff1c14 into main Nov 30, 2026
29 checks passed
@rafatahmed
rafatahmed deleted the feat/acceptable-incidental-amounts branch November 30, 2026 08:05
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.

Accept small ammonium and sodium amounts from the products without a declared maximum, shown as assumptions

1 participant

0