8000 data: adopt the owner catalogue (Flaha Agri Tech Analysis Ver 0.0) by rafatahmed · Pull Request #207 · rafatahmed/Flahax · GitHub
[go: up one dir, main page]

Skip to content

data: adopt the owner catalogue (Flaha Agri Tech Analysis Ver 0.0) - #207

Merged
rafatahmed merged 10 commits into
mainfrom
data/owner-catalogue-v0.0
Oct 30, 2026
Merged

rafatahmed merged 10 commits into
mainfrom
data/owner-catalogue-v0.0

Conversation

@rafatahmed
@rafatahmed rafatahmed commented Oct 30, 2026 •
Copy link
Copy Markdown
Owner

Closes #206
Closes #208

The packaged catalogue becomes the owner's Flaha Agri Tech Analysis Ver 0.0: 24 fertilizers, 5 pH products and 13 crop formulas (owner-supplied, not independent laboratory verification).

Changes

  • Data: src/flahax/data/library.json is the owner catalogue (merged from the owner's local work; main's other changes kept). The only later edit adds identityId links for Micro Combi Mix 1 and 2.
  • Identities:
    • Nitric acid is modelled as a fully dissociated strong acid (H⁺ + NO₃⁻), the same way phosphoric acid is handled.
    • Micro Combi Mix 1 and 2 get declared_blend identities from the owner-declared forms (owner, 2026-10-30): Fe, Cu, Mn and Zn as EDTA chelates, Mo as sodium molybdate, B as boric acid. Their sodium counter-ions follow the catalogue's own chelate products, and the amounts in mol/kg come from the owner element percentages.
  • Tests:
    • Engine-mechanics tests run on a frozen copy of the pre-owner catalogue (tests/fixtures/catalogue-pre-owner-33c5df2.json via tests/catalogue_history.py).
    • Tests that fail only because of a gate the plan removes carry # Owner catalogue: re-enable in PR <n> (G<k>).
    • No assertion was removed or loosened, and no test is skipped.
  • Behaviour (owner decision, 2026-10-30): when the formulation stage cannot meet a target, the run now ends "requires review" (exit 0) and reports the shortfall, instead of "blocked" (exit 3).
  • Docs:
    • Counts and source are updated across the README, the user guide and docs/site.
    • The changelog gets its entry, with details in docs/releases/0.7.0.md.
    • User-guide example 4 and tools/verify_distribution.py dose potassium sulfate (K target 13.9 mg/L).
    • NOTICE and CREDITS credit Flaha Agri Tech.

Known follow-ups

  • PR 4 (G5): owner potassium nitrate (13.0 % N / 38.2 % K) still stops at the 1 % label/charge gate. Tests and examples that depend on it are marked for PR 4.
  • PR 3 (G23–G25): ammonium and tolerance tests are marked.

Verification

  • Full local suite: all failures are local-only (untracked .venv file headers, untracked phreeqc.log inventory drift).
  • tools/verify_distribution.py: passed locally against the owner catalogue.
  • Not run locally: the strict Sphinx build (sphinxcontrib.mermaid is missing) and the coverage gate. CI runs both.

tests/fixtures/catalogue-pre-owner-33c5df2.json is the byte copy of
src/flahax/data/library.json at 33c5df2. tests/catalogue_history.py
provides historical_catalogue(), which makes the package load it
(engine, every module that imported load_library by name, and the
benchmark report's formula_names reader), and historical_library().

Tests written against the pre-owner formulas and products are wrapped;
tests that meet a gate scheduled for removal carry
"# Owner catalogue: re-enable in PR <n> (G<k>)"; catalogue-content
assertions are updated to the owner library.json values. No assertion
is removed or loosened.
…wner catalogue

- HNO3 joins the ion tables as a fully dissociated strong acid with an
  implicit proton, as H3PO4 is (N1); focused test added.
- Micro Combi Mix 1 and 2 get owner-declared identity records (status
  declared_blend: EDTA chelates with the catalogue's Na counter-ions,
  sodium molybdate, boric acid; mol/kg from the library analysis),
  linked by identityId; declared blends resolve as disclosed blends
  without the assumed_composition flag (N2).
- NOTICE credits Flaha Agri Tech Analysis Ver 0.0 (N3).
- Public contract subprocess runs expect the owner-accepted "requires
  review" exit 0 with the K -100 % shortfall (N4).
- Identity coverage is checked against shipped and frozen catalogues;
  retired records stay (N5). Identities pin updated.
- The three every-product chemistry tests now fail on owner data only
  at the KNO3 label gate: wrapped and marked G5.
- test_owner_catalogue formatted for ruff (same assertions and values).
- historical_catalogue patches with its own function so restoring never
  rebinds a module's historical_library import.
Micro Combi Mix 2 declares B as boric acid, B(OH)3 without B(OH)4-; its profile now names
'boric acid' among its components (family edta_boric_acid_molybdate_blend), as CH-micro's
profile names borax.
State the packaged catalogue (13 formulas; 29 products, 24 fertilizers and 5 pH products;
owner-supplied, not independent laboratory verification) in README, the user guide and the
site; rewrite examples that named removed formulas or products (USER_GUIDE example 6 now
uses Pepper (Howard Resh); mixed_chemistry drops CH - micro); describe the packaged acids in
the batch help, catalogue_ph_reagents and regenerated references. Changelog entry and
docs/releases/0.7.0.md. Owner-data test: recommend never selects a pH reagent for any owner
formula. Examples that now stop only on the KNO3 label gate carry the PR 4 (G5) marker.
…e owner catalogue

USER_GUIDE example 4, the docs/site verification example and the verify_distribution smoke
used Potassium Nitrate, which stops at the KNO3 label gate on the owner catalogue. They now
dose Potassium Sulfate with target K 13.9 mg/L, the K the doses supply (engine.forward on the
owner assays: 13.901). The manual and site example tests run on owner data again.
@rafatahmed rafatahmed self-assigned this Oct 30, 2026
@read-the-docs-community
read-the-docs-community Bot commented Oct 30, 2026 •
Copy link
Copy Markdown

@codecov
codecov Bot commented Oct 30, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (33c5df2) to head (ccc197f).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #207   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          112       112           
  Lines        13088     13092    +4     
  Branches      2604      2605    +1     
=========================================
+ Hits         13088     13092    +4     
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 October 30, 2026 14:15
@rafatahmed
rafatahmed merged commit 984ea1b into main Oct 30, 2026
13 checks passed
@rafatahmed
rafatahmed deleted the data/owner-catalogue-v0.0 branch October 30, 2026 14:19
@rafatahmed rafatahmed added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 30, 2026
rafatahmed added a commit that referenced this pull request Nov 7, 2026
data: adopt the owner catalogue (Flaha Agri Tech Analysis Ver 0.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phase evidence generator converts catalogue doses before its destination guard Owner catalogue: Flaha Agri Tech Analysis Ver 0.0

1 participant

0