8000 docs: align audience guidance and Python style policy by rafatahmed · Pull Request #275 · rafatahmed/Flahax · GitHub
[go: up one dir, main page]

Skip to content

docs: align audience guidance and Python style policy - #275

Merged
rafatahmed merged 12 commits into
mainfrom
docs/problem-scope-and-factual-corrections
Nov 18, 2026
Merged

rafatahmed merged 12 commits into
mainfrom
docs/problem-scope-and-factual-corrections

Conversation

@rafatahmed
Copy link
Copy Markdown
Owner

Summary

Growers and agronomists need clear instructions for turning crop targets, water analysis and available products into a reviewed batch recipe. Align the problem statement and supported scope with current FlahaX behavior, add verified Sonneveld walkthroughs and file/session contracts, and document the Python style policy actually enforced.

B00-D04  factual audit, problem statement and scope
D05-D06  grower/agronomist walkthroughs, profiles and saved sessions
D07-D09  audience navigation, diagrams, TUI captures, offline delivery
S01-S02  explicit PEP 8 policy and compatible style corrections

Fix deterministic fresh-process Sonneveld replay by ordering positive component keys before numerical evaluation. Give all 13 catalogue formula checks independent test identities while preserving their real chemistry assertions and the existing timeout. Style changes preserve public interfaces, mathematical expression order and scientific data.

Closes #271
Closes #272
Closes #273
Closes #274

Evidence

  • Before: documentation misstated water-charge behavior and acceptance tolerances; fresh-process Appendix I replay could differ numerically; one aggregate catalogue test exceeded the local group budget.
    After: corrected guidance and scope; byte-identical installed-wheel replay after deleting the import file; all 13 real catalogue formula checks pass independently without loosening assertions or raising limits.
  • Local V01 at a87223993ab7d72a64d71103c2426a7827a72abc: the 1,833-case inventory has 1,830 passes, three documented skips and zero failures/errors. This uses 1,711 fresh executions plus 122 provenance-checked unchanged passing cases; it is functional evidence, not combined coverage or hosted acceptance. Skips cover opt-in online downloads and two native POSIX checks on Windows. Required pinned PHREEQC mode was enabled.
  • Ruff 0.8.4 lint/format pass for 345 Python files; generated API reference and whitespace checks pass. Policy distinguishes 99-column code, 72-column flowing prose, reviewed exceptions and optional import sorting.
  • Strict Sphinx build passes for 73 authored pages; the all-HTML audit checks 90 generated files, 7,692 local links/fragments and 164 images with no failures. Forty layout checks and seven print paths pass.
  • Final wheel and sdist pass independent clean installs, nine manual examples, public interfaces, resources and command entry points. Installed grower repeat, Appendix I import/replay, explicit follow-up sample approval, tampered-session refusal and offline resource-copy journeys pass.
  • The 1,000 L Appendix I profile at pH 5.5 without sodium nitrate passes all 13 nutrient uncertainty intervals, pH tolerance and the 5% sodium reserve. Its result remains requires_review: product assays, real stock preparation, dispensing and finished-batch measurements still need physical qualification.
  • Hosted exact-head CI will be recorded here after completion. No release publication is included; version remains 0.6.1.dev0.

Merge Danger

Door: two-way

Reversible documentation/style changes plus a deterministic ordering correction and test scheduling repair. No public API, recipe target or scientific coefficient changes. Keep draft pending hosted checks and review.

Blast Radius: repository

Broad comment/docstring reflow touches 371 files overall. Generated documentation and installed resources are covered by local checks; exact-head native coverage and Python compatibility remain hosted acceptance requirements. Personal plans and validation artifacts stay outside the repository.

Canonicalize analytical component order before equilibrium arithmetic to preserve exact evidence and saved candidate identity. Add minimized equilibrium and public import/adopt/replay regressions across process hash seeds while retaining tamper checks.

Refs #272. Validation: 21 numerical/Sonneveld tests and 110 chemistry/workflow checks passed, including pinned live PHREEQC replay. Clean installed Appendix I replay is byte-identical.
Complete D07-D09 audience routes, annotated TUI captures, accounting diagrams, printable tables and offline resources. Align packaged manual and current behavior, including water handling, ammonium, scope, replay qualification and the hosted CI matrix.

Refs #271 and #272. Validation: strict 73-page build; 7530 local links and 160 images; 36 layout and six print checks; clean wheel/sdist installs and installed audience journeys. Physical validation and hosted publication remain separate.
Distinguish 99-column code, 72-column flowing prose and the configured Ruff subset from full PEP 8 review. Document header, structured-text, mathematical-name and compatibility exceptions and preserve import evaluation order.

Refs #273. S01 audit covers all 345 Python files; personal findings ledger remains outside the repository.
Apply the reviewed S01 policy to flowing comments and docstrings, insert 60 missing import-category separators without moving imports, and normalize five test/helper names. Preserve fixed headers, scientific notation, fixtures, public APIs and executable ASTs; regenerate API and CLI references with whitespace-only content changes.

Refs #273. Validation: 24 focused documentation/header checks, Ruff lint/format and AST/docstring equivalence across 325 changed Python files pass. Full committed-candidate validation follows under V01.
Correct the Linux coverage shard count found during V01 contributor-guide review. Both native platforms use six shards in the existing workflow; no workflow or Python source changes.

Refs #271 and #273. Validate the affected documentation and source distribution separately; reuse only unchanged Python/data test inputs.
Update the hint key for the renamed pH-input test while preserving its 0.01 weight. The complete unittest inventory, assertions and chemical inputs are unchanged.

Refs #273. The mapping follows the reviewed S02 test rename; CI weights remain scheduling hints, never selection rules.
Name the five source/test/tool directories covered by the existing fixed-header check and document the standalone Sphinx configuration exception. This aligns contributor policy with the reviewed 345-file inventory without changing Python source or lint gates.

Refs #273.
Replace one opaque 13-formula subtest loop with 13 named real batch cases plus the catalogue inventory guard. The shared check_formula helper and every scientific/output assertion are unchanged. Add a red-to-green scheduling witness proving every formula retains a unique selectable identity and reaches that helper exactly once.

Refs #274. The original 1800-second timeout remains failed evidence; no runner, solver, uncertainty or nutrient/pH limits are relaxed. All 11 scheduling tests pass; real formula/full-inventory verification continues under V01.
Put the two remaining multiline docstring closing delimiters on their own lines and wrap the scheduling-witness prose at 72 columns. Executable ASTs and normalized docstring wording are unchanged; the generated public API reference remains current.

Refs #273 and #274. All 36 affected conversion, competitor-support, scheduling, header and public-docstring tests pass. Ruff lint/format pass across 345 files; complete inventory verification remains V01.
Generate the block-comment wrapping at exactly 72 columns including indentation. Executable code is unchanged; the scheduling witness and full pinned Ruff checks pass.

Refs #273.
@rafatahmed rafatahmed added bug Something isn't working documentation Improvements or additions to documentation labels Nov 18, 2026
@rafatahmed rafatahmed self-assigned this Nov 18, 2026
@rafatahmed
rafatahmed marked this pull request as ready for review November 18, 2026 13:29
@rafatahmed
rafatahmed merged commit d520bd7 into main Nov 18, 2026
27 checks passed
@rafatahmed
rafatahmed deleted the docs/problem-scope-and-factual-corrections branch November 18, 2026 13:30
@codecov
codecov Bot commented Nov 18, 2026
Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #275   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          140       140           
  Lines        16919     16922    +3     
  Branches      3433      3433           
=========================================
+ Hits         16919     16922    +3     
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

1 participant

0