Skip to content

docs: add missing aplt exports to plot.rst (autolens + autogalaxy) #862

Closed

Description

@Jammy2211

Overview

docs/api/plot.rst in PyAutoLens lists only part of what autolens.plot (aplt) exports — 44 exported names have no autosummary entry, including the six dataset/fits functions named in the prompt, and there is no "Dataset Subplots" heading for them. PyAutoGalaxy's plot.rst has the same drift (15 names). This adds every missing export to both files under sensible headings, so the API reference matches the live namespace.

Plan

  • Add a Dataset Subplots section to both plot.rst files holding the dataset-level functions (subplot_imaging_dataset, subplot_imaging_dataset_intro, subplot_imaging_dataset_list, fits_imaging, fits_interferometer, subplot_interferometer_dirty_images; autogalaxy also gets subplot_interferometer_dataset).
  • In PyAutoLens, add the other missing exports to existing sections where they fit (imaging mappings, interferometer tracer, point image overlay, fits_array, output_figure) and new sections for the re-exported galaxy/profile subplots, ellipse fits, magnification maps, cluster plots, weak-lensing plots and twin comparisons.
  • In PyAutoGalaxy, add fits_array, subplot_fit_imaging_list, output_figure and a magnification section.
  • Check: export-vs-autosummary diff empty in both repos (only Output, documented under autoarray.plot, sits outside); sphinx warning count at or below each repo's baseline.
  • Out of scope: extending /audit_docs to check plot.rst against the live aplt namespace — noted as a follow-up.

Tier: glance — merge mode: auto-merge on green if the Witness passes, post-merge summary

Detailed implementation plan

Affected Repositories: PyAutoLens (primary), PyAutoGalaxy
Suggested branch: feature/plot-rst-missing-exports
Worktree root: ~/Code/PyAutoLabs-wt/plot-rst-missing-exports/

Key files

  • PyAutoLens/docs/api/plot.rst
  • PyAutoGalaxy/docs/api/plot.rst

Steps

  1. Diff the names imported in <pkg>/plot/__init__.py against the autosummary entries in docs/api/plot.rst (AST parse of the import list; regex over autosummary lines).
  2. PyAutoLens additions:
    • Basic plots: fits_array
    • new Dataset Subplots: the six named + subplot_imaging_dataset_intro
    • Imaging Fit: subplot_fit_imaging_mappings; Interferometer: subplot_fit_interferometer_tracer; Point Source: plot_image_with_points
    • new sections: Galaxy and profile subplots (autogalaxy re-exports), Ellipse Fit, Magnification maps, Cluster, Weak lensing, Twin comparison
    • Search results (autofit.plot): output_figure
  3. PyAutoGalaxy additions: fits_array, Dataset Subplots (7), subplot_fit_imaging_list, Magnification maps, output_figure.
  4. Build sphinx locally (python -m sphinx -b html docs … -w warnings.log) before and after; count must not exceed docs/sphinx_warning_baseline.txt.

Testing: docs-only — the export diff and the sphinx build; CI Docs workflow re-checks the warning count.

Prompt: PyAutoMind/draft/docs/autolens/plot_rst_missing_exports.md (shift 2026-11-14-pm3).

Activity

  1. Jammy2211 commented on Nov 14, 2026

    @Jammy2211
    CollaboratorAuthor

    Library PRs created (shift 2026-11-14-pm3, --auto)

    Witness

    • Export diff empty in both repos: holds.
    • Sphinx warnings, local: PyAutoLens 96→96 (same set), PyAutoGalaxy 70→69. Holds.
    • The six named symbols under "Dataset Subplots": five are there. subplot_fit_interferometer_tracer is a fit subplot, so I kept it under Interferometer subplots.

    Decision taken. Both PRs are labelled decision-taken, so a human merges them with /prm:

    1. The placement above.
    2. The PyAutoGalaxy docstring fix. Without it, documenting the magnification plots adds 13 sphinx errors.

    Merge order: PyAutoGalaxy#716 first, then PyAutoLens#863.

    Workspace impact: none, docs only (option iii).

    Follow-up, not done here: extend /audit_docs to check plot.rst against the live aplt namespace.

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