ewokssphinx#
A set of Sphinx directives for Ewoks
Quick start#
pip install ewokssphinx
Then, add ewokssphinx to the list of extensions in the Sphinx configuration file:
# conf.py
...
extensions = [
...,
"ewokssphinx"
]
Contents#
There is only one directive for now.
Ewoks tasks directive#
Basic use#
The ewokstasks directive will generate documentation automatically for all Ewoks tasks (be it class, method or ppfmethod) contained in the module. As for autodoc, the module must be importable.
Example:
.. ewokstasks:: ewoksxrpd.tasks.integrate
It is also possible to give a pattern for recursive generation. For example, The following command will generate documentation for all tasks contained in the modules of ewoksxrpd.tasks:
.. ewokstasks:: ewoksxrpd.tasks.*
Caution
The ewokstasks directive adds the name of the tasks as title. That means it may break the title order and hierarchy of the document if placed in another directive (admonition or other). This may lead to errors in the generation of table of contents, for example.
Therefore, the safest use of the directive is to place it in the main section of the document.
See also
The Examples page contains real examples with Python code, RST syntax and the associated Sphinx output for all task types.
Options#
:task-type:: (class,methodorppfmethod)Generates documentation only for the specified task type.
Example:
To generate documentation for the Ewoks class tasks in
ewoksxrpd.tasks.integrate:.. ewokstasks:: ewoksxrpd.tasks.integrate :task-type: class
:ignore-import-error:Print a warning instead of raising an error when an import fails.
Example:
.. ewokstasks:: ewoksxrpd.tasks.integrate :ignore-import-error: