You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix documentation: DeviceProperties display and sidebar navigation (#1444)
* Fix DeviceProperties documentation by using cyclass.rst template
DeviceProperties is a Cython cdef class, but was being documented
without specifying the cyclass.rst template. This caused Sphinx to
use the default class template which uses autoproperty, which doesn't
work correctly with Cython extension types.
The cyclass.rst template uses autoattribute instead, which properly
documents the properties of Cython classes.
Fixes#1215
* Enable object entries in table of contents for sidebar navigation
Add toc_object_entries=True to all conf.py files to include object
descriptions (methods, attributes, etc.) in the table of contents.
This is a Sphinx 5.1+ feature that should enable the 'On This Page'
sidebar to show class methods and properties.
Also set toc_object_entries_show_parents='hide' for cleaner display
without redundant parent class names.
Partially addresses #1100
* List class members directly without separate sections in autosummary templates
Update autosummary templates (class.rst, cyclass.rst, protocol.rst) to
list methods and attributes directly under the class without separate
section headings. Methods are listed first, followed by attributes.
Combined with toc_object_entries=True in conf.py, individual methods
and attributes will appear directly in the 'On This Page' sidebar,
providing navigation similar to what was available in older versions
with the furo theme.
Fixes#1100
* Show class prefix in sidebar TOC, plain names in main docs
Change toc_object_entries_show_parents from 'hide' to 'domain' so that
the sidebar TOC shows class-prefixed names (e.g., Device.allocate())
while the main documentation shows just the method/attribute names.
Fixed template indentation to ensure automethod/autoattribute directives
are properly nested inside the autoclass block.
* Use autoclass :members: option for automatic member documentation
* Use section headings for methods/attributes to appear in sidebar TOC
* Fix autodoc directives to use fully qualified names
* Use autoclass :members: with toc_object_entries for sidebar
* Restore original template structure with rubrics
This restores the original template formatting where Methods and Attributes
are organized under rubric headings (which don't appear in TOC).
Note: pydata-sphinx-theme's secondary sidebar only shows document headings,
not autodoc entries. Methods/attributes won't appear in the sidebar without
using actual section headings, which would add extra headers to the main body.
* Configure pydata-sphinx-theme secondary sidebar for autodoc entries
- Add secondary_sidebar_items with page-toc and sourcelink
- Set show_toc_level: 3 to show more TOC levels by default
- Keep toc_object_entries = True for Sphinx to add object entries to TOC
This should make autodoc entries appear in the secondary sidebar if
Sphinx's toc_object_entries properly populates the page TOC.
* Remove sourcelink from secondary sidebar
* Apply cyclass.rst template to all Cython cdef classes
Public API Cython classes now using cyclass.rst:
- Buffer, MemoryResource
- Stream, StreamOptions
- Event, EventOptions
- DeviceMemoryResource, DeviceMemoryResourceOptions
- PinnedMemoryResource, PinnedMemoryResourceOptions
- ManagedMemoryResource, ManagedMemoryResourceOptions
- LaunchConfig
Private API Cython classes now using cyclass.rst:
- IPCAllocationHandle, IPCBufferDescriptor
- DeviceProperties (already was)
* Fix template assignments: dataclasses stay under dataclass.rst
- Cython dataclasses (StreamOptions, EventOptions, *ResourceOptions)
stay under dataclass.rst template
- Pure Cython cdef classes (Buffer, Stream, Event, MemoryResource,
LaunchConfig) use cyclass.rst template
- Classes inheriting from Cython (GraphMemoryResource,
LegacyPinnedMemoryResource, VirtualMemoryResource) use cyclass.rst
- Restored original ordering
* Move LaunchConfig to dataclass template
- Device, Graph, GraphBuilder are regular Python classes (use default)
- LaunchConfig uses dataclass template per project convention
0 commit comments