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 extensions for workflow documentation. #721

Closed
greschd opened this issue Sep 26, 2017 · 5 comments
Closed

Sphinx extensions for workflow documentation. #721

greschd opened this issue Sep 26, 2017 · 5 comments
Assignees
Labels
Milestone

Comments

@greschd
Copy link
Member

greschd commented Sep 26, 2017

To allow auto-generating documentation for workchain inputs / outputs, it would be neat to develop a small Sphinx extension (see doc: http://www.sphinx-doc.org/en/stable/extdev/index.html#dev-extensions).

The idea is to have a restructuredText command like

.. aiidaworkchain:: my_plugin.work.MyWorkChain

that looks up the inputs / outputs (and whatever else we want to display) from the spec and creates a nice little documentation.

It probably makes sense to put this in a separate repository / module, like sphinx.ext.aiida.

@greschd
Copy link
Member Author

greschd commented Sep 28, 2017

Note: I'm starting to work on this here: https://github.com/greschd/sphinx-aiida

@greschd
Copy link
Member Author

greschd commented Oct 6, 2017

Ok, I finished a simple implementation of the workchain documentation directive. The command

.. aiida-workchain:: demo_workchain.DemoWorkChain

produces

image

@giovannipizzi I propose to move this into aiida_core, as aiida_core.sphinxext. Initially I thought it would be better to have a separate repository, but it seems other projects (matplotlib, bokeh, ...) also keep their Sphinx extensions in the main repo. The advantage is that it can be more easily kept in sync with changes in aiida_core. What do you think about this?

@giovannipizzi
Copy link
Member

Looks great! Agreed, for me (should be put the extensions into the docs subfolder? Or is should be importable as aiida.xxx?)

@greschd
Copy link
Member Author

greschd commented Oct 6, 2017

Exactly, it should be importable as aiida.sphinxext, so that it can also be used from plugin docs.

@sphuber
Copy link
Contributor

sphuber commented Feb 20, 2018

Fixed in PR #1155

@sphuber sphuber closed this as completed Feb 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants