diff --git a/cuda_bindings/docs/source/conf.py b/cuda_bindings/docs/source/conf.py index b05ff9d0de..b55396376f 100644 --- a/cuda_bindings/docs/source/conf.py +++ b/cuda_bindings/docs/source/conf.py @@ -53,6 +53,12 @@ # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [] +# Include object entries (methods, attributes, etc.) in the table of contents +# This enables the "On This Page" sidebar to show class methods and properties +# Requires Sphinx 5.1+ +toc_object_entries = True +toc_object_entries_show_parents = "domain" + # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for @@ -69,6 +75,10 @@ "version-switcher", "navbar-nav", ], + # Use custom secondary sidebar that includes autodoc entries + "secondary_sidebar_items": ["page-toc"], + # Show more TOC levels by default + "show_toc_level": 3, } if os.environ.get("CI"): if int(os.environ.get("BUILD_PREVIEW", 0)): diff --git a/cuda_core/docs/source/_templates/autosummary/cyclass.rst b/cuda_core/docs/source/_templates/autosummary/cyclass.rst index 8728ab53ef..81d045a6b0 100644 --- a/cuda_core/docs/source/_templates/autosummary/cyclass.rst +++ b/cuda_core/docs/source/_templates/autosummary/cyclass.rst @@ -7,14 +7,6 @@ .. autoclass:: {{ objname }} - {% block attributes %} - {% if attributes %} - {% for item in attributes %} - .. autoattribute:: {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - {% block methods %} {% if methods %} .. rubric:: {{ _('Methods') }} @@ -25,3 +17,13 @@ {% endif %} {% endblock %} + + {% block attributes %} + {% if attributes %} + .. rubric:: {{ _('Attributes') }} + + {% for item in attributes %} + .. autoattribute:: {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} diff --git a/cuda_core/docs/source/api.rst b/cuda_core/docs/source/api.rst index 13e1f43a2f..a0bda7e64a 100644 --- a/cuda_core/docs/source/api.rst +++ b/cuda_core/docs/source/api.rst @@ -23,6 +23,9 @@ CUDA runtime Graph GraphBuilder launch + + :template: autosummary/cyclass.rst + Buffer Stream Event diff --git a/cuda_core/docs/source/api_private.rst b/cuda_core/docs/source/api_private.rst index 392290ee0e..0aa88d1d64 100644 --- a/cuda_core/docs/source/api_private.rst +++ b/cuda_core/docs/source/api_private.rst @@ -22,14 +22,17 @@ CUDA runtime _memory._virtual_memory_resource.VirtualMemoryGranularityT _memory._virtual_memory_resource.VirtualMemoryAccessTypeT _memory._virtual_memory_resource.VirtualMemoryHandleTypeT - _device.DeviceProperties - _memory._ipc.IPCAllocationHandle - _memory._ipc.IPCBufferDescriptor _module.KernelAttributes _module.KernelOccupancy _module.ParamInfo _module.MaxPotentialBlockSizeOccupancyResult + :template: autosummary/cyclass.rst + + _device.DeviceProperties + _memory._ipc.IPCAllocationHandle + _memory._ipc.IPCBufferDescriptor + CUDA protocols -------------- diff --git a/cuda_core/docs/source/conf.py b/cuda_core/docs/source/conf.py index e5136e040a..eaf18be925 100644 --- a/cuda_core/docs/source/conf.py +++ b/cuda_core/docs/source/conf.py @@ -51,6 +51,12 @@ # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [] +# Include object entries (methods, attributes, etc.) in the table of contents +# This enables the "On This Page" sidebar to show class methods and properties +# Requires Sphinx 5.1+ +toc_object_entries = True +toc_object_entries_show_parents = "domain" + # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for @@ -67,6 +73,10 @@ "version-switcher", "navbar-nav", ], + # Use custom secondary sidebar that includes autodoc entries + "secondary_sidebar_items": ["page-toc"], + # Show more TOC levels by default + "show_toc_level": 3, } if os.environ.get("CI"): if int(os.environ.get("BUILD_PREVIEW", 0)): diff --git a/cuda_pathfinder/docs/source/conf.py b/cuda_pathfinder/docs/source/conf.py index 151e86b284..ac795ff368 100644 --- a/cuda_pathfinder/docs/source/conf.py +++ b/cuda_pathfinder/docs/source/conf.py @@ -54,6 +54,12 @@ # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [] +# Include object entries (methods, attributes, etc.) in the table of contents +# This enables the "On This Page" sidebar to show class methods and properties +# Requires Sphinx 5.1+ +toc_object_entries = True +toc_object_entries_show_parents = "domain" + # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for @@ -70,6 +76,10 @@ "version-switcher", "navbar-nav", ], + # Use custom secondary sidebar that includes autodoc entries + "secondary_sidebar_items": ["page-toc"], + # Show more TOC levels by default + "show_toc_level": 3, } if os.environ.get("CI"): if int(os.environ.get("BUILD_PREVIEW", 0)): diff --git a/cuda_python/docs/source/conf.py b/cuda_python/docs/source/conf.py index 7f3571c32d..b01cf6b2e0 100644 --- a/cuda_python/docs/source/conf.py +++ b/cuda_python/docs/source/conf.py @@ -47,6 +47,12 @@ # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [] +# Include object entries (methods, attributes, etc.) in the table of contents +# This enables the "On This Page" sidebar to show class methods and properties +# Requires Sphinx 5.1+ +toc_object_entries = True +toc_object_entries_show_parents = "domain" + # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for @@ -63,6 +69,10 @@ "version-switcher", "navbar-nav", ], + # Use custom secondary sidebar that includes autodoc entries + "secondary_sidebar_items": ["page-toc"], + # Show more TOC levels by default + "show_toc_level": 3, } if os.environ.get("CI"): if int(os.environ.get("BUILD_PREVIEW", 0)):