docs: fix stale autosummary entries breaking the docs build#635
Merged
Conversation
The docs build has been red on main since the potential_correction feature
landed (2026-07-17):
- docs/api/potential_correction.rst used `currentmodule:: autolens.pc`, but
`pc` is only an attribute alias (`from . import potential_correction as pc`)
and cannot be imported as a module path by Sphinx autosummary — every class
failed to import ("No module named 'pc'"). Point currentmodule at the real
module, `autolens.potential_correction`.
- docs/api/mass.rst listed `dPIEMassLenstool` / `dPIEMassLenstoolSph`, which
were renamed to `dPIEMassB0` / `dPIEMassB0Sph` in autogalaxy.profiles.mass.
Both are now importable, removing the autosummary import-failure warnings that
pushed the Sphinx warning count over its baseline.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ciVftxvYpefh59wSkR7jN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fix two stale Sphinx
autosummaryentries that have kept the docs build red onmainsince thepotential_correctionfeature landed (2026-07-17):docs/api/potential_correction.rstused.. currentmodule:: autolens.pc.pcis only an attribute alias (from . import potential_correction as pcinautolens/__init__.py), not a real module path — Sphinx autosummary can't import it, so every class failed (No module named 'pc'). Pointedcurrentmoduleat the real module,autolens.potential_correction(all 15 listed classes are exported there).docs/api/mass.rstlisteddPIEMassLenstool/dPIEMassLenstoolSph, which were renamed todPIEMassB0/dPIEMassB0Sphinautogalaxy.profiles.mass.Why
The
docs-buildgate fails when the Sphinx warning count exceeds the baseline (docs/sphinx_warning_baseline.txt). Each failed autosummary import emits a multi-line traceback into the warning log; these renamed/aliased entries pushed the count over baseline. Both symbols now import cleanly, removing those warnings.Validation
Verified against the installed source that every class listed in
potential_correction.rstis exported fromautolens.potential_correction, and thatdPIEMassB0/dPIEMassB0Sphare exported fromautogalaxy.profiles.mass. Docsdocs-buildCI on this PR is the check to confirm the warning count is back under baseline.🤖 Generated with Claude Code
https://claude.ai/code/session_013ciVftxvYpefh59wSkR7jN
Generated by Claude Code