Skip to content

Commit 3c1fa04

Browse files
Added few more templates, made them generate pages for attributes and methods of Cython classes
1 parent 067ccfb commit 3c1fa04

File tree

3 files changed

+54
-2
lines changed

3 files changed

+54
-2
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{{ fullname | escape | underline}}
2+
3+
.. currentmodule:: {{ module }}
4+
5+
.. autoclass:: {{ name }}
6+
{% block methods %}
7+
8+
{% if methods %}
9+
.. rubric:: {{ _('Methods') }}
10+
11+
.. autosummary::
12+
:toctree: generated
13+
{% for item in methods if item != "__init__" or name == "SyclTimer" %}
14+
~{{ name }}.{{ item }}
15+
{%- endfor %}
16+
{% endif %}
17+
{% endblock %}
18+
19+
{% block attributes %}
20+
{% if attributes %}
21+
.. rubric:: {{ _('Attributes') }}
22+
23+
.. autosummary::
24+
:toctree: generated
25+
{% for item in attributes %}
26+
~{{ name }}.{{ item }}
27+
{%- endfor %}
28+
{% endif %}
29+
{% endblock %}

docs/doc_sources/_templates/autosummary/usmmemory.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,22 @@
1212
.. rubric:: {{ _('Methods') }}
1313

1414
.. autosummary::
15+
:toctree: generated
1516
{% for item in methods %}
1617
~{{ name }}.{{ item }}
1718
{%- endfor %}
1819
{% endif %}
1920
{% endblock %}
2021

21-
:special-members: __sycl_usm_array_interface__
22-
2322
{% block attributes %}
2423
{% if attributes %}
2524
.. rubric:: {{ _('Attributes') }}
2625

2726
.. autosummary::
27+
:toctree: generated
2828
{% for item in attributes %}
2929
~{{ name }}.{{ item }}
3030
{%- endfor %}
31+
~{{name}}.__sycl_usm_array_interface__
3132
{% endif %}
3233
{% endblock %}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{% if READTHEDOCS or display_lower_left %}
2+
{# Add rst-badge after rst-versions for small badge style. #}
3+
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
4+
<span class="rst-current-version" data-toggle="rst-current-version">
5+
<span class="fa fa-book"> Other versions</span>
6+
v: {{ current_version }}
7+
<span class="fa fa-caret-down"></span>
8+
</span>
9+
<div class="rst-other-versions">
10+
{% if versions|length >= 1 %}
11+
<dl>
12+
<dt>{{ _('Versions') }}</dt>
13+
{% for slug, url in versions %}
14+
{% if slug == current_version %} <strong> {% endif %}
15+
<dd><a href="{{ url }}">{{ slug }}</a></dd>
16+
{% if slug == current_version %} </strong> {% endif %}
17+
{% endfor %}
18+
</dl>
19+
{% endif %}
20+
</div>
21+
</div>
22+
{% endif %}

0 commit comments

Comments
 (0)