Documentation --------------- .. role:: python(code) :language: python :class: highlight .. role:: bash(code) :language: bash :class: highlight Overview _______________________ The documentation should contain information about the project, its usage as well as implementation and programming details. All should be presented as easily navigable webpage which includes figures, equations and code snippets. To allow for a simple and up-to-date code reference the process should be automatic, by generating it from `typing hints `_ and `docstrings `_. Workflow _______________________ The `gen_docs.yml `_ action compiles the documentation and publishes it in the `gh-pages `__ branch. The `pages-build-deployment `_ action deploys the documentation on the website. Internally the workflow executes the :bash:`docs` environment for `tox `_ (see the :ref:`tox file `), which builds the documentation with the help of `Sphinx `_. The steps also include an automatic generation of a changelog, source file toctree and sitemap. Documentation Generation __________________________________ The documentation is created with `Sphinx `_, which uses `reStructuredText `_ as markup language. The html builder of Sphinx compiles a webpage including the self-written documentation, automatically generated code information, as well as indices for searching. The following extensions are used: .. list-table:: :align: left * - `doctest `_ - automatic testing of documentation code examples * - `autodoc `_ - automatic source code documentation generation * - `intersphinx `_ - linking to the documentation of external packages * - `mathjax `_ - LaTeX equations * - `sphinxcontrib.bibtex `_ - bibliography management * - `Shibuya Sphinx Theme `_ - A modern looking theme * - `Sphinx Sitemap `_ - Generate sitemaps while building the documentation * - `Sphinx Mathjax Offline `_ - Provides the mathjax js and font files without having to rely on an external CDN * - `sphinx-notfound-page `_ - Fixes some issues with 404 pages Additionally, a custom css (`docs/source/_static/css/custom.css `_) adapts the formatting to our needs. Documentation source files can be found under `docs/source/ `_ The Sphinx configuration can be found below. **Content of** `docs/source/conf.py `_ .. literalinclude:: ../conf.py :linenos: