Skip to content

Commit

Permalink
docs fix: another attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
Sceki committed Nov 25, 2024
1 parent 1e82441 commit d0cf779
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 22 deletions.
32 changes: 11 additions & 21 deletions doc/_templates/custom-class-template.rst
Original file line number Diff line number Diff line change
@@ -1,35 +1,25 @@
{{ fullname | escape | underline}}
{{ fullname | escape | underline }}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:members:
:special-members: __init__, __call__

{% block methods %}
{# We go through this circumlocution because __call__ for some reason #}
{# does not show up in the list of methods, only in the list of members. #}
{# If we do not do this, the full documentation of __call__ will show up, #}
{# but its entry in autosummary will not. #}
{% if methods or '__call__' in members %}
.. rubric:: {{ _('Methods') }}
.. rubric:: Methods

.. autosummary::
.. autosummary::
{% for item in members %}
{% if item in methods or item == '__call__' %}
{% if item not in parent_members %}
~{{ name }}.{{ item }}
{% endif %}
{%- endfor %}
{% endif %}
{% endblock %}
{% endfor %}

{% block attributes %}
{% if attributes %}
.. rubric:: {{ _('Attributes') }}
.. rubric:: Attributes

.. autosummary::
.. autosummary::
{% for item in attributes %}
~{{ name }}.{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
{% if item not in parent_attributes %}
~{{ name }}.{{ item }}
{% endif %}
{% endfor %}
3 changes: 2 additions & 1 deletion doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ $\partial$SGP4 API
newton_method
sgp4init
sgp4init_batch
mldsgp4

.. autosummary::
:toctree: _autosummary
:toctree: _autosummary/
:template: custom-class-template.rst

mldsgp4.mldsgp4

0 comments on commit d0cf779

Please sign in to comment.