Conversation
Remove Napoleon Attributes/Methods sections from 17 class docstrings that duplicated autodoc :members: output (44 duplicate-object warnings). Exclude stale jupyter_execute/ artifacts from Sphinx (42 warnings). Fix RST indentation in faults.py, surfaces.py, units.py docstrings (3 warnings). Also document PETSc-style CLI convention in parameters.md (closes #46). Underworld development team with AI support from Claude Code
There was a problem hiding this comment.
Pull request overview
This PR targets a clean Sphinx documentation build by eliminating doc build warnings and clarifying Underworld’s PETSc-style CLI option convention for users.
Changes:
- Removed redundant Napoleon
Attributes/Methodssections in multiple class docstrings to prevent duplicate-object warnings with autodoc:members:. - Excluded
jupyter_execute/artifacts from Sphinx input viaexclude_patterns. - Improved/normalized several docstrings and beginner docs, including a new explanation of PETSc single-dash long options with a cross-reference from the quickstart.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/underworld3/units.py | Docstring indentation/wording adjustment for get_units() argument docs. |
| src/underworld3/systems/solvers.py | Removed Napoleon Attributes sections from solver class docstrings to avoid Sphinx duplicate-object warnings. |
| src/underworld3/systems/ddt.py | Removed Napoleon Attributes sections from DDt class docstrings to avoid duplicate-object warnings. |
| src/underworld3/swarm.py | Removed Napoleon Attributes / Methods sections from swarm-related docstrings to avoid duplicate-object warnings. |
| src/underworld3/meshing/surfaces.py | Docstring indentation/wording adjustment to eliminate docutils indentation warnings. |
| src/underworld3/meshing/faults.py | Docstring indentation/wording adjustment to eliminate docutils indentation warnings. |
| src/underworld3/discretisation/discretisation_mesh.py | Removed Napoleon Attributes section from Mesh docstring to avoid duplicate-object warnings. |
| src/underworld3/coordinates.py | Removed Napoleon Attributes sections from coordinate accessor/type docstrings to avoid duplicate-object warnings. |
| src/underworld3/constitutive_models.py | Removed Napoleon Attributes sections from constitutive model docstrings to avoid duplicate-object warnings. |
| docs/conf.py | Added jupyter_execute/** to Sphinx exclude_patterns. |
| docs/beginner/quickstart.md | Added a cross-reference and brief inline clarification of PETSc-style single-dash options. |
| docs/beginner/parameters.md | Added “Why Single-Dash Options?” section describing PETSc vs argparse conventions and guidance for wrappers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…23) add_particles_with_coordinates: document that non-local points are filtered per-rank so passing a global array is safe (no duplicates). add_particles_with_global_coordinates: document that every rank adds all points before migration, note it is primarily for internal use, and cross-reference the safer method. Underworld development team with AI support from Claude Code
Soften claim about argparse incompatibility (it can be configured), and use parse_known_args + remaining_argv in the tip example. Underworld development team with AI support from Claude Code
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Copilot requested fixes have been addressed. Tests all passing. This is mostly a docs bug-fix rather than any new features so I am going to merge this straight through. |
Summary
AttributesandMethodssections in 17 class docstrings createdpy:attributeentries that conflicted with autodoc'spy:propertyentries from:members:processing. Removed the redundant Napoleon sections since autodoc documents all properties/methods automatically.jupyter_execute/artifacts (42): Stale myst_nb directory was generating image.not_readable and toc.not_included warnings. Added toexclude_patternsin conf.py.faults.py,surfaces.py, andunits.pycaused docutils "Unexpected indentation" errors.parameters.mdexplaining PETSc vs argparse conventions, with cross-reference fromquickstart.md.Clean build now produces 0 warnings (down from ~91).
Test plan
sphinx-build -b html docs docs/_build/htmlcompletes with 0 warningsUnderworld development team with AI support from Claude Code