gallium.toolkit.docs¶
Provides a tool to simply generate a documentation from the source code.
Note
This is designed to work with Sphinx.
There are two command lines available from this module.
python3 -m gallium.toolkit.docs setupfor setting up the Sphinx docs.python3 -m gallium.toolkit.docs buildfor automatically compiling documentation from the source code and generating the static site.
To make sure that the build command works, you will need to update Sphinx’s conf.py.
Add the path of the target module to python path. See the top of conf.py on how to do it, for example:
import os import sys sys.path.insert(0, os.path.abspath('..'))
Add
sphinx.ext.autodoctoextensions, for example:extensions = ['sphinx.ext.autodoc']
- gallium.toolkit.docs.build(path_to_doc_source: str, path_to_doc_destination: str, module_name: Optional[str] = None, source_dir: Optional[str] = None, full_build: Optional[bool] = False)¶
Build the documentation
- gallium.toolkit.docs.setup(path: str)¶
Set up a simple Sphinx doc project