Skip to content

Reorganize Python API docs: grouped class index and enum reference#163

Merged
magnesj merged 4 commits into
next-major-releasefrom
improved-doc
May 22, 2026
Merged

Reorganize Python API docs: grouped class index and enum reference#163
magnesj merged 4 commits into
next-major-releasefrom
improved-doc

Conversation

@magnesj
Copy link
Copy Markdown
Member

@magnesj magnesj commented May 22, 2026

Summary

Reworks the structure of the rips Python API documentation.

  • Replace sphinx_automodapi with sphinx.ext.autosummary. A new generate_class_index.py produces a category-grouped class index — the GeneratedClasses.rst landing page plus one api_categories/ page per functional group — instead of a single flat ~140-class table.
  • Custom autosummary template that omits private/dunder members (any name starting with _) from the generated class pages.
  • toc_object_entries = False so documented objects no longer appear as redundant leaf nodes in the navigation sidebar.
  • New EnumClasses.rst reference page documenting the 47 StrEnum parameter types (BetaFactorType, CompletionType, …), discovered from rips.generated.generated_classes and rips.enums.
  • Category cleanup — classes that landed in the "Other Classes" catch-all are sorted into real groups, and the "Fracture Models" category is merged into "Fractures".
  • Toctree order — Python Examples now follows Installation.
  • Expanded the protobuf structure reference in ProtobufStructures.rst.

Testing

A clean sphinx-build -M html docs/source docs/build succeeds (109 warnings, all pre-existing).

🤖 Generated with Claude Code

magnesj added 4 commits May 21, 2026 15:25
Switch the Python API docs from sphinx_automodapi to sphinx.ext.autosummary
and reorganize the ~140-class flat list into a category-grouped index.

- Add generate_class_index.py, which produces the GeneratedClasses.rst
  landing page and one api_categories/ page per functional group.
- Add a custom autosummary class template that omits private and dunder
  members (any name starting with '_') and the recursive Value/ValueArray
  typing aliases on PdmObjectBase.
- Set toc_object_entries = False so documented objects no longer appear
  as redundant leaf nodes in the navigation sidebar.
- Expand the protobuf structure reference in ProtobufStructures.rst.
The ~44 StrEnum classes in rips.generated.generated_classes (BetaFactorType,
CompletionType, etc.) define the value sets accepted by various API fields
and command parameters, but were not in rips.__all__ and so went undocumented.

- Extend generate_class_index.py to discover StrEnum subclasses directly
  from the generated module and render EnumClasses.rst, one autoclass
  block per enum so every allowed value is listed.
- Add EnumClasses to the index toctree.
Sort the classes that fell into the "Other Classes" catch-all into real
groups and consolidate the two fracture categories.

- CellPropertyFilter, CellRangeFilter, DataFilterCollection and
  PropertyFilter -> Cell Filters and Intersections.
- RimPolygonContainer -> Annotations and Polygons.
- PdmNestedCollectionBase -> Base Classes.
- Route the StrEnum proto enums (PropertyType, PropertyDataType,
  NNCPropertyType) to the enum reference page instead of the class
  index: discover_classes() now excludes StrEnum subclasses and
  discover_enums() scans the whole rips namespace.
- Merge the "Fracture Models" category into "Fractures".
Place the Python Examples page directly after Installation so readers
reach worked examples before the API reference sections.
@magnesj magnesj merged commit 344b064 into next-major-release May 22, 2026
4 checks passed
@magnesj magnesj deleted the improved-doc branch May 22, 2026 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant