8000 Organise the documentation site for its readers (Diátaxis, three paths) by rafatahmed · Pull Request #155 · rafatahmed/Flahax · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ single-salt lower bounds, and there is no physical validation yet (#41).

### Changed

- The documentation site is organised for its readers (Diátaxis): Get started, a grower, an agronomist and a developer and researcher guide, Reference (command line, Python API, input files, error codes), Explanation, Evidence and Project, with diagrams; moved pages redirect from their old addresses.
- `flahax --help` describes every command, with examples and links to the documentation and the issue tracker; the README follows the order a reader needs (installation, quick start, commands, troubleshooting); the changelog follows Keep a Changelog 1.1.0 for every release.
- Supplier labels may differ from their chemical's charge balance by up to 1 % (was 0.1 %) (#93).
- A water report without chloride closes its charge balance on alkalinity instead of being blocked (#100).
Expand Down
2 changes: 1 addition & 1 deletion INTEGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FlahaFAST integration is owned by the separate **FlahaFAST project**, by project

## Supported package interfaces

- Python: `recommend`, explicit catalogue-equilibrium functions and delivery-planning types; see [usage](docs/site/guide/usage.md) and [equilibrium delivery](docs/site/api/package-verification.md).
- Python: `recommend`, explicit catalogue-equilibrium functions and delivery-planning types; see [usage](docs/site/developer/python-api.md) and [equilibrium delivery](docs/site/developer/verification.md).
- CLI: `python -m flahax` or `flahax` consumes one JSON object on standard input and returns a JSON recommendation. A nonempty `salts` array is required; the CLI does not silently choose the packaged catalogue. Check process exit status and the result's `feasible` value; an error is not an empty successful recommendation.
- Nutrient targets/water use elemental ppm; recipe doses use g/L final solution. Equilibrium inputs use explicitly converted g/kg water and molal totals. Do not pass arbitrary application product rows into catalogue-only equilibrium APIs.

Expand Down
6 changes: 3 additions & 3 deletions docs/development-roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ published baseline is [0.4.0](https://pypi.org/project/flahax/0.4.0/)
The [implementation ledger](implementation-roadmap.md) retains P0–P7
acceptance and historical audits.

Site planning ([site planning](site/guide/site-planning.md), [source review](site/guide/source-sheet-review.md)),
Site planning ([site planning](site/developer/site-planning.md), [source review](site/evidence/source-sheet-review.md)),
the water-to-delivery workflow and the EC/injection planner shipped in 0.3.1.
General concentrated A/B EC, acid-adjusted full-recipe conductivity and
manufacturer-qualified equipment model selection remain open; brochure anchors
Expand All @@ -22,12 +22,12 @@ Hosted acceptance P6.6/P6.7 is closed: Python 3.11–3.13 jobs and the pinned li

## Milestones and acceptance

The [water-to-delivery](site/guide/water-to-delivery.md) workflow (0.3.1) does not
The [water-to-delivery](site/developer/water-to-delivery.md) workflow (0.3.1) does not
authorize a commercial dose from an incomplete water analysis. 0.4.0 anchors
source water at its measured pH; a field evaluation against measured pH, acid
demand and laboratory nutrient analyses is planned
([publication drafts](publication/README.md)). The
[EC/injection planner](site/guide/conductivity.md) still lacks real calibration packs and
[EC/injection planner](site/developer/conductivity.md) still lacks real calibration packs and
hold-out validation; synthetic interpolation tests are not physical accuracy
evidence. Automatic EC-setpoint dosing and a universal concentrated-stock
conductivity model are not claimed.
Expand Down
6 changes: 3 additions & 3 deletions docs/development-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ The matrix below describes the 0.3.1 capabilities and their boundaries.
| Stock planning API | Existing sourced compatibility/solubility/capacity checks | Caller must supply complete applicable records; absence from a pairwise table is not evidence of compatibility |
| Injector design flow and inventory | `injector_sizing.py`, batch/area arithmetic and tests | Pump/venturi/Dosatron operating-point data still needed for a specific model |
| Offline graphical capability report | `examples/run_all.py`, `visual_report.py`, `test_examples.py` | Separate pepper, manufacturer-screening and synthetic demonstrations; no cross-scenario dosing inference |
| Traceable materials (identity, grade, lot, nutrient band) | `materials.py`, `material_identities.json`, material tests; [materials](site/guide/materials.md) | Grades and lots are user supplied; band covers nutrient amounts only; undisclosed blends refused for chemistry |
| Traceable materials (identity, grade, lot, nutrient band) | `materials.py`, `material_identities.json`, material tests; [materials](site/agronomist/formula-and-products.md) | Grades and lots are user supplied; band covers nutrient amounts only; undisclosed blends refused for chemistry |

Paths in this matrix refer to `src/flahax/`, `tests/` or `examples/` as named.
See [site planning](site/guide/site-planning.md), [water-to-delivery](site/guide/water-to-delivery.md),
[EC methods](site/guide/conductivity.md), [source review](site/guide/source-sheet-review.md) and
See [site planning](site/developer/site-planning.md), [water-to-delivery](site/developer/water-to-delivery.md),
[EC methods](site/developer/conductivity.md), [source review](site/evidence/source-sheet-review.md) and
[runnable examples](../examples/README.md) for executable instructions.

## Preserved boundaries
Expand Down
2 changes: 1 addition & 1 deletion docs/history/ph-planning-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Archived from the measured-curve guide during documentation reorganization.
The following text is a historical design requirement, not the current API
status or evidence that every proposed boundary is implemented. The current
[water-to-delivery guide](../site/guide/water-to-delivery.md) describes the
[water-to-delivery guide](../site/developer/water-to-delivery.md) describes the
implemented equilibrium workflow and its limits. Original wording follows.

## Required mathematical model
Expand Down
4 changes: 2 additions & 2 deletions docs/implementation-roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Audited against chemistry closure commit `20c41c43f785940c5045276bb47925159a119b

### Verification continuation — 2026-09-27

P5.5 now provides the explicit catalogue-equilibrium delivery adapter. The complete Python 3.13 suite passes **107 tests with zero skips**, including pinned live PHREEQC. Clean wheel and sdist installs pass outside the checkout on Python 3.13 and were also exercised on Python 3.14. Fresh hash-pinned PHREEQC provisioning succeeds outside the repository. [Package verification](site/api/package-verification.md) documents commands, inputs, units and public return types.
P5.5 now provides the explicit catalogue-equilibrium delivery adapter. The complete Python 3.13 suite passes **107 tests with zero skips**, including pinned live PHREEQC. Clean wheel and sdist installs pass outside the checkout on Python 3.13 and were also exercised on Python 3.14. Fresh hash-pinned PHREEQC provisioning succeeds outside the repository. [Package verification](site/developer/verification.md) documents commands, inputs, units and public return types.

P6.6/P6.7 remain active until the supported Python 3.11–3.13 hosted jobs actually pass; the previously observed GitHub account billing lock prevented execution. Local success is not hosted-CI acceptance.

Expand Down Expand Up @@ -169,7 +169,7 @@ P2/P3/P4 have bounded numerical implementations. Both measured-curve and equilib
| P5.2 | Cross-stage constraint evaluation `[x]` | Recipe/stock identity and complete pH/pump composition fixture are tested |
| P5.3 | Approval state machine `[x]` | Explicit state transitions; no implicit approval |
| P5.4 | Human-readable report `[x]` | State, volume, stock, pump, pH, audit, and warning report implemented |
| P5.5 | Catalogue-equilibrium result to composed delivery adapter `[x]` | `src/flahax/equilibrium_delivery.py`, `tests/test_equilibrium_delivery.py`: explicit water-mass conversion, assayed HNO3 mass/volume, nitrate rescoring, source hashes, dedicated acid channel, rejection guards, PHREEQC target agreement and recipe-to-reviewed-plan integration; `docs/site/api/package-verification.md` |
| P5.5 | Catalogue-equilibrium result to composed delivery adapter `[x]` | `src/flahax/equilibrium_delivery.py`, `tests/test_equilibrium_delivery.py`: explicit water-mass conversion, assayed HNO3 mass/volume, nitrate rescoring, source hashes, dedicated acid channel, rejection guards, PHREEQC target agreement and recipe-to-reviewed-plan integration; `docs/site/developer/verification.md` |

P5.1–P5.4 remain accepted for the measured-curve path. P5.5 closes the integration gap with a distinct `EquilibriumPhPlan`; it preserves the existing `PhPlan` and low-level `AcidResult` contracts. The caller supplies fixed final solvent mass and final make-up volume; the model does not silently simulate dynamic dilution. Supersaturation or formed solids block delivery validation.

Expand Down
24 changes: 12 additions & 12 deletions docs/index.md
10BC8
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@ Readers: the documentation is at <https://flahax.readthedocs.io/>. This index is

- [User manual](../src/flahax/data/USER_GUIDE.md) (version 0.5.0): the canonical, self-contained guide shipped inside the package.
- [Changelog](../CHANGELOG.md): new capabilities, compatibility notes and release status.
- [Core API and CLI](site/guide/usage.md): formulation inputs and output fields.
- [Core API and CLI](site/developer/python-api.md): formulation inputs and output fields.
- [Complete public API reference](../src/flahax/data/API_REFERENCE.md): generated signatures, source docstrings and result-record fields for every top-level export; shipped offline.

## Planning API reference

- [Capability status and next work](development-status.md): implemented features, unresolved limits and evidence boundaries.

- [Interactive site planning](site/guide/site-planning.md): user-specific water, nitric/phosphoric acids, calculated EC screening and injector flow requirements.
- [Fertilizer sheet review](site/guide/source-sheet-review.md): exact-brand data, source hashes and applicability limits.
- [Interactive site planning](site/developer/site-planning.md): user-specific water, nitric/phosphoric acids, calculated EC screening and injector flow requirements.
- [Fertilizer sheet review](site/evidence/source-sheet-review.md): exact-brand data, source hashes and applicability limits.

- [Stock and irrigation EC planning](site/guide/conductivity.md): recipe-calibrated conductivity, meter TDS scale and injection/pump connection.
- [Stock and irrigation EC planning](site/developer/conductivity.md): recipe-calibrated conductivity, meter TDS scale and injection/pump connection.
- [Stock conductivity service (design, not implemented)](stock-conductivity-service-design.md): proposed contract, model layers, evidence and test plan for conductivity of concentrated stocks and their dilutions.

- [Runnable capability examples](../examples/README.md): pepper formulation, chemistry, acids, stocks, titration, delivery and CLI reports (source checkout).

- [Water-to-delivery workflow](site/guide/water-to-delivery.md): water nutrient subtraction, incidental nutrient review, measured-pH water balancing (0.4.0), complete-analysis pH and standard nitric/phosphoric selection.
- [Water-to-delivery workflow](site/developer/water-to-delivery.md): water nutrient subtraction, incidental nutrient review, measured-pH water balancing (0.4.0), complete-analysis pH and standard nitric/phosphoric selection.

- [Quantities and batch recipes](site/guide/delivery-quantities.md)
- [Input contracts and audit records](site/guide/delivery-contracts.md)
- [Traceable materials: identity, grade, lot and nutrient band](site/guide/materials.md)
- [Stock assignment](site/guide/stock-planning.md)
- [Measured-curve pH planning](site/guide/ph-planning.md)
- [Equilibrium-to-delivery API and runnable example](site/api/package-verification.md)
- [Quantities and batch recipes](site/developer/delivery-quantities.md)
- [Input contracts and audit records](site/developer/delivery-contracts.md)
- [Traceable materials: identity, grade, lot and nutrient band](site/agronomist/formula-and-products.md)
- [Stock assignment](site/agronomist/tanks-and-solubility.md)
- [Measured-curve pH planning](site/agronomist/ph-and-acids.md)
- [Equilibrium-to-delivery API and runnable example](site/developer/verification.md)
- [Consumer boundary](../INTEGRATION.md): FlahaFAST implementation belongs to its separate project.

## Scientific model and evidence
Expand All @@ -50,7 +50,7 @@ Readers: the documentation is at <https://flahax.readthedocs.io/>. This index is
- [Documentation maintenance](documentation-maintenance.md): canonical sources, function-documentation checks and the 0.3.1 audit findings.

- [Development roadmap](development-roadmap.md): priorities, hardening gates and expansion opportunities.
- [Distribution verification](site/api/package-verification.md)
- [Distribution verification](site/developer/verification.md)
- [Release readiness](release-readiness.md)
- [Publishing: hardened release workflow and checklist](publishing.md)

Expand Down
2 changes: 1 addition & 1 deletion docs/releases/0.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Released 2026-10-20. The full text of every change in 0.5.0, as recorded in the
- Add experimental irrigation EC25 from speciation (McCleskey 2012 Eq. 8) with explicit partial results, envelope checks and provenance; no accuracy claim.
- Irrigation EC (M2a): species without a McCleskey coefficient now give a bounded `estimated` result (`bounded`, `ec25_range_ms_cm`, midpoint `ec25_ms_cm`, `uncertainty_ms_cm`, audit `uncovered_bound_ms_cm`; upper limit from 80 S cm2/mol per charge) instead of `partial`; `MODEL_VERSION` is now m2a and `compare_measured_ec` reports `ec25_range_ms_cm` and `within_range`.
- Irrigation EC (M2b): H2PO4- and HPO4-2 now contribute through 25 C coefficients fitted to Pethybridge, Talbot and House (2006) Table III (`tools/fit_phosphate_conductivity.py`, `supplementary` block of the coefficient file, data to I = 0.014); the audit records `supplementaryCoefficients` and `phosphate_fit_max_ionic_strength`, and `MODEL_VERSION` is now m2b. Minor phosphate pairs and PO4-3 stay under the bound.
- Add the material traceability API (`docs/site/guide/materials.md`): shipped identity records (`load_identities`, `identity_for_product`), user grades and lots (`make_grade`, `make_lot`), `resolve_material` (per-nutrient basis, band ends, flags, provenance) and `nutrient_band`; `catalogue_dose_totals` and `calculate_irrigation_ec` take `materials=`, undisclosed blends raise or report `composition_undisclosed` in chemistry, and EC and equilibrium-delivery audits carry material provenance.
- Add the material traceability API (`docs/site/agronomist/formula-and-products.md`): shipped identity records (`load_identities`, `identity_for_product`), user grades and lots (`make_grade`, `make_lot`), `resolve_material` (per-nutrient basis, band ends, flags, provenance) and `nutrient_band`; `catalogue_dose_totals` and `calculate_irrigation_ec` take `materials=`, undisclosed blends raise or report `composition_undisclosed` in chemistry, and EC and equilibrium-delivery audits carry material provenance.
- Link every catalogue product in `library.json` to its chemical identity (`identityId`) and record its `analysisBasis` (`declared_catalogue`, `identity_theoretical` or `grade_typical`) and `source` document reference. Product `id` and `name` values are unchanged.
- Correct Mg Nitrate to Mg(NO3)2·6H2O theory (owner decision D1): formula `Mg(NO3)2` → `Mg(NO3)2.6H2O`; N_NO3 11 → 10.92564 %, Mg 9.65 → 9.47931 %; basis `identity_theoretical`. Its declared-form charge residual at 1 g/kg water goes from +0.5532 % to ~0 %, so it no longer trips the EC O5 gate on its own.
- Correct Phosphoric Acid (75%) to the 75 % w/w solution: P 31.61 → 23.706035 % (0.75 × 31.608046, product-mass dosing); PO4 delivered per gram falls to 0.74995 × the old value. Its stored assay is now reported as drifting from the H3PO4 formula, as intended for a solution.
Expand Down
Loading
Loading
0