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

Sphinx directives are no longer hooked into sphinx.ext.autodoc #3689

Open
greschd opened this issue Dec 19, 2019 · 4 comments · Fixed by #4470
Open

Sphinx directives are no longer hooked into sphinx.ext.autodoc #3689

greschd opened this issue Dec 19, 2019 · 4 comments · Fixed by #4470

Comments

@greschd
Copy link
Member

greschd commented Dec 19, 2019

The AiiDA sphinx extension previously supported just using .. automodule::, by hooking into sphinx.ext.autodoc. This no longer works, as can be seen by this part of the test / demo documentation:

image

It should also be checked if there is a way to turn it off. For example https://github.com/lsmo-epfl/aiida-lsmo/blob/develop/docs/source/apidoc/aiida_lsmo.rst currently uses automodule, and I'm not sure if the intended behavior is the "regular" class documentation or not.

@chrisjsewell
Copy link
Member

Despite an initial fix in #4470, this issue remains open because currently the directive is written in such a way that it does not allow for the auto-documented objects to be referenced in the same or a similar way as they now can with :py:class: or :py:meth:.
This is because the AiidaProcessDocumenter overwrites their assignment as a class object, but does not similarly store an object on the py domain.

@chrisjsewell
Copy link
Member

Basically, I believe it requires a bit of a re-write to achieve this.

@greschd
Copy link
Member Author

greschd commented Oct 20, 2020

It should also be checked if there is a way to turn it off.

This definitely still applies - for example the CalcJob and WorkChain themselves are probably meant to be documented like a "regular" class.

@chrisjsewell
Copy link
Member

Oh and also, as mentioned in #3300 (comment) the actual docstrings need to be nested parsed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants