8000 feat: add Calmag to the packaged catalogue by rafatahmed · Pull Request #368 · rafatahmed/Flahax · GitHub
[go: up one dir, main page]

Skip to content

feat: add Calmag to the packaged catalogue - #368

Merged
rafatahmed merged 1 commit into
mainfrom
feat/calmag-catalogue-product
Nov 28, 2026
Merged

rafatahmed merged 1 commit into
mainfrom
feat/calmag-catalogue-product

Conversation

@rafatahmed
Copy link
Copy Markdown
Owner

Closes #367

What changes

  • Adds Calmag (calcium magnesium nitrate) to the packaged catalogue as a declared blend from the Flaha Agri Tech analysis (CaO 16.7 %, MgO 6.0 %, N-NO3 13.1 %, N-NH4 0.4 %, total N 13.5 %), with its identity record idn-calmag-declared-blend. Nitrate balances the charge in the identity (12.9 % N-NO3 against the declared 13.1 %, because the declared analysis is 1.4 % anion-heavy). The catalogue has 30 products.
  • Adds ADR 0003: calcium is supplied as nitrate salts; calcium chloride stays out because no shipped formula targets chloride.
  • Re-captures the PHREEQC golden fixture with a calmag case (0.10 g/L, charge balance 1e-14) and registers its five files in tests/reference_inventory.json.

Effect on recipes

Calmag does not close the calcium shortfalls of Strawberry Drip Irrigation (126.1 of 200 mg/L) or Tomato Stage 3 (278.2 of 400): the solver still needs calcium without nitrate. It does change other recipes (for example Pepper, Lettuce 2, Tomato), so default recipes can differ from 0.7.1 and the CHANGELOG says to recalculate saved recipes. The 0.7.1 benchmark numbers describe the catalogue without Calmag.

Tests

Tests that record numbers for the packaged catalogue (test_solver_hot_paths, test_cross_version_digits, test_requirement_fit, test_nitrogen_targets, test_report_consistency, test_grower_sheet, test_mix_tui) and examples/tomato_advanced.py build the catalogue without Calmag, so their recorded values stay comparable. No test covers Calmag inside a recipe yet.

Verification

  • Ruff passed on the commit.
  • The full suite passed locally on Windows, Python 3.14, in timed batches without coverage (run records in outputs/test-runs/2026-11-28-calmag/).
  • Not run locally: the coverage-gap comparison with main and the wheel and sdist check; a full coverage run is longer than 5 minutes per shard here. CI covers them.

Closes #367

Add Calmag (calcium magnesium nitrate) as a declared blend from the Flaha Agri Tech analysis, with its identity record, a PHREEQC golden case and ADR 0003. Tests that record numbers for the packaged catalogue build it without Calmag.
@rafatahmed rafatahmed added the enhancement New feature or request label Nov 28, 2026
@rafatahmed rafatahmed self-assigned this Nov 28, 2026
@read-the-docs-community
Copy link
Copy Markdown

Documentation build overview

📚 Flahax | 🛠️ Build #36233225 | 📁 Comparing ce69542 against latest (7a4c91b)

  🔍 Preview build  

1 file changed
± changelog.html

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

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #368   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          151       151           
  Lines        17816     17816           
  Branches      3599      3599           
=========================================
  Hits         17816     17816           
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 28, 2026 21:44
@rafatahmed
rafatahmed merged commit cdef82a into main Nov 28, 2026
29 checks passed
@rafatahmed
rafatahmed deleted the feat/calmag-catalogue-product branch November 28, 2026 21:44
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.

Add Calmag (calcium magnesium nitrate) to the packaged catalogue

1 participant

2BF5
0