We generate API documentation using Sphinx and AutoAPI on RPi Raspbian system.
-
Clone this repo
cd git clone https://github.com/Seeed-Studio/grove.py.git
-
Install this repo, refer to installation
-
Install tool packages
sudo apt-get install python-sphinx python3-sphinx graphviz sudo pip install autoapi sphinx-rtd-theme sudo pip3 install autoapi sphinx-rtd-theme
Please document the code follow the style autoapi, but Google and NumPy style is prefer.
In the python docstring, reStructuredTexat grammar could be used, will generate the contents except API part.
-
Export working copy to PYTHONPATH
To get the lastest document specific to working copy (if you have some changes to the python source/docstring).
cd ~/grove.py; export PYTHONPATH=`pwd`
Without this setting, you could only get the document for the installed one of package grove.py.
-
Run make, then the document htmls will be under folder ~/grove.py/docs/
cd ~/grove.py make -C sphinx html
-
Open ~/grove.py/docs/index.html by browser to see result.
Push all contents under ~/grove.py/docs to branch gh-pages of this repo.