|
12 | 12 | # add these directories to sys.path here. If the directory is relative to the
|
13 | 13 | # documentation root, use os.path.abspath to make it absolute, like shown here.
|
14 | 14 | #
|
| 15 | + |
| 16 | +import datetime |
15 | 17 | import os
|
16 | 18 | import sys
|
17 |
| -sys.path.insert(0, os.path.abspath('..')) |
| 19 | + |
| 20 | +sys.path.insert(0, os.path.abspath("..")) |
18 | 21 |
|
19 | 22 | # -- Project information -----------------------------------------------------
|
20 | 23 |
|
21 | 24 | project = "ComNetsEmu"
|
22 |
| -copyright = "2019, The Deutsche Telekom Chair of Communication Networks" |
| 25 | +year = datetime.datetime.now().year |
| 26 | +copyright = "%d The Deutsche Telekom Chair of Communication Networks" % year |
23 | 27 | author = "Zuo Xiang"
|
24 | 28 |
|
25 | 29 | # The short X.Y version
|
26 |
| -version = "v0.1" |
| 30 | +version = "v0.3" |
27 | 31 | # The full version, including alpha/beta/rc tags
|
28 |
| -release = "v0.1.5" |
| 32 | +release = "v0.3.0" |
29 | 33 |
|
30 | 34 | # -- General configuration ---------------------------------------------------
|
31 | 35 |
|
|
37 | 41 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
38 | 42 | # ones.
|
39 | 43 | extensions = [
|
40 |
| - 'sphinx.ext.autodoc', 'sphinxcontrib.apidoc', |
41 |
| - 'sphinx.ext.autosectionlabel', 'sphinx.ext.doctest', 'recommonmark', |
42 |
| - 'sphinxcontrib.napoleon' |
| 44 | + # Use builtin extensions in sphinx |
| 45 | + "sphinx.ext.autodoc", |
| 46 | + "sphinx.ext.autosectionlabel", |
| 47 | + "sphinx.ext.doctest", |
| 48 | + "sphinx.ext.napoleon", |
| 49 | + # Add markdown support |
| 50 | + "myst_parser", |
43 | 51 | ]
|
44 | 52 |
|
45 |
| -# Mock calls to external libraries |
46 |
| -autodoc_mock_imports = ["pytest"] |
47 |
| - |
48 |
| -# API doc parameters |
49 |
| -apidoc_module_dir = '../comnetsemu/' |
50 |
| -apidoc_output_dir = 'api' |
51 |
| -apidoc_excluded_paths = ['test'] |
52 |
| -apidoc_separate_modules = True |
53 |
| -apidoc_module_first = True |
54 |
| -apidoc_extra_args = ['-H', 'ComNetsEmu API', '-d', '6'] |
55 |
| -autoclass_content = "both" |
56 |
| - |
57 | 53 | # Add any paths that contain templates here, relative to this directory.
|
58 |
| -templates_path = ['_templates'] |
| 54 | +templates_path = ["_templates"] |
59 | 55 |
|
60 | 56 | # The master toctree document.
|
61 |
| -master_doc = 'index' |
| 57 | +master_doc = "index" |
62 | 58 |
|
63 | 59 | # The language for content autogenerated by Sphinx. Refer to documentation
|
64 | 60 | # for a list of supported languages.
|
|
70 | 66 | # List of patterns, relative to source directory, that match files and
|
71 | 67 | # directories to ignore when looking for source files.
|
72 | 68 | # This pattern also affects html_static_path and html_extra_path.
|
73 |
| -exclude_patterns = ['build', 'Thumbs.db', '.DS_Store', 'comparison.md'] |
| 69 | +exclude_patterns = ["build", "Thumbs.db", ".DS_Store", "comparison.md"] |
74 | 70 |
|
75 | 71 | # The name of the Pygments (syntax highlighting) style to use.
|
76 |
| -pygments_style = None |
| 72 | +pygments_style = "sphinx" |
77 | 73 |
|
78 | 74 | # -- Options for HTML output -------------------------------------------------
|
79 | 75 |
|
80 | 76 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
81 | 77 | # a list of builtin themes.
|
82 | 78 | #
|
83 |
| -html_theme = "sphinx_rtd_theme" |
| 79 | +html_theme = "alabaster" |
| 80 | + |
84 | 81 |
|
85 | 82 | # Theme options are theme-specific and customize the look and feel of a theme
|
86 | 83 | # further. For a list of options available for each theme, see the
|
87 | 84 | # documentation.
|
88 | 85 | #
|
89 |
| -# html_theme_options = {} |
| 86 | +html_theme_options = { |
| 87 | + "description": "A virtual emulator/testbed designed for the book: Computing in Communication Networks: From Theory to Practice", |
| 88 | + "fixed_sidebar": True, |
| 89 | +} |
90 | 90 |
|
91 | 91 | # Add any paths that contain custom static files (such as style sheets) here,
|
92 | 92 | # relative to this directory. They are copied after the builtin static files,
|
|
106 | 106 | # -- Options for HTMLHelp output ---------------------------------------------
|
107 | 107 |
|
108 | 108 | # Output file base name for HTML help builder.
|
109 |
| -htmlhelp_basename = 'ComNetsEmudoc' |
| 109 | +htmlhelp_basename = "ComNetsEmudoc" |
110 | 110 |
|
111 | 111 | # -- Options for LaTeX output ------------------------------------------------
|
112 | 112 |
|
113 | 113 | latex_elements = {
|
114 | 114 | # The paper size ('letterpaper' or 'a4paper').
|
115 | 115 | #
|
116 | 116 | # 'papersize': 'letterpaper',
|
117 |
| - |
118 | 117 | # The font size ('10pt', '11pt' or '12pt').
|
119 | 118 | #
|
120 | 119 | # 'pointsize': '10pt',
|
121 |
| - |
122 | 120 | # Additional stuff for the LaTeX preamble.
|
123 | 121 | #
|
124 | 122 | # 'preamble': '',
|
125 |
| - |
126 | 123 | # Latex figure (float) alignment
|
127 | 124 | #
|
128 | 125 | # 'figure_align': 'htbp',
|
|
132 | 129 | # (source start file, target name, title,
|
133 | 130 | # author, documentclass [howto, manual, or own class]).
|
134 | 131 | latex_documents = [
|
135 |
| - (master_doc, 'ComNetsEmu.tex', 'ComNetsEmu Documentation', 'Zuo Xiang', |
136 |
| - 'manual'), |
| 132 | + (master_doc, "ComNetsEmu.tex", "ComNetsEmu Documentation", "Zuo Xiang", "manual"), |
137 | 133 | ]
|
138 | 134 |
|
139 | 135 | # -- Options for manual page output ------------------------------------------
|
140 | 136 |
|
141 | 137 | # One entry per manual page. List of tuples
|
142 | 138 | # (source start file, name, description, authors, manual section).
|
143 |
| -man_pages = [(master_doc, 'comnetsemu', 'ComNetsEmu Documentation', [author], |
144 |
| - 1)] |
| 139 | +man_pages = [(master_doc, "comnetsemu", "ComNetsEmu Documentation", [author], 1)] |
145 | 140 |
|
146 | 141 | # -- Options for Texinfo output ----------------------------------------------
|
147 | 142 |
|
148 | 143 | # Grouping the document tree into Texinfo files. List of tuples
|
149 | 144 | # (source start file, target name, title, author,
|
150 | 145 | # dir menu entry, description, category)
|
151 | 146 | texinfo_documents = [
|
152 |
| - (master_doc, 'ComNetsEmu', 'ComNetsEmu Documentation', author, |
153 |
| - 'ComNetsEmu', 'One line description of project.', 'Miscellaneous'), |
| 147 | + ( |
| 148 | + master_doc, |
| 149 | + "ComNetsEmu", |
| 150 | + "ComNetsEmu Documentation", |
| 151 | + author, |
| 152 | + "ComNetsEmu", |
| 153 | + "One line description of project.", |
| 154 | + "Miscellaneous", |
| 155 | + ), |
154 | 156 | ]
|
155 | 157 |
|
156 | 158 | # -- Options for Epub output -------------------------------------------------
|
|
168 | 170 | # epub_uid = ''
|
169 | 171 |
|
170 | 172 | # A list of files that should not be packed into the epub file.
|
171 |
| -epub_exclude_files = ['search.html'] |
| 173 | +epub_exclude_files = ["search.html"] |
0 commit comments