Newer
Older
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
import os
import sys
sys.path.insert(0, os.path.abspath(".."))
# read the version from version.txt
with open(os.path.join("../sample_project_ivi", "version.txt"), encoding="utf-8") as file_handler:
__version__ = file_handler.read().strip()
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
"sphinx.ext.autodoc", # for autodoc
"sphinx.ext.autosummary", # for autosummary
"sphinx.ext.viewcode", # for source code
"sphinx.ext.napoleon", # for google style docstrings
"sphinx_autodoc_typehints", # for type hints
"sphinx_copybutton", # for copy button
"sphinx-prompt", # for prompt
"recommonmark", # for markdown
]
# source suffix
source_suffix = [".rst", ".md"]
# The master toctree document.
master_doc = "index"
language = "en"
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = "alabaster"
html_static_path = ["_static"]
# autodoc
autodoc_typehints = "description"
autodoc_inherit_docstrings = True
autodoc_preserve_defaults = True
autodoc_default_options = {
"members": True,
"member-order": "bysource",
"special-members": "__init__",
"undoc-members": True,
"private-members": True,
"exclude-members": "__weakref__",
"show-inheritance": True,
"inherited-members": True,
"ignore-module-all": True,
}
# syntax highlighting
pygments_style = "sphinx"
highlight_language = "python3"
# napoleon
napoleon_numpy_docstring = True