Skip to content

Update docstrings to conform sphinx rst

Vicentini Filippo requested to merge sphinx into v2.1

Created by: gcarleo

This PR addresses the issues and limitations related to maintaining a custom-based solution for documentation (see for example #216 (closed), as well as the complexity of the jekyll-based current website).

We now switch to a sphinx-based system, where docstrings are still written (as before) in Google style. The only main difference is that math formulas are now to be written using sphinx's math enviroment .

Docs for new classes however are very easy to add, using the sphinx facilities. The only requirement is to add entries to Docs/source/documentation.rst. For example:

Operators
----------------

.. autosummary::
   :toctree: modules
   :nosignatures:

   netket.operator.BoseHubbard
   netket.operator.GraphOperator
   netket.operator.LocalOperator
   netket.operator.Ising
   netket.operator.Heisenberg

fully specifies documentations for operators.

The web pages can be built going in Docs and doing make html (after having installed all the required sphinx extension).

At present, there are some small inconsistencies in the web page rendering. Mostly in the main page (help is appreciated!!!). This happens mostly because support of bootstrap in sphynx is not complete, and one needs to use raw html in most pages.

Notice that files in source/modules/ are produced automatically by the autosummary extension and shouldn't be modified manually

Merge request reports