Skip to content

docs: rewrite docs/api — 53 of 84 autosummary entries are dead (cti-upkeep 5c) #123

Closed

Description

@Jammy2211

Overview

PyAutoCTI's docs/api/ is published on Read the Docs, but 53 of its 84 autosummary entries point to symbols that don't exist. plot.rst is an unadapted copy of the Lens/Galaxy class-based template (48 dead Plotter/MatPlot/Include/Visuals classes), and data.rst lists 5 symbols that autocti never exports. This rewrites both pages against the real API and adds PyAutoCTI to Heart's /audit_docs skill, so it isn't skipped again. cti-upkeep phase 5c.

Plan

  • Rewrite plot.rst in the functional style already used by PyAutoFit's plot.rst, documenting the real autocti.plot exports.
  • Fix data.rst: drop the Grid entries (CTI doesn't use or re-export grids; autoarray documents them), rename LayoutDataset1D → Layout1D, and drop the nonexistent SettingsDataset1D.
  • Add PyAutoCTI to the repo table in PyAutoHeart/skills/audit_docs/SKILL.md.
  • Verify with an import + hasattr audit (0 dead) and a local sphinx-build, because CTI has no docs CI until phase 3c.
  • Tier: glance. Merge mode: auto-merge on green if the Witness passes, then a post-merge summary.
Detailed implementation plan

Affected Repositories

  • PyAutoCTI (primary)
  • PyAutoHeart

Branch Survey

Repository Current Branch Dirty?
./cti/PyAutoCTI main (804ddeb) clean
./organs/PyAutoHeart main clean

Suggested branch: feature/cti-api-rst-rewrite

Audit today (2026-11-06)

  • plot.rst: 48 dead
  • data.rst: 5 dead (Grid2D, Grid2DIrregular, Grid1D, LayoutDataset1D, SettingsDataset1D)
  • modeling.rst: 0 (the PySwarms entries were already removed)
  • arctic, clocking, fitting: clean

Implementation Steps

  1. docs/api/plot.rst: an introduction to the functional API with an import autocti.plot as aplt example (mirroring PyAutoFit/docs/api/plot.rst), then sections:
    • Dataset 1D: figure_dataset_1d_data, subplot_dataset_1d, subplot_dataset_1d_list
    • Fit 1D: figure_fit_dataset_1d, subplot_fit_dataset_1d, subplot_fit_dataset_1d_list, fits_fit_dataset_1d
    • Charge injection imaging: the *_imaging_ci_* functions plus figure_pre_cti_data_residual_map
    • Fit CI: the *_fit_ci_* functions plus subplot_noise_scaling_map_dict
    • General: plot_array, plot_yx, plot_cti_1d, subplot_save
    • Search plots: the autofit corner_cornerpy, corner_anesthetic, subplot_parameters, log_likelihood_vs_iteration
    • Output: output_figure
    • Visualization during a fit: PlotterDataset1D, PlotterImagingCI
  2. docs/api/data.rst: remove the 3 Grid entries and the grid wording, rename LayoutDataset1D → Layout1D, and drop SettingsDataset1D.
  3. PyAutoHeart/skills/audit_docs/SKILL.md: add a PyAutoCTI row and change the "all three repos" default to four.
  4. Verify: the audit script reports 0 dead, and sphinx-build -b html docs shows no new warnings on api/.

Key Files

  • PyAutoCTI/docs/api/plot.rst, PyAutoCTI/docs/api/data.rst
  • PyAutoCTI/autocti/plot/__init__.py: the source of truth for plot exports
  • PyAutoFit/docs/api/plot.rst: the reference pattern
  • PyAutoHeart/skills/audit_docs/SKILL.md

Original Prompt

Click to expand starting prompt

Rewrite PyAutoCTI docs/api — 55 of 89 autosummary entries are dead

Type: docs
Target: PyAutoCTI
Repos:

  • PyAutoCTI
    Themes:
  • docs-hub
  • cti
    Difficulty: medium
    Autonomy: supervised
    Priority: normal
    Status: formalised
    Consequence: glance
    Witness: Every autosummary entry under PyAutoCTI/docs/api/ imports and hasattr-resolves against the installed autocti (the /audit_docs sweep reports 0 dead, was 55 of 89), plot.rst documents the function-style autocti.plot exports, the data.rst re-export-or-remove call is recorded, and PyAutoHeart/skills/audit_docs/SKILL.md lists PyAutoCTI.
    Review-minutes: 3
    Unattended: ready
    Epic: cti-upkeep
    Phase: 5
    Filed: 2026-08-06 (backfilled from git)

Filed 2026-08-06 from a full /audit_docs sweep (every autosummary entry
verified by import + hasattr against installed source). PyAutoCTI's
docs/api/ is RTD-published but untouched since 2024-09-27; 62% of its
documented symbols don't exist.

  • docs/api/plot.rst (49 dead entries) — the file is an unadapted copy of
    the Lens/Galaxy class-heavy plot-doc template; none of the documented class
    hierarchy (Array2DPlotter…FitImagingCIPlotter, MatPlot1D/2D,
    Include*, Visuals*, 22 matplotlib-wrapper classes, and the
    NestPlotter/MCMCPlotter/MLEPlotter trio removed from autofit in the
    class→function refactor bc917452e) ever existed in CTI
    (git log -S "class MatPlot2D" returns nothing). Rewrite from scratch
    against the actual autocti/plot/__init__.py exports (function-based
    plot_array, plot_yx, subplot_*, figure_* + classes
    PlotterDataset1D, PlotterImagingCI), following the corrected
    function-style pattern planned for PyAutoFit's plot.rst
    (existing draft docs/libraries/pyautofit_plot_rst_dead_plotters.md —
    re-confirmed by this audit; ship that one first as the reference).
  • docs/api/data.rst (5 dead) — Grid2D, Grid2DIrregular, Grid1D
    (exist in autoarray but never re-exported by autocti/__init__.py) and
    LayoutDataset1D/SettingsDataset1D (don't exist anywhere; Layout1D
    does). Maintainer call: remove the entries or add the re-exports first.
  • docs/api/modeling.rst (2 dead) — PySwarmsLocal/PySwarmsGlobal,
    removed from autofit in cc9fd6df4; drop them.
  • arctic.rst, clocking.rst, fitting.rst are clean; Fit/Galaxy/Lens api
    docs are otherwise fully green (447 symbols verified).
  • Process gap: PyAutoHeart/skills/audit_docs/SKILL.md's repo table omits
    PyAutoCTI even though it has published docs/api/ — add it so future audits
    don't silently skip the one repo that drifts.

Activity

  1. Jammy2211 commented on Nov 6, 2026

    @Jammy2211
    CollaboratorAuthor

    Shipped — 2026-11-06

    PRs

    Summary

    docs/api/plot.rst was rewritten for the functional autocti.plot API; data.rst lost its 5 dead entries (the Grid entries were removed rather than re-exported); /audit_docs now covers PyAutoCTI. Audit 84 entries / 53 dead → 64 / 0; sphinx-build warnings 159 (53 on api/) → 53 (0 on api/).

    Session Notes

    Not changed here, for phase 3c: docs/requirements.txt pins autonerves==2024.11.6.1, and docs/conf.py clones PyAutoFit/PyAutoArray from the old personal-account URLs at build time.

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

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