This directory contains the Sphinx documentation for the kernelfoundry package.
Install the documentation dependencies:
pip install .[docs]Or install the required packages directly:
pip install sphinx sphinx-rtd-themeYou also need to install the package dependencies (numpy, pytest) for the autodoc extension to import the modules:
pip install numpy pytestTo build the HTML documentation:
cd docs
make htmlThe generated HTML documentation will be in _build/html/. Open _build/html/index.html in your browser to view the documentation.
To remove all generated documentation files:
cd docs
make cleanSphinx supports multiple output formats. To see all available formats:
cd docs
make helpSome useful formats include:
make html- HTML documentation (default)make singlehtml- Single HTML pagemake latexpdf- PDF documentation (requires LaTeX)make epub- EPUB documentation
conf.py- Sphinx configuration fileindex.rst- Main documentation indexapi/- API reference documentation_static/- Static files (CSS, images, etc.)_templates/- Custom Sphinx templates_build/- Generated documentation (excluded from git)
The kernelfoundry package uses Google-style docstrings. When adding or modifying code, please follow this format:
def example_function(arg1, arg2):
"""Brief description of the function.
More detailed description if needed.
Args:
arg1 (type): Description of arg1.
arg2 (type): Description of arg2.
Returns:
type: Description of return value.
Raises:
ExceptionType: Description of when this exception is raised.
"""
passFor more information on Google-style docstrings, see: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html