Docs
Created by: gcarleo
This PR introduces the tools necessary to extract the documentation from pybind-generated python classes. (see also issue #130 (closed))
These tools are heavily based on this project, and @ooreilly has played an important role in adapting his library to work with pybind11 generated docs. Thank you!
The tools are in /Docs
and can be used from command line. For example, to generate markdown docs for a given NetKet class, one can do:
python3 make_class_docs.py netket.graph.Hypercube > test.md
Notice that pytablewriter is needed, and can be easily installed with pip install pytablewriter
.
At the moment we only have docs for netket.graph
classes. Generated markdown documentation can be found in Docs/Graph/
, for example here
TODO:
- The tool
format.py
is not taking into account class functions (it only formats the constructors and class members). Extending it to class-bound functions should be straightforward. - NetKet website will use these markdown files to build the doc pages here
Action item
We need to add documentation for all the other classes. Please volounteer to provide documentation for a few NetKet classes, so that we can quickly move to the final release!
The documentation should follow the Google docstring format, as done for example in NetKet/Graph/pygraph.hpp