|
8 | 8 |
|
9 | 9 | from docbuild.__about__ import __version__ |
10 | 10 |
|
11 | | -project = 'docbuild' |
12 | | -copyright = '2025, Tom Schraitle' # noqa: A001 |
13 | | -author = 'Tom Schraitle' |
| 11 | +project = "docbuild" |
| 12 | +copyright = "2025, Tom Schraitle" # noqa: A001 |
| 13 | +author = "Tom Schraitle" |
14 | 14 | release = __version__ |
15 | 15 |
|
16 | | -gh_user = 'openSUSE' |
17 | | -gh_repo_url = f'https://github.com/{gh_user}/{project}' |
18 | | -gh_repo_slug = f'{gh_user}/{project}' |
| 16 | +gh_user = "openSUSE" |
| 17 | +gh_repo_url = f"https://github.com/{gh_user}/{project}" |
| 18 | +gh_repo_slug = f"{gh_user}/{project}" |
19 | 19 |
|
20 | | -xml_config_repo = 'https://gitlab.suse.de/susedoc/docserv-config' |
21 | | -xml_config_slug = '/'.join(xml_config_repo.rsplit('/', 2)[-2:]) |
| 20 | +xml_config_repo = "https://gitlab.suse.de/susedoc/docserv-config" |
| 21 | +xml_config_slug = "/".join(xml_config_repo.rsplit("/", 2)[-2:]) |
22 | 22 |
|
23 | 23 | # --- Prolog configuration |
24 | 24 | rst_prolog = f""" |
|
39 | 39 | extensions = [ |
40 | 40 | # Include documentation from docstrings |
41 | 41 | # https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html |
42 | | - 'sphinx.ext.autodoc', |
| 42 | + "sphinx.ext.autodoc", |
43 | 43 | # |
44 | 44 | # Link to other projects' documentation |
45 | 45 | # https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html |
46 | | - 'sphinx.ext.intersphinx', |
| 46 | + "sphinx.ext.intersphinx", |
47 | 47 | # |
48 | 48 | # Test code snippets in the documentation |
49 | 49 | # https://www.sphinx-doc.org/en/master/usage/extensions/doctest.html |
50 | | - 'sphinx.ext.doctest', |
| 50 | + "sphinx.ext.doctest", |
51 | 51 | # |
52 | 52 | # Create short aliases for external links |
53 | 53 | # https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html |
54 | | - 'sphinx.ext.extlinks', |
| 54 | + "sphinx.ext.extlinks", |
55 | 55 | # |
56 | 56 | # Embed Graphviz graphs |
57 | 57 | # https://www.sphinx-doc.org/en/master/usage/extensions/graphviz.html |
58 | | - 'sphinx.ext.graphviz', |
| 58 | + "sphinx.ext.graphviz", |
59 | 59 | # |
60 | 60 | # Document Click command-line interfaces |
61 | 61 | # https://sphinx-click.readthedocs.io/en/latest/ |
62 | | - 'sphinx_click', |
| 62 | + "sphinx_click", |
63 | 63 | # |
64 | 64 | # Add a "copy" button to code blocks |
65 | 65 | # https://sphinx-copybutton.readthedocs.io/en/latest/ |
66 | | - 'sphinx_copybutton', |
| 66 | + "sphinx_copybutton", |
67 | 67 | # |
68 | 68 | # Render type hints in signatures |
69 | 69 | # https://github.com/tox-dev/sphinx-autodoc-typehints |
70 | | - 'sphinx_autodoc_typehints', |
| 70 | + "sphinx_autodoc_typehints", |
71 | 71 | # |
72 | 72 | # Generate API documentation from source code |
73 | 73 | # https://sphinx-autoapi.readthedocs.io/en/latest/ |
74 | | - 'autoapi.extension', |
| 74 | + "autoapi.extension", |
75 | 75 | ] |
76 | 76 |
|
77 | | -templates_path = ['_templates'] |
| 77 | +templates_path = ["_templates"] |
78 | 78 | exclude_patterns = [] |
79 | 79 |
|
80 | | -language = 'en' |
| 80 | +language = "en" |
81 | 81 |
|
82 | 82 | # -- Options for autoapi extension |
83 | 83 | # https://sphinx-autoapi.readthedocs.io/en/latest/reference/config.html |
84 | 84 | autoapi_modules = { |
85 | | - 'docbuild': None, |
| 85 | + "docbuild": None, |
86 | 86 | # { |
87 | 87 | # # "output": "reference/_autoapi", |
88 | 88 | # # "prune": True|False, |
89 | 89 | # # "override": True|False, |
90 | 90 | # # "template": |
91 | 91 | # } |
92 | 92 | } |
93 | | -autoapi_root = 'reference/_autoapi' |
94 | | -autoapi_dirs = ['../../src/'] |
95 | | -autoapi_type = 'python' |
| 93 | +autoapi_root = "reference/_autoapi" |
| 94 | +autoapi_dirs = ["../../src/"] |
| 95 | +autoapi_type = "python" |
96 | 96 | autoapi_add_toctree_entry = False |
97 | 97 | # autoapi_template_dir = "_templates/autoapi" |
98 | 98 | autoapi_options = [ |
99 | | - 'members', |
| 99 | + "members", |
100 | 100 | # "undoc-members", |
101 | 101 | # 'inherited-members', |
102 | | - 'show-inheritance', |
103 | | - 'show-module-summary', |
| 102 | + "show-inheritance", |
| 103 | + "show-module-summary", |
104 | 104 | # 'imported-members', |
105 | | - 'special-members', |
106 | | - 'show-inheritance-diagram', # needs sphinx.ext.inheritance_diagram & graphviz |
| 105 | + "special-members", |
| 106 | + "show-inheritance-diagram", # needs sphinx.ext.inheritance_diagram & graphviz |
107 | 107 | # "private-members", |
108 | 108 | ] |
109 | 109 | autoapi_keep_files = True |
110 | | -autodoc_typehints = 'signature' |
111 | | -autoapi_own_page_level = 'class' |
112 | | -#autoapi_python_use_implicit_namespaces = True |
| 110 | +autodoc_typehints = "signature" |
| 111 | +autoapi_own_page_level = "class" |
| 112 | +# autoapi_python_use_implicit_namespaces = True |
113 | 113 |
|
114 | 114 | # -- Options for extlinks extension ------------------------------------------ |
115 | 115 | # https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html |
116 | 116 | extlinks = { |
117 | 117 | # Example for linking to a specific file/path in the repo: |
118 | | - 'gh_path': (f'{gh_repo_url}/blob/main/%s', '%s'), |
| 118 | + "gh_path": (f"{gh_repo_url}/blob/main/%s", "%s"), |
119 | 119 | # Example for linking to a specific directory in the repo: |
120 | | - 'gh_tree': (f'{gh_repo_url}/tree/main/%s', '%s'), |
| 120 | + "gh_tree": (f"{gh_repo_url}/tree/main/%s", "%s"), |
121 | 121 | # Linking to the GH issue tracker: |
122 | | - 'gh': (f'{gh_repo_url}/issues/%s', 'GH #%s'), |
| 122 | + "gh": (f"{gh_repo_url}/issues/%s", "GH #%s"), |
123 | 123 | } |
124 | 124 |
|
125 | 125 |
|
|
129 | 129 |
|
130 | 130 | autosummary_generate = False |
131 | 131 | autodoc_default_options = { |
132 | | - 'members': True, |
133 | | - 'undoc-members': False, |
134 | | - 'show-inheritance': True, |
135 | | - 'inherited-members': False, |
136 | | - 'private-members': True, |
| 132 | + "members": True, |
| 133 | + "undoc-members": False, |
| 134 | + "show-inheritance": True, |
| 135 | + "inherited-members": False, |
| 136 | + "private-members": True, |
137 | 137 | } |
138 | 138 |
|
139 | | -html_theme = 'pydata_sphinx_theme' |
| 139 | +html_theme = "pydata_sphinx_theme" |
140 | 140 | # html_theme = "alabaster" |
141 | 141 |
|
142 | | -html_static_path = ['_static'] |
| 142 | +html_static_path = ["_static"] |
143 | 143 |
|
144 | 144 | html_css_files = [ |
145 | | - 'css/custom.css', |
| 145 | + "css/custom.css", |
146 | 146 | ] |
147 | 147 |
|
148 | 148 | html_context = { |
149 | | - 'github_user': gh_user, |
150 | | - 'github_repo': project, |
151 | | - 'github_version': 'main', |
152 | | - 'doc_path': 'docs/source/', |
| 149 | + "github_user": gh_user, |
| 150 | + "github_repo": project, |
| 151 | + "github_version": "main", |
| 152 | + "doc_path": "docs/source/", |
153 | 153 | } |
154 | 154 |
|
155 | 155 | html_theme_options = { |
156 | | - 'announcement': 'Documentation is under construction.', |
157 | | - 'show_prev_next': True, |
| 156 | + "announcement": "Documentation is under construction.", |
| 157 | + "show_prev_next": True, |
158 | 158 | # "html_last_updated_fmt": "%b %d, %Y", |
159 | | - 'content_footer_items': ['last-updated'], |
160 | | - 'github_url': gh_repo_url, |
| 159 | + "content_footer_items": ["last-updated"], |
| 160 | + "github_url": gh_repo_url, |
161 | 161 | # "external_links": [ |
162 | 162 | # {"name": "link-one-name", "url": "https://<link-one>"}, |
163 | 163 | # ], |
164 | 164 | # |
165 | | - 'icon_links': [ |
| 165 | + "icon_links": [ |
166 | 166 | { |
167 | | - 'name': 'GitLab susedoc/docserv-config', |
168 | | - 'url': xml_config_repo, |
169 | | - 'icon': 'fa-brands fa-square-gitlab', |
170 | | - 'type': 'fontawesome', |
| 167 | + "name": "GitLab susedoc/docserv-config", |
| 168 | + "url": xml_config_repo, |
| 169 | + "icon": "fa-brands fa-square-gitlab", |
| 170 | + "type": "fontawesome", |
171 | 171 | }, |
172 | 172 | { |
173 | | - 'name': 'Kanban board', |
174 | | - 'url': 'https://github.com/orgs/openSUSE/projects/27/', |
175 | | - 'icon': 'fa-solid fa-table-columns', |
176 | | - 'type': 'fontawesome', |
| 173 | + "name": "Kanban board", |
| 174 | + "url": "https://github.com/orgs/openSUSE/projects/27/", |
| 175 | + "icon": "fa-solid fa-table-columns", |
| 176 | + "type": "fontawesome", |
177 | 177 | }, |
178 | 178 | ], |
179 | 179 | # |
180 | | - 'use_edit_page_button': True, |
181 | | - 'back_to_top_button': True, |
182 | | - 'logo': { |
183 | | - 'text': 'Docbuild Documentation', |
| 180 | + "use_edit_page_button": True, |
| 181 | + "back_to_top_button": True, |
| 182 | + "logo": { |
| 183 | + "text": "Docbuild Documentation", |
184 | 184 | # "image_light": "_static/logo-light.png", |
185 | 185 | # "image_dark": "_static/logo-dark.png", |
186 | 186 | }, |
187 | 187 | } |
188 | 188 |
|
189 | | -html_logo = '_static/logo.png' |
| 189 | +html_logo = "_static/logo.png" |
190 | 190 |
|
191 | | -html_favicon = '_static/favicon.ico' |
| 191 | +html_favicon = "_static/favicon.ico" |
192 | 192 |
|
193 | 193 | # -- Options for intersphinx extension --------------------------------------- |
194 | 194 | # https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#configuration |
195 | 195 |
|
196 | 196 | intersphinx_mapping = { |
197 | | - 'python': ('https://docs.python.org/3', None), |
198 | | - 'pydantic': ('https://docs.pydantic.dev/latest/', None), |
199 | | - 'click': ('https://click.palletsprojects.com/en/latest/', None), |
200 | | - 'jinja2': ('https://jinja.palletsprojects.com/en/latest/', None), |
| 197 | + "python": ("https://docs.python.org/3", None), |
| 198 | + "pydantic": ("https://docs.pydantic.dev/latest/", None), |
| 199 | + "click": ("https://click.palletsprojects.com/en/latest/", None), |
| 200 | + "jinja2": ("https://jinja.palletsprojects.com/en/latest/", None), |
201 | 201 | } |
202 | 202 |
|
203 | 203 | # -- Options for linkcheck builder -------------------------------------------- |
204 | 204 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder |
205 | 205 |
|
206 | 206 | linkcheck_ignore = [ |
207 | 207 | # Ignore links to the internal GitLab server, which may require a VPN or login. |
208 | | - r'https://gitlab\.suse\.de/.*', |
| 208 | + r"https://gitlab\.suse\.de/.*", |
209 | 209 | # Ignore links to local development servers. |
210 | | - r'http://127\.0\.0\.1:\d+/', |
211 | | - r'http://localhost:\d+/', |
| 210 | + r"http://127\.0\.0\.1:\d+/", |
| 211 | + r"http://localhost:\d+/", |
212 | 212 | # Ignore mailto links |
213 | | - r'mailto:.*', |
| 213 | + r"mailto:.*", |
214 | 214 | # Ignore settings page as only admins have access |
215 | | - rf'https://github\.com/{gh_user}/{project}/settings/rules', |
| 215 | + rf"https://github\.com/{gh_user}/{project}/settings/rules", |
216 | 216 | # Just ignore useless example URLs |
217 | | - r'https://github\.com/org/repo', |
| 217 | + r"https://github\.com/org/repo", |
218 | 218 | ] |
0 commit comments