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

Organise the documentation site for its readers (Diátaxis, three paths) - #155

Merged
rafatahmed merged 1 commit into
mainfrom
docs/site-structure
Oct 23, 2026
Merged

rafatahmed merged 1 commit into
mainfrom
docs/site-structure

Conversation

@rafatahmed
Copy link
Copy Markdown
Owner

The documentation site, organised for its three readers: the grower, the agronomist, and the developer or researcher. It follows the Diátaxis structure: tutorials, how-to guides, reference and explanation. This is option A as approved by the owner on 2026-10-23: it ships with 0.6.0, and the tutorials with screenshots, the glossary and the trimmed offline manual follow in 0.6.1.

New menu

Section Pages
Get started Install · Your first batch · Your first recipe in Python
Grower guide Overview (diagram: the five steps) · What you need · Run a batch · Read the batch sheet (diagram: tanks and injector) · Mix safely
Agronomist guide Overview (diagram: how a lab analysis is used) · A batch from files (with the tomato worked example) · Formulas and products · pH, acids and bases · Tanks and solubility · Reading the results
Developer and researcher guide Overview (diagram: package architecture) · Python API in practice · Water, targets and acids · Site planning · Conductivity · Delivery contracts and quantities · Verification · Contributing
Reference Command line (generated from the real --help) · Python API · Input files · Error codes · Reading plans and results · User manual (offline)
Explanation How a recipe is calculated (diagram: recipe and pH loop) · Why FlahaX needs your water's pH · Scope and limits · the models (unchanged)
Evidence Unchanged, plus the fertilizer source review
Project Changelog · Release notes · Citation · License and credits · Security · Code of conduct · Roadmap

The home page explains what FlahaX does, with the diagram "From your water to your tanks", then offers three doors (Grower, Agronomist, Developer and researcher), the install line, and the status and limits.

How it was done

  • No page is lost.
    • growers.md is split by reader, along its own sections.
    • The other guide pages move whole with git mv, so their history is kept.
    • Every moved page redirects from its old address, including growers.html, which the README and the published 0.5.0 page link to.
    • Links to moved pages are rewritten across the site and the repository (INTEGRATION.md, examples/README.md, docs/*).
  • New docs-only tools, pinned: sphinxcontrib-mermaid==2.1.1 for the diagrams and sphinx-reredirects==1.1.0 for the redirects. The package keeps zero runtime dependencies.
  • Single sources: the Project pages show SECURITY.md, CODE_OF_CONDUCT.md, CONTRIBUTING.md, NOTICE and CITATION.cff directly, and the error-code page includes the manual's tables. Nothing is copied by hand.
  • New pages state only facts already recorded in the changelog, README, manual or code.
  • Judgement calls:
    • Single-subject guide pages move whole rather than being split, to keep their facts unchanged.
    • The planned separate "water analysis" page stays inside "A batch from files": it is one task path, and a test checks its worked example.
    • The command-line reference check runs on Python 3.13 and newer only, because argparse lays help out slightly differently before 3.13; Read the Docs builds with 3.13.

Tests

  • tests/test_docs_structure.py, new, checks that:
    • every page is in a menu exactly once;
    • every redirect leads from a removed page to an existing one;
    • reference/cli.md matches the current --help (tools/cli_reference.py --check).
  • tests/test_growers_page.py now reads the worked example from agronomist/batch-command.md.
  • Results: full suite 626 tests including PHREEQC: OK. Strict Sphinx build: OK. ruff: OK. LF line endings.

Review

Read the Docs builds a preview of this PR; the link appears in the checks below. Please review the menu and the pages there.

Owner-approved restructure (option A for 0.6.0): Get started; Grower, Agronomist and
Developer and researcher guides, each with an overview and a diagram; Reference
(command line generated from --help by tools/cli_reference.py, Python API, input
files, error codes, reading plans, the offline manual); Explanation (how a recipe is
calculated, water and pH, scope and limits, the models); Evidence; Project (changelog,
release notes, citation, license and credits, security, code of conduct, roadmap).

The growers page is split by reader; other guide pages move whole with git mv. Every
moved page redirects from its old address (sphinx-reredirects), and Mermaid draws six
diagrams (sphinxcontrib-mermaid); both are pinned docs-only tools. Links to moved pages
are rewritten across the site and the repository. tests/test_docs_structure.py checks
that every page is in a menu once, every redirect resolves, and the command-line
reference is current.
@rafatahmed rafatahmed self-assigned this Oct 23, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.82%. Comparing base (37fb4e6) to head (e82ca17).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #155   +/-   ##
=======================================
  Coverage   89.82%   89.82%           
=======================================
  Files          54       54           
  Lines        7371     7371           
=======================================
  Hits         6621     6621           
  Misses        750      750           
Flag Coverage Δ
unittests 89.82% <ø> (ø)

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 23, 2026 21:50
@rafatahmed
rafatahmed merged commit c8be32c into main Oct 23, 2026
10 checks passed
@rafatahmed
rafatahmed deleted the docs/site-structure branch October 23, 2026 21:51
rafatahmed added a commit that referenced this pull request Nov 7, 2026
Organise the documentation site for its readers (Diátaxis, three paths)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0