|
1 |
| -# -*- coding: utf-8 -*- |
2 |
| - |
3 | 1 | # Configuration file for the Sphinx documentation builder.
|
4 | 2 | #
|
5 | 3 | # This file does only contain a selection of the most common options. For a
|
|
13 | 11 | # documentation root, use os.path.abspath to make it absolute, like shown here.
|
14 | 12 | #
|
15 | 13 | import os
|
16 |
| -import sys |
17 | 14 | import re
|
18 |
| -sys.path.insert(0, os.path.abspath('../')) |
| 15 | +import sys |
| 16 | + |
| 17 | +sys.path.insert(0, os.path.abspath("../")) |
19 | 18 |
|
20 | 19 |
|
21 | 20 | # -- Project information -----------------------------------------------------
|
22 | 21 |
|
23 |
| -project = 'Mr. Estimator' |
24 |
| -copyright = '2018, Paul Spitzner, Jonas Dehning, Annika Hagemann, Jens Wilting, Viola Priesemann' |
25 |
| -author = 'Paul Spitzner, Jonas Dehning, Annika Hagemann, Jens Wilting, Viola Priesemann' |
| 22 | +project = "Mr. Estimator" |
| 23 | +copyright = ( |
| 24 | + "2018, Paul Spitzner, Jonas Dehning, Annika Hagemann, " |
| 25 | + "Jens Wilting, Viola Priesemann" |
| 26 | +) |
| 27 | +author = "Paul Spitzner, Jonas Dehning, Annika Hagemann, Jens Wilting, Viola Priesemann" |
26 | 28 |
|
27 | 29 | verstr = "unknown"
|
28 | 30 | try:
|
29 |
| - verstrline = open('../mrestimator/_version.py', "rt").read() |
30 |
| -except EnvironmentError: |
| 31 | + verstrline = open("../mrestimator/_version.py").read() |
| 32 | +except OSError: |
31 | 33 | pass
|
32 | 34 | else:
|
33 | 35 | VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
|
|
36 | 38 | verstr = mo.group(1)
|
37 | 39 | else:
|
38 | 40 | raise RuntimeError("unable to find version in mrestimator/_version.py")
|
39 |
| -print('sphinx found version: {}'.format(verstr)) |
| 41 | +print(f"sphinx found version: {verstr}") |
40 | 42 | # The short X.Y version
|
41 | 43 | version = verstr
|
42 | 44 | # The full version, including alpha/beta/rc tags
|
|
53 | 55 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
54 | 56 | # ones.
|
55 | 57 | extensions = [
|
56 |
| - 'sphinx.ext.autodoc', |
57 |
| - 'sphinx.ext.doctest', |
58 |
| - 'sphinx.ext.todo', |
59 |
| - 'sphinx.ext.coverage', |
60 |
| - 'sphinx.ext.mathjax', |
61 |
| - 'sphinx.ext.napoleon', |
| 58 | + "sphinx.ext.autodoc", |
| 59 | + "sphinx.ext.doctest", |
| 60 | + "sphinx.ext.todo", |
| 61 | + "sphinx.ext.coverage", |
| 62 | + "sphinx.ext.mathjax", |
| 63 | + "sphinx.ext.napoleon", |
62 | 64 | # 'numpydoc',
|
63 |
| - 'sphinx.ext.intersphinx', |
64 |
| - 'sphinx.ext.viewcode', |
65 |
| - 'm2r', |
| 65 | + "sphinx.ext.intersphinx", |
| 66 | + "sphinx.ext.viewcode", |
| 67 | + "m2r", |
66 | 68 | # 'sphinx_autorun'
|
67 | 69 | ]
|
68 | 70 |
|
69 | 71 |
|
70 | 72 | # Mock imports
|
71 |
| -autodoc_mock_imports = [ |
72 |
| - 'numpy', |
73 |
| - 'matplotlib', |
74 |
| - 'matplotlib.pyplot', |
75 |
| - 'scipy', |
76 |
| - 'neo' |
77 |
| -] |
| 73 | +autodoc_mock_imports = ["numpy", "matplotlib", "matplotlib.pyplot", "scipy", "neo"] |
78 | 74 |
|
79 | 75 | # Add any paths that contain templates here, relative to this directory.
|
80 |
| -templates_path = ['_templates'] |
| 76 | +templates_path = ["_templates"] |
81 | 77 |
|
82 | 78 | # The suffix(es) of source filenames.
|
83 | 79 | # You can specify multiple suffix as a list of string:
|
84 | 80 | #
|
85 |
| -source_suffix = ['.rst', '.md'] |
| 81 | +source_suffix = [".rst", ".md"] |
86 | 82 | # source_suffix = '.rst'
|
87 | 83 |
|
88 | 84 | # The master toctree document.
|
89 |
| -master_doc = 'index' |
| 85 | +master_doc = "index" |
90 | 86 |
|
91 | 87 | # The language for content autogenerated by Sphinx. Refer to documentation
|
92 | 88 | # for a list of supported languages.
|
|
98 | 94 | # List of patterns, relative to source directory, that match files and
|
99 | 95 | # directories to ignore when looking for source files.
|
100 | 96 | # This pattern also affects html_static_path and html_extra_path .
|
101 |
| -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] |
| 97 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
102 | 98 |
|
103 | 99 | # The name of the Pygments (syntax highlighting) style to use.
|
104 |
| -pygments_style = 'sphinx' |
| 100 | +pygments_style = "sphinx" |
105 | 101 |
|
106 | 102 |
|
107 | 103 | # Napoleon settings
|
|
113 | 109 | # napoleon_use_admonition_for_examples = False
|
114 | 110 | # napoleon_use_admonition_for_notes = False
|
115 | 111 | # napoleon_use_admonition_for_references = False
|
116 |
| -napoleon_use_ivar = True # True enables links for attribute types |
117 |
| -napoleon_use_param = True # True enables links for parameter types |
| 112 | +napoleon_use_ivar = True # True enables links for attribute types |
| 113 | +napoleon_use_param = True # True enables links for parameter types |
118 | 114 | napoleon_use_rtype = False
|
119 | 115 |
|
120 | 116 | # -- Options for HTML output -------------------------------------------------
|
|
124 | 120 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
125 | 121 | # a list of builtin themes.
|
126 | 122 | #
|
127 |
| -html_theme = 'sphinx_rtd_theme' |
| 123 | +html_theme = "sphinx_rtd_theme" |
128 | 124 |
|
129 | 125 | # Theme options are theme-specific and customize the look and feel of a theme
|
130 | 126 | # further. For a list of options available for each theme, see the
|
131 | 127 | # documentation.
|
132 | 128 |
|
133 | 129 | html_theme_options = {
|
134 |
| - 'collapse_navigation': False, |
135 |
| - 'display_version': False, |
136 |
| - 'navigation_depth': 4, |
137 |
| - 'sticky_navigation': True, |
| 130 | + "collapse_navigation": False, |
| 131 | + "display_version": False, |
| 132 | + "navigation_depth": 4, |
| 133 | + "sticky_navigation": True, |
138 | 134 | }
|
139 | 135 |
|
140 | 136 | # Add any paths that contain custom static files (such as style sheets) here,
|
141 | 137 | # relative to this directory. They are copied after the builtin static files,
|
142 | 138 | # so a file named "default.css" will overwrite the builtin "default.css".
|
143 |
| -html_static_path = ['_static'] |
| 139 | +html_static_path = ["_static"] |
144 | 140 |
|
145 | 141 | # Custom sidebar templates, must be a dictionary that maps document names
|
146 | 142 | # to template names.
|
|
153 | 149 | # html_sidebars = {}
|
154 | 150 |
|
155 | 151 | # icons
|
156 |
| -html_favicon = 'media/favicon.ico' |
157 |
| -html_logo = 'media/logo.png' |
| 152 | +html_favicon = "media/favicon.ico" |
| 153 | +html_logo = "media/logo.png" |
158 | 154 |
|
159 | 155 |
|
160 | 156 | # -- Options for HTMLHelp output ---------------------------------------------
|
161 | 157 |
|
162 | 158 | # Output file base name for HTML help builder.
|
163 |
| -htmlhelp_basename = 'mredoc' |
| 159 | +htmlhelp_basename = "mredoc" |
164 | 160 |
|
165 | 161 |
|
166 | 162 | # -- Options for LaTeX output ------------------------------------------------
|
|
169 | 165 | # The paper size ('letterpaper' or 'a4paper').
|
170 | 166 | #
|
171 | 167 | # 'papersize': 'letterpaper',
|
172 |
| - |
173 | 168 | # The font size ('10pt', '11pt' or '12pt').
|
174 | 169 | #
|
175 | 170 | # 'pointsize': '10pt',
|
176 |
| - |
177 | 171 | # Additional stuff for the LaTeX preamble.
|
178 | 172 | #
|
179 | 173 | # 'preamble': '',
|
180 |
| - |
181 | 174 | # Latex figure (float) alignment
|
182 | 175 | #
|
183 | 176 | # 'figure_align': 'htbp',
|
|
187 | 180 | # (source start file, target name, title,
|
188 | 181 | # author, documentclass [howto, manual, or own class]).
|
189 | 182 | latex_documents = [
|
190 |
| - (master_doc, 'mre.tex', 'mre Documentation', |
191 |
| - 'Paul Spitzner', 'manual'), |
| 183 | + (master_doc, "mre.tex", "mre Documentation", "Paul Spitzner", "manual"), |
192 | 184 | ]
|
193 | 185 |
|
194 | 186 |
|
195 | 187 | # -- Options for manual page output ------------------------------------------
|
196 | 188 |
|
197 | 189 | # One entry per manual page. List of tuples
|
198 | 190 | # (source start file, name, description, authors, manual section).
|
199 |
| -man_pages = [ |
200 |
| - (master_doc, 'mre', 'mre Documentation', |
201 |
| - [author], 1) |
202 |
| -] |
| 191 | +man_pages = [(master_doc, "mre", "mre Documentation", [author], 1)] |
203 | 192 |
|
204 | 193 |
|
205 | 194 | # -- Options for Texinfo output ----------------------------------------------
|
|
208 | 197 | # (source start file, target name, title, author,
|
209 | 198 | # dir menu entry, description, category)
|
210 | 199 | texinfo_documents = [
|
211 |
| - (master_doc, 'mre', 'mre Documentation', |
212 |
| - author, 'mre', 'One line description of project.', |
213 |
| - 'Miscellaneous'), |
| 200 | + ( |
| 201 | + master_doc, |
| 202 | + "mre", |
| 203 | + "mre Documentation", |
| 204 | + author, |
| 205 | + "mre", |
| 206 | + "One line description of project.", |
| 207 | + "Miscellaneous", |
| 208 | + ), |
214 | 209 | ]
|
215 | 210 |
|
216 | 211 |
|
217 | 212 | # -- Extension configuration -------------------------------------------------
|
218 | 213 |
|
219 |
| -intersphinx_mapping = {'python': ('http://docs.python.org/3', None), |
220 |
| - 'numpy': ('http://docs.scipy.org/doc/numpy', None), |
221 |
| - 'scipy': ('http://docs.scipy.org/doc/scipy/reference', None), |
222 |
| - 'matplotlib': ('http://matplotlib.sourceforge.net', None) |
223 |
| - } |
| 214 | +intersphinx_mapping = { |
| 215 | + "python": ("http://docs.python.org/3", None), |
| 216 | + "numpy": ("http://docs.scipy.org/doc/numpy", None), |
| 217 | + "scipy": ("http://docs.scipy.org/doc/scipy/reference", None), |
| 218 | + "matplotlib": ("http://matplotlib.sourceforge.net", None), |
| 219 | +} |
224 | 220 |
|
225 | 221 | # -- Options for todo extension ----------------------------------------------
|
226 | 222 |
|
|
0 commit comments