Skip to content

Commit b2d165f

Browse files
committed
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.
1 parent 18fe7df commit b2d165f

File tree

7 files changed

+46
-52
lines changed

7 files changed

+46
-52
lines changed

cuda_bindings/docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
# This enables the "On This Page" sidebar to show class methods and properties
5858
# Requires Sphinx 5.1+
5959
toc_object_entries = True
60-
toc_object_entries_show_parents = "hide"
60+
toc_object_entries_show_parents = "domain"
6161

6262
# -- Options for HTML output -------------------------------------------------
6363

cuda_core/docs/source/_templates/autosummary/class.rst

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,18 @@
77

88
.. autoclass:: {{ objname }}
99

10-
{% block methods %}
11-
{% if methods %}
12-
{% for item in methods %}
13-
.. automethod:: {{ objname }}.{{ item }}
10+
{% block methods %}
11+
{% if methods %}
12+
{% for item in methods %}
13+
.. automethod:: {{ item }}
14+
{%- endfor %}
15+
{% endif %}
16+
{% endblock %}
1417

15-
{%- endfor %}
16-
{% endif %}
17-
{% endblock %}
18-
19-
{% block attributes %}
20-
{% if attributes %}
21-
{% for item in attributes %}
22-
.. autoproperty:: {{ objname }}.{{ item }}
23-
24-
{%- endfor %}
25-
{% endif %}
26-
{% endblock %}
18+
{% block attributes %}
19+
{% if attributes %}
20+
{% for item in attributes %}
21+
.. autoproperty:: {{ item }}
22+
{%- endfor %}
23+
{% endif %}
24+
{% endblock %}

cuda_core/docs/source/_templates/autosummary/cyclass.rst

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,18 @@
77

88
.. autoclass:: {{ objname }}
99

10-
{% block methods %}
11-
{% if methods %}
12-
{% for item in methods %}
13-
.. automethod:: {{ objname }}.{{ item }}
10+
{% block methods %}
11+
{% if methods %}
12+
{% for item in methods %}
13+
.. automethod:: {{ item }}
14+
{%- endfor %}
15+
{% endif %}
16+
{% endblock %}
1417

15-
{%- endfor %}
16-
{% endif %}
17-
{% endblock %}
18-
19-
{% block attributes %}
20-
{% if attributes %}
21-
{% for item in attributes %}
22-
.. autoattribute:: {{ objname }}.{{ item }}
23-
24-
{%- endfor %}
25-
{% endif %}
26-
{% endblock %}
18+
{% block attributes %}
19+
{% if attributes %}
20+
{% for item in attributes %}
21+
.. autoattribute:: {{ item }}
22+
{%- endfor %}
23+
{% endif %}
24+
{% endblock %}

cuda_core/docs/source/_templates/autosummary/protocol.rst

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,18 @@
77

88
.. autoprotocol:: {{ objname }}
99

10-
{% block methods %}
11-
{% if methods %}
12-
{% for item in methods %}
13-
.. automethod:: {{ objname }}.{{ item }}
10+
{% block methods %}
11+
{% if methods %}
12+
{% for item in methods %}
13+
.. automethod:: {{ item }}
14+
{%- endfor %}
15+
{% endif %}
16+
{% endblock %}
1417

15-
{%- endfor %}
16-
{% endif %}
17-
{% endblock %}
18-
19-
{% block attributes %}
20-
{% if attributes %}
21-
{% for item in attributes %}
22-
.. autoproperty:: {{ objname }}.{{ item }}
23-
24-
{%- endfor %}
25-
{% endif %}
26-
{% endblock %}
18+
{% block attributes %}
19+
{% if attributes %}
20+
{% for item in attributes %}
21+
.. autoproperty:: {{ item }}
22+
{%- endfor %}
23+
{% endif %}
24+
{% endblock %}

cuda_core/docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# This enables the "On This Page" sidebar to show class methods and properties
5656
# Requires Sphinx 5.1+
5757
toc_object_entries = True
58-
toc_object_entries_show_parents = "hide"
58+
toc_object_entries_show_parents = "domain"
5959

6060
# -- Options for HTML output -------------------------------------------------
6161

cuda_pathfinder/docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
# This enables the "On This Page" sidebar to show class methods and properties
5959
# Requires Sphinx 5.1+
6060
toc_object_entries = True
61-
toc_object_entries_show_parents = "hide"
61+
toc_object_entries_show_parents = "domain"
6262

6363
# -- Options for HTML output -------------------------------------------------
6464

cuda_python/docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
# This enables the "On This Page" sidebar to show class methods and properties
5252
# Requires Sphinx 5.1+
5353
toc_object_entries = True
54-
toc_object_entries_show_parents = "hide"
54+
toc_object_entries_show_parents = "domain"
5555

5656
# -- Options for HTML output -------------------------------------------------
5757

0 commit comments

Comments
 (0)