You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've been trying out this tool on a couple of projects where I'm trying to simplify and consolidate the documentation procedure and it's been working quite well.
However, I've run into a small issue with a part of the code involving generation of inheritance diagrams where it appears that the jinja templating is expanding into invalid rst, resulting in the following warning:
WARNING: Explicit markup ends without a blank line; unexpected unindent.
.. py:class:: Prompt(completekey='tab', stdin=None, stdout=None)
Bases: :class:`cmd.Cmd`
.. autoapi-inheritance-diagram:: common.prompt.Prompt:parts: 1
:private-bases:
Class defining command line interface prompt.
.. note :: This is a base class and it can (should) be extended
which results in the following docs (using sphinx-rtd-theme)
and here is what I would expect it to look like:
.. py:class:: Prompt(completekey='tab', stdin=None, stdout=None)
Bases: :class:`cmd.Cmd`
.. autoapi-inheritance-diagram:: common.prompt.Prompt:parts: 1
:private-bases:
Class defining command line interface prompt.
.. note :: This is a base class and it can (should) be extended
If I modify the autoapi/templates/python/classes.rst template I can get the expected behaviour (but I'm not an expert in jinja template syntax, so I don't know if it is the "correct" way to fix the root issue)
14c14,16< {% if "private-members" in autoapi_options %}:private-bases:{% endif %}---> {% if "private-members" in autoapi_options %}> :private-bases:> {% endif %}
which results in:
I am working with an older code base, so using python 2.7, but I did a minimal change to fix print statements and was able to obtain the same result with python 3.8 (both in a conda environment).
For the python 2.7 env, the package versions are (removed other matches, but can add them if you think it's relevant):
Hi, I've been trying out this tool on a couple of projects where I'm trying to simplify and consolidate the documentation procedure and it's been working quite well.
However, I've run into a small issue with a part of the code involving generation of inheritance diagrams where it appears that the jinja templating is expanding into invalid rst, resulting in the following warning:
Here is the configuration I'm using:
And here is an example of the generated rst:
which results in the following docs (using
sphinx-rtd-theme
)and here is what I would expect it to look like:
If I modify the
autoapi/templates/python/classes.rst
template I can get the expected behaviour (but I'm not an expert in jinja template syntax, so I don't know if it is the "correct" way to fix the root issue)which results in:
I am working with an older code base, so using python 2.7, but I did a minimal change to fix
print
statements and was able to obtain the same result with python 3.8 (both in aconda
environment).For the python 2.7 env, the package versions are (removed other matches, but can add them if you think it's relevant):
and for the python 3.8 env, the package versions are:
Please let me know if any additional information would be helpful.
The text was updated successfully, but these errors were encountered: