Skip to content

Fix autosummary template - #297

Merged
flying-sheep merged 2 commits into
mainfrom
fix-autosummary
Jul 30, 2024
Merged

flying-sheep merged 2 commits into
mainfrom
fix-autosummary

Conversation

@flying-sheep

@flying-sheep flying-sheep commented Jul 30, 2024 •

Copy link
Copy Markdown
Member

The right way to do it is

.. currentmodule:: some_mod

.. autoclass:: SomeClass

   Methods table
   ~~~~~~~~~~~~~
   .. autosummary::
      SomeClass.some_method

instead of

.. currentmodule:: some_mod

.. autoclass:: SomeClass

   Methods table
   ~~~~~~~~~~~~~
   .. autosummary::
      some_mod.SomeClass.some_method

So the template needs to be changed:

 {% for item in methods %}
-    ~{{ fullname }}.{{ item }}
+    ~{{ name }}.{{ item }}
 {%- endfor %}

@github-actions

Copy link
Copy Markdown

A PR has been generated to the instance repo:
scverse/cookiecutter-scverse-instance#137

You can check out the PR to preview your changes
in an instance of the cookiecutter template. The PR will be kept in sync with
this PR automatically.

@flying-sheep
flying-sheep merged commit 5844892 into main Jul 30, 2024
@flying-sheep
flying-sheep deleted the fix-autosummary branch July 30, 2024 07:13
This was referenced Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant