|
36 | 36 | 'v2.0'
|
37 | 37 | """
|
38 | 38 |
|
39 |
| - |
40 | 39 | import sys
|
41 | 40 | import os
|
42 | 41 | from urllib.parse import quote
|
|
72 | 71 | # for md us 'autodoc2' (pip install sphinx-autodoc2)
|
73 | 72 | # for rst use 'sphinx.ext.autodoc'
|
74 | 73 | extensions = [
|
75 |
| - """sphinx.ext.napoleon""", """autodoc2""", """sphinx.ext.autosectionlabel""", |
76 |
| - """sphinx.ext.githubpages""", """myst_parser""", """sphinx_design""", |
77 |
| - """sphinx.ext.autosummary""", """sphinx.ext.doctest""", """sphinx.ext.todo""", |
78 |
| - """sphinx.ext.linkcode""", """sphinx.ext.viewcode""", """sphinx.ext.intersphinx""", |
| 74 | + """sphinx.ext.napoleon""", |
| 75 | + """autodoc2""", |
| 76 | + """sphinx.ext.autosectionlabel""", |
| 77 | + """sphinx.ext.githubpages""", |
| 78 | + """myst_parser""", |
| 79 | + """sphinx_design""", |
| 80 | + """sphinx.ext.autosummary""", |
| 81 | + """sphinx.ext.doctest""", |
| 82 | + """sphinx.ext.todo""", |
| 83 | + """sphinx.ext.linkcode""", |
| 84 | + """sphinx.ext.viewcode""", |
| 85 | + """sphinx.ext.intersphinx""", |
79 | 86 | ]
|
80 | 87 |
|
81 | 88 | # for md auto-docs
|
82 | 89 | autodoc2_packages = [
|
| 90 | + "tests", |
83 | 91 | "multicast",
|
84 | 92 | "tests.context",
|
85 |
| - "tests", |
86 | 93 | ]
|
87 | 94 |
|
88 | 95 | autodoc2_render_plugin = "myst"
|
|
92 | 99 |
|
93 | 100 | # The suffix of source filenames.
|
94 | 101 | source_suffix = {
|
| 102 | + ".yml": "yaml", |
95 | 103 | ".md": "markdown",
|
96 | 104 | ".txt": "markdown",
|
97 |
| - ".rst": "restructuredtext", |
98 |
| - ".yml": "yaml", |
99 | 105 | "Makefile": "makefile",
|
| 106 | + ".rst": "restructuredtext", |
100 | 107 | }
|
101 | 108 |
|
102 | 109 | # The encoding of source files. Official sphinx docs recommend utf-8-sig.
|
|
132 | 139 | # List of patterns, relative to source directory, that match files and
|
133 | 140 | # directories to ignore when looking for source files.
|
134 | 141 | exclude_patterns = [
|
135 |
| - "_build", ".github", ".circleci", "codecov_env", ".DS_Store", "**/.git", "dist", |
136 |
| - "../tests/tests/**", "www", "**/docs", "../multicast/multicast/**", "*~" |
| 142 | + "*~", |
| 143 | + "www", |
| 144 | + "dist", |
| 145 | + "_build", |
| 146 | + ".github", |
| 147 | + "**/docs", |
| 148 | + "**/.git", |
| 149 | + ".DS_Store", |
| 150 | + ".circleci", |
| 151 | + "codecov_env", |
| 152 | + "../tests/tests/**", |
| 153 | + "../multicast/multicast/**", |
137 | 154 | ]
|
138 | 155 |
|
139 | 156 | # The reST default role (used for this markup: `text`) to use for all documents.
|
|
161 | 178 | # pygments_style_dark ="monokai"
|
162 | 179 | pygments_style_dark = "github-dark"
|
163 | 180 |
|
164 |
| - |
165 | 181 | pygments_options = {
|
166 | 182 | """tabsize""": 4,
|
167 | 183 | """stripall""": False,
|
|
268 | 284 | # html_use_opensearch = ''
|
269 | 285 |
|
270 | 286 | # This is the file name suffix for HTML files (e.g. ".xhtml").
|
271 |
| -# html_file_suffix = "html" |
| 287 | +html_file_suffix = ".html" |
272 | 288 |
|
273 | 289 | # Output file base name for HTML help builder.
|
274 | 290 | htmlhelp_basename = "multicast_doc"
|
275 | 291 |
|
276 |
| - |
277 | 292 | # -- Options for MyST markdown parser -------------------------------------------
|
278 | 293 | # see https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html
|
279 | 294 |
|
|
340 | 355 | # Grouping the document tree into LaTeX files. List of tuples
|
341 | 356 | # (source start file, target name, title, author, documentclass [howto/manual]).
|
342 | 357 | latex_documents = [
|
343 |
| - ( |
344 |
| - "index", |
345 |
| - "Documentation.tex", |
346 |
| - "Multicast Documentation", |
347 |
| - "reactive-firewall", |
348 |
| - "manual" |
349 |
| - ), |
| 358 | + ("index", "Documentation.tex", "Multicast Documentation", "reactive-firewall", "manual"), |
350 | 359 | ]
|
351 | 360 |
|
352 | 361 | # The name of an image file (relative to this directory) to place at the top of
|
|
369 | 378 | # If false, no module index is generated.
|
370 | 379 | # latex_domain_indices = True
|
371 | 380 |
|
372 |
| - |
373 | 381 | # -- Options for manual page output --------------------------------------------
|
374 | 382 |
|
375 | 383 | # One entry per manual page. List of tuples
|
376 | 384 | # (source start file, name, description, authors, manual section).
|
377 |
| -man_pages = [ |
378 |
| - ( |
379 |
| - "index", |
380 |
| - "multicast", |
381 |
| - "Multicast Documentation", |
382 |
| - ["reactive-firewall"], |
383 |
| - 1 |
384 |
| - ) |
385 |
| -] |
| 385 | +man_pages = [("index", "multicast", "Multicast Documentation", ["reactive-firewall"], 1)] |
386 | 386 |
|
387 | 387 | # If true, show URL addresses after external links.
|
388 | 388 | # man_show_urls = False
|
389 | 389 |
|
390 |
| - |
391 | 390 | # -- Options for Texinfo output ------------------------------------------------
|
392 | 391 |
|
393 | 392 | # Grouping the document tree into Texinfo files. List of tuples
|
394 | 393 | # (source start file, target name, title, author,
|
395 | 394 | # dir menu entry, description, category)
|
396 | 395 | texinfo_documents = [
|
397 | 396 | (
|
398 |
| - "index", |
399 |
| - "Multicast", |
400 |
| - "Multicast Documentation", |
401 |
| - "reactive-firewall", |
402 |
| - "Multicast", |
403 |
| - "Multicast Python Module.", |
404 |
| - "Miscellaneous" |
| 397 | + "index", |
| 398 | + "Multicast", |
| 399 | + "Multicast Documentation", |
| 400 | + "reactive-firewall", |
| 401 | + "Multicast", |
| 402 | + "Multicast Python Module.", |
| 403 | + "Miscellaneous" |
405 | 404 | ),
|
406 | 405 | ]
|
407 | 406 |
|
|
418 | 417 |
|
419 | 418 | linkcode_url_prefix: str = f"https://github.com/reactive-firewall/{project}"
|
420 | 419 |
|
| 420 | +suffix = """/issues/%s""" |
| 421 | + |
421 | 422 | extlinks = {
|
422 | 423 | """issue""": (
|
423 |
| - str("""{prefix}/{suffix}""").format( |
424 |
| - prefix=linkcode_url_prefix, suffix="""/issues/%s""" |
425 |
| - ), |
426 |
| - """issue #%s""" |
| 424 | + f"{linkcode_url_prefix}/{suffix}", |
| 425 | + """issue #%s""" |
427 | 426 | )
|
428 | 427 | }
|
429 | 428 |
|
430 | 429 | # try to link with official python3 documentation.
|
431 | 430 | # see https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html for more
|
432 | 431 | intersphinx_mapping = {
|
433 |
| - """python""": ( |
434 |
| - """https://docs.python.org/3""", |
435 |
| - (None, """python-inv.txt""") |
436 |
| - ) |
| 432 | + """python""": ("""https://docs.python.org/3""", (None, """python-inv.txt""")) |
437 | 433 | }
|
438 | 434 |
|
439 | 435 |
|
|
0 commit comments