|
1 | 1 | # -*- coding: utf-8 -*- |
2 | 2 | # |
3 | | -# pyAML documentation build configuration file, |
| 3 | +# pyAML documentation build configuration file, |
4 | 4 | # |
5 | 5 | # This file is execfile()d with the current directory set to its |
6 | 6 | # containing dir. |
|
17 | 17 | # |
18 | 18 | import pathlib |
19 | 19 | import sys |
| 20 | + |
20 | 21 | # ignore numpy warnings, see: |
21 | 22 | # https://stackoverflow.com/questions/40845304/runtimewarning-numpy-dtype-size-changed-may-indicate-binary-incompatibility |
22 | 23 | import warnings |
|
44 | 45 | # Add any Sphinx extension module names here, as strings. They can be |
45 | 46 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
46 | 47 | # ones. |
47 | | -extensions = ['sphinx.ext.autodoc', |
48 | | - 'sphinx.ext.doctest', |
49 | | - 'sphinx.ext.todo', |
50 | | - 'sphinx.ext.coverage', |
51 | | - 'sphinx.ext.mathjax', |
52 | | - 'sphinx.ext.viewcode', |
53 | | - 'sphinx.ext.githubpages', |
54 | | - 'sphinx.ext.napoleon', |
55 | | - 'sphinx.ext.autosectionlabel', |
56 | | - 'sphinx.ext.autosummary', |
57 | | - 'myst_nb' |
58 | | - ] |
| 48 | +extensions = [ |
| 49 | + "sphinx.ext.autodoc", |
| 50 | + "sphinx.ext.doctest", |
| 51 | + "sphinx.ext.todo", |
| 52 | + "sphinx.ext.coverage", |
| 53 | + "sphinx.ext.mathjax", |
| 54 | + "sphinx.ext.viewcode", |
| 55 | + "sphinx.ext.githubpages", |
| 56 | + "sphinx.ext.napoleon", |
| 57 | + "sphinx.ext.autosectionlabel", |
| 58 | + "sphinx.ext.autosummary", |
| 59 | + "myst_nb", |
| 60 | +] |
59 | 61 | autosectionlabel_prefix_document = True |
60 | 62 | autosectionlabel_maxdepth = 2 |
61 | 63 |
|
|
66 | 68 | # You can specify multiple suffix as a list of string: |
67 | 69 | # |
68 | 70 | # source_suffix = ['.rst', '.md'] |
69 | | -source_suffix = '.rst' |
| 71 | +source_suffix = ".rst" |
70 | 72 |
|
71 | 73 | # The master toctree document. |
72 | | -master_doc = 'index' |
| 74 | +master_doc = "index" |
73 | 75 |
|
74 | 76 | # General information about the project. |
75 | 77 | project = ABOUT_PYAML["__title__"] |
76 | | -copyright_ = '2024, pyAML collaboration' |
| 78 | +copyright_ = "2024, pyAML collaboration" |
77 | 79 | author = ABOUT_PYAML["__author__"] |
78 | 80 |
|
79 | 81 | rst_prolog = f""" |
80 | | -:github_url: {ABOUT_PYAML['__url__']} |
| 82 | +:github_url: {ABOUT_PYAML["__url__"]} |
81 | 83 | """ |
82 | 84 |
|
83 | 85 | # The version info for the project you're documenting, acts as replacement for |
|
94 | 96 | # |
95 | 97 | # This is also used if you do content translation via gettext catalogs. |
96 | 98 | # Usually you set "language" from the command line for these cases. |
97 | | -language = 'en' |
| 99 | +language = "en" |
98 | 100 |
|
99 | 101 | # List of patterns, relative to source directory, that match files and |
100 | 102 | # directories to ignore when looking for source files. |
101 | 103 | # This patterns also effect to html_static_path and html_extra_path |
102 | 104 | exclude_patterns = [] |
103 | 105 |
|
104 | 106 | # The name of the Pygments (syntax highlighting) style to use. |
105 | | -pygments_style = 'sphinx' |
| 107 | +pygments_style = "sphinx" |
106 | 108 |
|
107 | 109 | # If true, `todo` and `todoList` produce output, else they produce nothing. |
108 | 110 | todo_include_todos = True |
|
120 | 122 | # further. For a list of options available for each theme, see the |
121 | 123 | # documentation. |
122 | 124 | html_theme_options = { |
123 | | - 'collapse_navigation': False, |
124 | | - 'display_version': True, |
125 | | - 'logo_only': True, |
126 | | - 'navigation_depth': 6, |
| 125 | + "collapse_navigation": False, |
| 126 | + "display_version": True, |
| 127 | + "logo_only": True, |
| 128 | + "navigation_depth": 6, |
127 | 129 | "rightsidebar": True, |
128 | | - "relbarbgcolor": "black" |
| 130 | + "relbarbgcolor": "black", |
129 | 131 | } |
130 | 132 |
|
131 | 133 |
|
132 | 134 | # Name of an image file (path relative to the configuration directory) |
133 | 135 | # that is the logo of the docs, or URL that points an image file for the logo. |
134 | 136 | # It is placed at the top of the sidebar; |
135 | 137 | # its width should therefore not exceed 200 pixels. |
136 | | -html_logo = '_static/img/logo.png' |
| 138 | +html_logo = "_static/img/logo.png" |
137 | 139 | html_copy_source = False |
138 | 140 | html_theme_options = { |
139 | 141 | "github_url": "https://github.com/atcollab/at", |
140 | 142 | "logo": { |
141 | | - "image_light": '_static/img/logo.png', |
142 | | - "image_dark": '_static/img/dark.png', |
143 | | - } |
| 143 | + "image_light": "_static/img/logo.png", |
| 144 | + "image_dark": "_static/img/dark.png", |
| 145 | + }, |
144 | 146 | } |
145 | 147 |
|
146 | 148 | # Add any paths that contain custom static files (such as style sheets) here, |
147 | 149 | # relative to this directory. They are copied after the builtin static files, |
148 | 150 | # so a file named "default.css" will overwrite the builtin "default.css". |
149 | 151 | # |
150 | | -html_static_path = ['_static'] |
| 152 | +html_static_path = ["_static"] |
151 | 153 |
|
152 | 154 | # A dictionary of values to pass into the template engine’s context for all |
153 | 155 | # pages. Single values can also be put in this dictionary using the |
154 | 156 | # -A command-line option of sphinx-build. |
155 | 157 | html_context = { |
156 | | - 'display_github': True, |
| 158 | + "display_github": True, |
157 | 159 | # the following are only needed if :github_url: is not set |
158 | | - 'github_user': author, |
159 | | - 'github_repo': project, |
160 | | - 'github_version': 'main/docs/', |
| 160 | + "github_user": author, |
| 161 | + "github_repo": project, |
| 162 | + "github_version": "main/docs/", |
161 | 163 | } |
162 | 164 |
|
163 | 165 | # A list of CSS files. The entry must be a filename string or a tuple |
|
169 | 171 | # |
170 | 172 | html_css_files = ["css/custom.css"] |
171 | 173 |
|
172 | | -smartquotes_action = "qe" # renders only quotes and ellipses (...) but not dashes (option: D) |
| 174 | +smartquotes_action = ( |
| 175 | + "qe" # renders only quotes and ellipses (...) but not dashes (option: D) |
| 176 | +) |
173 | 177 |
|
174 | 178 | # Custom sidebar templates, must be a dictionary that maps document names |
175 | 179 | # to template names. |
176 | 180 | # |
177 | 181 | # This is required for the alabaster theme |
178 | 182 | # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars |
179 | 183 | html_sidebars = { |
180 | | - '**': [ |
181 | | - 'relations.html', # needs 'show_related': True theme option to display |
182 | | - 'searchbox.html', |
| 184 | + "**": [ |
| 185 | + "relations.html", # needs 'show_related': True theme option to display |
| 186 | + "searchbox.html", |
183 | 187 | ], |
184 | 188 | "index": [], |
185 | 189 | "common/about": [], |
|
189 | 193 | # -- Options for HTMLHelp output ------------------------------------------ |
190 | 194 |
|
191 | 195 | # Output file base name for HTML help builder. |
192 | | -htmlhelp_basename = 'pyamldoc' |
| 196 | +htmlhelp_basename = "pyamldoc" |
193 | 197 |
|
194 | 198 | # -- Options for LaTeX output --------------------------------------------- |
195 | 199 |
|
196 | 200 | latex_elements = { |
197 | 201 | # The paper size ('letterpaper' or 'a4paper'). |
198 | 202 | # |
199 | 203 | # 'papersize': 'letterpaper', |
200 | | - |
201 | 204 | # The font size ('10pt', '11pt' or '12pt'). |
202 | 205 | # |
203 | 206 | # 'pointsize': '10pt', |
204 | | - |
205 | 207 | # Additional stuff for the LaTeX preamble. |
206 | 208 | # |
207 | 209 | # 'preamble': '', |
208 | | - |
209 | 210 | # Latex figure (float) alignment |
210 | 211 | # |
211 | 212 | # 'figure_align': 'htbp', |
|
215 | 216 | # (source start file, target name, title, |
216 | 217 | # author, documentclass [howto, manual, or own class]). |
217 | 218 | latex_documents = [ |
218 | | - (master_doc, 'pyaml.tex', u'pyAML Documentation', |
219 | | - u'pyAML collaboration', 'manual'), |
| 219 | + (master_doc, "pyaml.tex", "pyAML Documentation", "pyAML collaboration", "manual"), |
220 | 220 | ] |
221 | 221 |
|
222 | 222 | # -- Options for manual page output --------------------------------------- |
223 | 223 |
|
224 | 224 | # One entry per manual page. List of tuples |
225 | 225 | # (source start file, name, description, authors, manual section). |
226 | | -man_pages = [ |
227 | | - (master_doc, 'pyaml', u'pyAML Documentation', |
228 | | - [author], 1) |
229 | | -] |
| 226 | +man_pages = [(master_doc, "pyaml", "pyAML Documentation", [author], 1)] |
230 | 227 |
|
231 | 228 | # -- Options for Texinfo output ------------------------------------------- |
232 | 229 |
|
233 | 230 | # Grouping the document tree into Texinfo files. List of tuples |
234 | 231 | # (source start file, target name, title, author, |
235 | 232 | # dir menu entry, description, category) |
236 | 233 | texinfo_documents = [ |
237 | | - (master_doc, 'pyaml', u'pyAML Documentation', |
238 | | - author, 'pyaml', 'One line description of project.', |
239 | | - 'Miscellaneous'), |
| 234 | + ( |
| 235 | + master_doc, |
| 236 | + "pyaml", |
| 237 | + "pyAML Documentation", |
| 238 | + author, |
| 239 | + "pyaml", |
| 240 | + "One line description of project.", |
| 241 | + "Miscellaneous", |
| 242 | + ), |
240 | 243 | ] |
241 | 244 |
|
242 | 245 | # -- Autodoc Configuration --------------------------------------------------- |
243 | 246 |
|
244 | 247 | # Add here all modules to be mocked up. When the dependencies are not met |
245 | 248 | # at building time. Here used to have PyQT mocked. |
246 | | -autodoc_mock_imports = ['PyQt5', 'PyQt5.QtGui', 'PyQt5.QtCore', 'PyQt5.QtWidgets', |
247 | | - "matplotlib.backends.backend_qt5agg", |
248 | | - ] |
| 249 | +autodoc_mock_imports = [ |
| 250 | + "PyQt5", |
| 251 | + "PyQt5.QtGui", |
| 252 | + "PyQt5.QtCore", |
| 253 | + "PyQt5.QtWidgets", |
| 254 | + "matplotlib.backends.backend_qt5agg", |
| 255 | +] |
249 | 256 |
|
250 | 257 | # -- Options for the myst markdown parser ------------------------------------ |
251 | 258 |
|
|
257 | 264 | "deflist", |
258 | 265 | ] |
259 | 266 | myst_heading_anchors = 3 |
260 | | -nb_execution_mode = "off" #"auto" |
| 267 | +nb_execution_mode = "off" # "auto" |
261 | 268 | nb_execution_allow_errors = True |
0 commit comments