forked from cuinixam/python-app-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconf.py
More file actions
96 lines (75 loc) · 2.89 KB
/
conf.py
File metadata and controls
96 lines (75 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# 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
import datetime
import sys
from pathlib import Path
import mlx.traceability
project_root_path = Path(__file__).parent.parent
for path in ["src", "tests"]:
sys.path.insert(0, project_root_path.joinpath(path).as_posix())
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = "Python App Development"
copyright = f"2023-{datetime.datetime.now().year}, cuinixam"
author = "cuinixam"
release = "2.12.1"
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = []
# https://github.com/executablebooks/sphinx-design
extensions.append("sphinx_design")
# https://myst-parser.readthedocs.io/en/latest/intro.html
extensions.append("myst_parser")
myst_enable_extensions = [
"colon_fence",
"deflist",
"html_admonition",
"html_image",
]
# TODO: enable this extension when is is supported by readthedocs
# draw.io config - @see https://pypi.org/project/sphinxcontrib-drawio/
# extensions.append("sphinxcontrib.drawio")
# drawio_default_transparency = True
# mermaid config - @see https://pypi.org/project/sphinxcontrib-mermaid/
extensions.append("sphinxcontrib.mermaid")
# Configure extensions for include doc-strings from code
extensions.extend(
[
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
]
)
# mlx.traceability config - https://pypi.org/project/mlx-traceability/
extensions.append("mlx.traceability")
# Make relationship like 'validated_by' be shown for each requirement
traceability_render_relationship_per_item = True
traceability_collapse_links = True
# The suffix of source filenames.
source_suffix = [".md", ".rst"]
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
# copy button for code block
extensions.append("sphinx_copybutton")
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = "sphinx_book_theme"
html_theme_options = {
"home_page_in_toc": True,
"github_url": "https://github.com/cuinixam/python-app-dev",
"repository_url": "https://github.com/cuinixam/python-app-dev",
"repository_branch": "main",
"path_to_docs": "docs",
"use_repository_button": True,
"use_edit_page_button": True,
"use_issues_button": True,
"navigation_with_keys": False,
}
html_last_updated_fmt = ""
html_static_path = [
Path(mlx.traceability.__file__).parent.joinpath("assets").as_posix(),
"_static",
]