For developpers#

Documentation style#

The following documentation is built with PyData Sphinx Theme and uses the NumPy documentation style. Here are important points to have in mind if you want to contribute to the documentation :

  • Read the NumPy documentation style guide

  • Classes documentation .rst files are generated using Jinja2 template engine. The template is written in class_template.rst of the doc/source/_templates. A guide to Jinja2 templating is given in Sphinx autosummary documentation. Basically, one can catch usefull variables like methods and create nice autosummary tables inside an autoclass. We chose this style because it creates very clean and comprehension interface documentation of the class.

  • Take a special care to attributes class documentation. Sphinx does not handle attribute instances easily, especially when they are inherited. One must reference them manually in the object class under the Attributes field of the docstring. As it is mentionned in NumPy documentation style guide, property methods (getter and/or setter) can be listed there. Their attached docstring will be loaded automatically. One more thing, some IDE (like PyCharm) may raise warnings about unreferenced variables. It is a bug… ignore or disable it at the statement level.