Skip to content

docs: RTD hygiene — reconnect PyAutoFit RTD, converge conf.py, add docs CI #1341

Description

@Jammy2211

Overview

A 2026-07-09 census of the docs/ReadTheDocs setup across PyAutoFit, PyAutoGalaxy and PyAutoLens found the RTD link broken in one place and fragile everywhere: pyautofit.readthedocs.io has not built since 2026-05-06 (its RTD project still points at rhayes777/PyAutoFit.git, so 16 docs commits — including the Jammy2211→PyAutoLabs URL audit #1265 and the Latent cookbook migration — never reached the live site), no repo builds docs in CI, and the three conf.py files have drifted (including a silent typo in PyAutoLens). This task is phase A of the docs-infrastructure middle path: fix the RTD wiring, delete dead configs, converge conf.py, and add a docs CI job to each repo. Phases B+C (shared PyAuto theming + a GitHub Pages hub) are parked in PyAutoMind/docs/libraries/docs_theming_and_hub.md and will be issued when this ships.

Run under --auto, effective level supervised (docs/medium caps at safe; the prompt header supervised binds — the RTD-dashboard legs need a human). Brain's sizing faculty scored this too-large (14) via the multi-repo heuristic and proposed a generic 4-phase split; overridden because the per-repo work is small and identical — the natural decomposition is one PR per repo within this task (calibration data point for the too-large heuristic).

Plan

  • Human legs (RTD dashboard): reconnect the pyautofit RTD project to PyAutoLabs/PyAutoFit and confirm a fresh build goes live; update the pyautogalaxy/pyautolens RTD project repo URLs from Jammy2211/... to the PyAutoLabs org. Verified afterwards via the public RTD addons API (last-build date + repo URL).
  • Delete dead configs: PyAutoFit/readthedocs.yml (drifted py3.11 duplicate), PyAutoGalaxy/readthedocs.yaml (duplicate), PyAutoFit/docs/requirements.txt (superseded by the pyproject [docs] extra RTD actually installs).
  • Converge the three docs/conf.py on the Galaxy/Lens variant: fix the PyAutoLens nnumpydoc_class_members_toctree typo, remove the dead html_context blocks (github_version: "master", never read by Furo), bring PyAutoFit's autodoc/typehints config in line, fix or drop the phantom _static/pied-piper-admonition.css references in Fit and Lens.
  • Add a docs CI job to each repo: build Sphinx HTML on PRs touching docs/, the package, or pyproject.toml; strict -W if the current warning baseline allows, otherwise fail on warning-count regression with the baseline recorded.
  • Validate by building each repo's docs before/after locally, diffing warning counts, and spot-checking rendered API pages (the conf.py convergence changes real rendering in Fit and Lens).
Detailed implementation plan

Affected Repositories

  • PyAutoFit (primary — dead RTD connection)
  • PyAutoGalaxy
  • PyAutoLens

Branch Survey

Repository Current Branch Dirty?
./PyAutoFit main clean (0/0 vs origin)
./PyAutoGalaxy main clean (0/0 vs origin)
./PyAutoLens main clean (0/0 vs origin)

Suggested branch: feature/rtd-hygiene (worktrees under ~/Code/PyAutoLabs-wt/rtd-hygiene/)

Implementation Steps

  1. PyAutoFit
    • Delete readthedocs.yml and docs/requirements.txt.
    • docs/conf.py: add sphinx_autodoc_typehints to extensions (already shipped in the [docs] extra but never enabled); adopt the Galaxy/Lens autodoc block (autodoc_default_options = {members, undoc-members, show-inheritance}, autodoc_class_signature = "separated", autoclass_content = "init", autosummary_imported_members = True, add_module_names = False, typehints settings); remove the dead html_context block; resolve html_static_path/pied-piper-admonition.css (create the asset or drop both references).
    • Before/after sphinx-build comparison — this changes real rendering of API pages (af.Model, af.Analysis spot-checks).
  2. PyAutoGalaxy
    • Delete readthedocs.yaml.
    • docs/conf.py: remove the dead html_context block (reference variant otherwise).
  3. PyAutoLens
    • docs/conf.py: fix nnumpydoc_class_members_toctreenumpydoc_class_members_toctree (verify the resulting toctree change renders sanely — the setting has been silently off); resolve the _static css reference; remove the dead html_context block.
  4. All three — add .github/workflows/docs.yml: on PRs touching docs/**, the package dir, or pyproject.toml, run pip install .[docs] then sphinx-build -b html docs docs/_build; -W if the baseline is clean, else record the warning baseline and fail on regression. RTD's fail_on_warning stays false (CI owns strictness).
  5. RTD dashboard (human) — reconnect/repoint the three RTD projects as above; verify with the addons API that a push to main triggers a fresh live build of pyautofit docs.

Key Files

  • PyAutoFit/readthedocs.yml, PyAutoFit/docs/requirements.txt, PyAutoGalaxy/readthedocs.yaml — dead, delete
  • PyAuto{Fit,Galaxy,Lens}/docs/conf.py — converge
  • PyAuto{Fit,Galaxy,Lens}/.github/workflows/docs.yml — new CI job

Out of scope

  • Theming + GitHub Pages hub (phases B+C, parked prompt docs/libraries/docs_theming_and_hub.md)
  • plot.rst content rewrite (Remove all reference to sym link and the al_ files #592) and API-page staleness beyond what the CI warning baseline forces
  • Migrating off ReadTheDocs; versioned/stable docs (only latest published — recorded as deliberate under nightly releases)

Original Prompt

Click to expand starting prompt

See PyAutoMind/issued/rtd_hygiene.md (moved from docs/libraries/rtd_hygiene.md) — carries the full census findings and the verbatim original request/decision record.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions