|
| 1 | +# Configuration file for the Sphinx documentation builder. |
| 2 | +# |
| 3 | +# This file only contains a selection of the most common options. For a full |
| 4 | +# list see the documentation: |
| 5 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html |
| 6 | + |
| 7 | +# -- Path setup -------------------------------------------------------------- |
| 8 | + |
| 9 | +# If extensions (or modules to document with autodoc) are in another directory, |
| 10 | +# add these directories to sys.path here. If the directory is relative to the |
| 11 | +# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 12 | +# pylint: disable=W,C |
| 13 | +import os |
| 14 | +import sys |
| 15 | +import toml |
| 16 | + |
| 17 | +sys.path.insert(0, os.path.abspath("../..")) |
| 18 | +toml_dict = toml.load("../../pyproject.toml") |
| 19 | + |
| 20 | + |
| 21 | +# -- Project information ----------------------------------------------------- |
| 22 | + |
| 23 | +project = toml_dict["tool"]["poetry"]["name"] |
| 24 | +copyright = f"{toml_dict['tool']['poetry']['authors'][0]}, 2021" |
| 25 | +author = ",".join(toml_dict["tool"]["poetry"]["authors"]) |
| 26 | + |
| 27 | +# The full version, including alpha/beta/rc tags |
| 28 | +release = toml_dict["tool"]["poetry"]["version"] |
| 29 | + |
| 30 | + |
| 31 | +# -- General configuration --------------------------------------------------- |
| 32 | + |
| 33 | +# Add any Sphinx extension module names here, as strings. They can be |
| 34 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 35 | +# ones. |
| 36 | +extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "m2r2"] |
| 37 | + |
| 38 | +autodoc_default_options = { |
| 39 | + "members": True, |
| 40 | + "show-inheritance": True, |
| 41 | + "special-members": "__init__", |
| 42 | + "undoc-members": True, |
| 43 | +} |
| 44 | + |
| 45 | + |
| 46 | +# Add any paths that contain templates here, relative to this directory. |
| 47 | +templates_path = ["_templates"] |
| 48 | + |
| 49 | +# The suffix(es) of source filenames. |
| 50 | +# You can specify multiple suffix as a list of string: |
| 51 | +# |
| 52 | +# source_suffix = ['.rst', '.md'] |
| 53 | +source_suffix = ".rst" |
| 54 | + |
| 55 | +# The master toctree document. |
| 56 | +master_doc = "index" |
| 57 | + |
| 58 | +# The name of the Pygments (syntax highlighting) style to use. |
| 59 | +pygments_style = "sphinx" |
| 60 | + |
| 61 | +# List of patterns, relative to source directory, that match files and |
| 62 | +# directories to ignore when looking for source files. |
| 63 | +# This pattern also affects html_static_path and html_extra_path. |
| 64 | +exclude_patterns = [] |
| 65 | + |
| 66 | + |
| 67 | +# -- Options for HTML output ---------------------------------------------- |
| 68 | + |
| 69 | +# The theme to use for HTML and HTML Help pages. See the documentation for |
| 70 | +# a list of builtin themes. |
| 71 | +# |
| 72 | +html_theme = "sphinx_rtd_theme" |
| 73 | + |
| 74 | +# Theme options are theme-specific and customize the look and feel of a theme |
| 75 | +# further. For a list of options available for each theme, see the |
| 76 | +# documentation. |
| 77 | +# |
| 78 | +# html_theme_options = {} |
| 79 | + |
| 80 | + |
| 81 | +# Add any paths that contain custom static files (such as style sheets) here, |
| 82 | +# relative to this directory. They are copied after the builtin static files, |
| 83 | +# so a file named "default.css" will overwrite the builtin "default.css". |
| 84 | +html_static_path = ["_static"] |
| 85 | + |
| 86 | +html_context = { |
| 87 | + "css_files": [ |
| 88 | + "_static/theme_overrides.css", # override wide tables in RTD theme |
| 89 | + "_static/schema-page.css", # Add css from jschemer |
| 90 | + ] |
| 91 | +} |
| 92 | + |
| 93 | +html_sidebars = {"**": ["globaltoc.html", "relations.html", "sourcelink.html", "searchbox.html"]} |
0 commit comments