-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconf.py
More file actions
executable file
·88 lines (72 loc) · 2.36 KB
/
Copy pathconf.py
File metadata and controls
executable file
·88 lines (72 loc) · 2.36 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
#!/usr/bin/env python3
"""
Configuration for Sphinx.
"""
import datetime
import importlib.metadata
project = "VWS-Python-Mock"
author = "Adam Dangoor"
extensions = [
"sphinx_copybutton",
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
"sphinx_paramlinks",
"sphinx_substitution_extensions",
"sphinxcontrib.spelling",
"sphinxcontrib.autohttp.flask",
"sphinx_toolbox.more_autodoc.autoprotocol",
"enum_tools.autoenum",
]
templates_path = ["_templates"]
source_suffix = ".rst"
master_doc = "index"
year = datetime.datetime.now(tz=datetime.UTC).year
project_copyright = f"{year}, {author}"
# Exclude the prompt from copied code with sphinx_copybutton.
# https://sphinx-copybutton.readthedocs.io/en/latest/use.html#automatic-exclusion-of-prompts-from-the-copies.
copybutton_exclude = ".linenos, .gp"
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# Use ``importlib.metadata.version`` as per
# https://setuptools-scm.readthedocs.io/en/latest/usage/#usage-from-sphinx.
version = importlib.metadata.version(distribution_name=project)
_month, _day, _year, *_ = version.split(sep=".")
release = f"{_month}.{_day}.{_year}"
language = "en"
# The name of the syntax highlighting style to use.
pygments_style = "sphinx"
python_minimum_supported_version = "3.12"
# Output file base name for HTML help builder.
htmlhelp_basename = "VWSPYTHONMOCKdoc"
autoclass_content = "init"
intersphinx_mapping = {
"python": (
f"https://docs.python.org/{python_minimum_supported_version}",
None,
),
"docker": ("https://docker-py.readthedocs.io/en/stable", None),
}
nitpicky = True
warning_is_error = True
html_theme = "furo"
html_title = project
html_show_copyright = False
html_show_sphinx = False
html_show_sourcelink = False
html_theme_options = {
"sidebar_hide_name": False,
}
# Retry link checking to avoid transient network errors.
linkcheck_retries = 5
spelling_word_list_filename = "../../spelling_private_dict.txt"
autodoc_member_order = "bysource"
rst_prolog = f"""
.. |python-minimum-version| replace:: {python_minimum_supported_version}
.. |project| replace:: {project}
.. |release| replace:: {release}
.. |github-owner| replace:: VWS-Python
.. |github-repository| replace:: vws-python-mock
"""