Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix autosummary template #297

Merged
merged 2 commits into from
Jul 30, 2024
Merged

Fix autosummary template #297

merged 2 commits into from
Jul 30, 2024

Conversation

flying-sheep
Copy link
Member

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

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 %}

Copy link

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
6 of 7 checks passed
@flying-sheep flying-sheep deleted the fix-autosummary branch July 30, 2024 07:13
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