Repository navigation
Description
Overview
PyAutoLens/docs/api/mass.rst is out of sync with the al.mp.* namespace it documents — multiple exported classes are missing from the autosummary, and the al.lmp.* / al.lmp_linear.* namespaces have no autosummary entries at all. Surfaced as a follow-up while writing the scripts/guides/profiles/mass.py (#178 / #179) and scripts/guides/profiles/light_and_mass_profiles.py (#180 / #181) guides — both guides reference the published API reference URL, so the reference itself should list every class the guides demonstrate.
This is a pure rST docs change. No Python code is modified, no symbols added or removed. The new autosummary entries point at classes that already exist in autogalaxy.profiles.mass.* and autogalaxy.profiles.light_and_mass_profiles and are already re-exported by autolens as al.mp.* / al.lmp.* / al.lmp_linear.*.
Plan
- Add the missing entries to the existing
Total,Mass Sheets,Stellar, andDarksections. - Add a new
Point Mass [ag.mp]section forPointMass,SMBH,SMBHBinary. - Add a new
Stellar Light+Mass [ag.lmp]section listing every class inautogalaxy.profiles.light_and_mass_profiles. - Add a new
Linear Light+Mass [ag.lmp_linear]section listing every class inautogalaxy.profiles.light_linear_and_mass_profiles. - Keep the existing namespace-label convention (
ag.mp,ag.lmp,ag.lmp_linear) used elsewhere in the PyAutoLens docs. - Keep the existing rST formatting:
:toctree: _autosummary,:template: custom-class-template.rst,:recursive:directives per section. - Optional: run
make htmlinPyAutoLens/docs/if available to catch any rST errors.
Detailed implementation plan
Affected Repositories
- PyAutoLens (primary) —
docs/api/mass.rstedit - PyAutoGalaxy — read-only reference (no
docs/api/mass.rstexists in PyAutoGalaxy; sync is one-way)
Work Classification
Library (docs-only). Ships via /ship_library.
Branch Survey
| Repository | Current Branch | Dirty? | Notes |
|---|---|---|---|
| ./PyAutoLens | main | clean | free |
| ./PyAutoGalaxy | main | clean | reference only |
Suggested branch: feature/docs-mass-rst-sync
Worktree root: ~/Code/PyAutoLabs-wt/docs-mass-rst-sync/
Routing: library-dev → /start_library.
Implementation Steps
-
Edit
docs/api/mass.rstto add the missing entries to existing sections and append the new sections. Authoritative class lists derived from the namespace__init__files:- Total
[ag.mp]— add:dPIEMass,dPIEMassSph,PIEMass,dPIEPotential,dPIEPotentialSph(these are all defined inautogalaxy/profiles/mass/total/dual_pseudo_isothermal_mass.pyanddual_pseudo_isothermal_potential.py). - Mass Sheets
[ag.mp]— add:ExternalPotential. - Stellar
[ag.mp]— add:GaussianGradient,SersicCore,SersicCoreSph. - Dark
[ag.mp]— add:cNFW,cNFWSph,cNFWMCRLudlow,cNFWMCRLudlowSph,cNFWMCRScatterLudlow,cNFWMCRScatterLudlowSph,gNFWVirialMassConcSph,gNFWVirialMassgNFWConcSph,NFWVirialMassConcSph.
- Total
-
Append new sections:
- Point Mass
[ag.mp]— listPointMass,SMBH,SMBHBinary. Use:currentmodule: autogalaxy.profiles.mass. - Stellar Light+Mass
[ag.lmp]— list every class inautogalaxy.profiles.light_and_mass_profiles(Chameleon,ChameleonSph,DevVaucouleurs,DevVaucouleursSph,Exponential,ExponentialSph,ExponentialGradient,ExponentialGradientSph,Gaussian,GaussianGradient,Sersic,SersicSph,SersicCore,SersicCoreSph,SersicGradient,SersicGradientSph). Use:currentmodule: autogalaxy.profiles.light_and_mass_profiles. - Linear Light+Mass
[ag.lmp_linear]— same class list asag.lmp(the linear namespace mirrors it class-for-class). Use:currentmodule: autogalaxy.profiles.light_linear_and_mass_profiles.
- Point Mass
-
Verify the new file compiles cleanly (if Sphinx is available locally,
make htmlindocs/; otherwise rely on the GitHub Pages build to flag any rST issues).
Key Files
PyAutoLens/docs/api/mass.rst— add ~80 lines of autosummary entries
Out of scope
- PyAutoLens unit test suite is irrelevant to a docs-only change but
/ship_librarywill still run it as a baseline. - No corresponding PyAutoGalaxy docs to sync (PyAutoGalaxy has no
docs/api/mass.rst).
Constraints / style notes
- Match the existing namespace-label convention (
[ag.mp],[ag.lmp],[ag.lmp_linear]) used throughout the PyAutoLens docs even though autolens re-exports them asal.*. - Match the existing rST directive set (
:toctree:,:template:,:recursive:) per section.
Original Prompt
Click to expand starting prompt
Sync PyAutoLens/docs/api/mass.rst to cover every exported al.mp.* class and add documentation sections for al.lmp.* and al.lmp_linear.*. Surfaced as a follow-up while writing the scripts/guides/profiles/{mass.py,light_and_mass_profiles.py} guides (issues #178 / #180) — both guides reference the published API reference URL, so the reference itself should list every class the guides demonstrate.
Gaps to fix in the existing sections:
- Total: add
dPIEMass,dPIEMassSph,PIEMass,dPIEPotential,dPIEPotentialSph. - Mass Sheets: add
ExternalPotential(the recently merged line-of-sight potential). - Stellar: add
GaussianGradient,SersicCore,SersicCoreSph. - Dark: add
cNFW,cNFWSph,cNFWMCRLudlow,cNFWMCRLudlowSph,cNFWMCRScatterLudlow,cNFWMCRScatterLudlowSph,gNFWVirialMassConcSph,gNFWVirialMassgNFWConcSph,NFWVirialMassConcSph.
New sections to add:
Point Mass [ag.mp]—PointMass,SMBH,SMBHBinary.Stellar Light+Mass [ag.lmp]— every class inautogalaxy.profiles.light_and_mass_profiles.Linear Light+Mass [ag.lmp_linear]— every class inautogalaxy.profiles.light_linear_and_mass_profiles.
Pure rST docs change — no Python code touched. PyAutoGalaxy has no docs/api/mass.rst so the sync is one-way (PyAutoLens only).
Activity
Jammy2211 commentedon May 18, 2026
Shipped — 2026-05-18 — PR #520 merged. docs/api/mass.rst now covers every
al.mp.*class plus newPoint Mass,Stellar Light+Mass(al.lmp), andLinear Light+Mass(al.lmp_linear) sections.docs(api): sync mass.rst with full al.mp namespace + lmp / lmp_linear
test: re-pin two knife-edge positions_threshold pins after the exact …