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

BUG? Autosummary methods missing in Sphinx 1.6 #3900

Closed
christianbrodbeck opened this issue Jun 29, 2017 · 7 comments
Closed

BUG? Autosummary methods missing in Sphinx 1.6 #3900

christianbrodbeck opened this issue Jun 29, 2017 · 7 comments

Comments

@christianbrodbeck
Copy link

Since Sphinx 1.6 methods seem to be missing from class documentation generated with autosummary. I use a file with contents like below as autosummary/class.rst. Methods are properly documented on Sphinx 1.5.6, but not on 1.6.1 and 1.6.2 (conda). If I insert {{ methods }} into the template, the docs display an empty list([]) with 1.6 and a list of method names in 1.5.

{{ fullname | escape | underline  }}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
   

{% block methods %}

Methods
-------

.. autosummary::
   :toctree:

{% for item in methods %}
   {%- if not item.startswith('_') or item in ['__call__'] %}
   ~{{ name }}.{{ item }}
   {%- endif -%}
{%- endfor %}
{% endblock %}
@tk0miya
Copy link
Member

tk0miya commented Jun 30, 2017

Could you share any example and procedure?
It's hard to reproduce this for me because I'm beginner of autosummary...

@christianbrodbeck
Copy link
Author

Here is a minimal project that reproduces the problem (building with conda Sphinx 1.5.6 vs 1.6.2). Make sure to delete the doc/generated when changing version.

@tk0miya
Copy link
Member

tk0miya commented Jul 2, 2017

Thanks, I confirmed the issue. This comes from #3235.
I'll try to fix this later.

@tk0miya
Copy link
Member

tk0miya commented Jul 2, 2017

Fixed at b3e0e29.
Thank you for reporting!

@tk0miya tk0miya closed this as completed Jul 2, 2017
@christianbrodbeck
Copy link
Author

christianbrodbeck commented Jul 2, 2017 via email

@jorisvandenbossche
Copy link
Contributor

The exact same thing happens for Attributes (eg if you want to include automatically a list of the attributes in a class template, as done for methods in the example above).
Can you 'attributes' be special cased as well (with a similar fix as the one that closed this issue?)

@jorisvandenbossche
Copy link
Contributor

I see this is already reported in #4058 as well (although that has a broader scope)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants