|
42 | 42 | try:
|
43 | 43 | import nibabel
|
44 | 44 | except ImportError:
|
45 |
| - raise RuntimeError('Need nibabel on Python PATH; consider "make htmldoc" ' |
46 |
| - 'from nibabel root directory') |
| 45 | + raise RuntimeError( |
| 46 | + 'Need nibabel on Python PATH; consider "make htmldoc" from nibabel root directory' |
| 47 | + ) |
47 | 48 |
|
48 | 49 | # -- General configuration ----------------------------------------------------
|
49 | 50 |
|
|
55 | 56 | fobj.write(rel['long_description'])
|
56 | 57 |
|
57 | 58 | # Load metadata from setup.cfg
|
58 |
| -with open(Path("../../pyproject.toml"), 'rb') as fobj: |
| 59 | +with open(Path('../../pyproject.toml'), 'rb') as fobj: |
59 | 60 | pyproject = tomllib.load(fobj)
|
60 |
| -authors = pyproject["project"]["authors"][0] |
| 61 | +authors = pyproject['project']['authors'][0] |
61 | 62 |
|
62 | 63 | # Add any Sphinx extension module names here, as strings. They can be
|
63 | 64 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
64 |
| -extensions = ['sphinx.ext.autodoc', |
65 |
| - 'sphinx.ext.doctest', |
66 |
| - 'sphinx.ext.intersphinx', |
67 |
| - 'sphinx.ext.todo', |
68 |
| - 'sphinx.ext.mathjax', |
69 |
| - 'sphinx.ext.inheritance_diagram', |
70 |
| - 'sphinx.ext.autosummary', |
71 |
| - 'texext.math_dollar', # has to go before numpydoc |
72 |
| - 'numpydoc', |
73 |
| - 'matplotlib.sphinxext.plot_directive', |
74 |
| - ] |
| 65 | +extensions = [ |
| 66 | + 'sphinx.ext.autodoc', |
| 67 | + 'sphinx.ext.doctest', |
| 68 | + 'sphinx.ext.intersphinx', |
| 69 | + 'sphinx.ext.todo', |
| 70 | + 'sphinx.ext.mathjax', |
| 71 | + 'sphinx.ext.inheritance_diagram', |
| 72 | + 'sphinx.ext.autosummary', |
| 73 | + 'texext.math_dollar', # has to go before numpydoc |
| 74 | + 'numpydoc', |
| 75 | + 'matplotlib.sphinxext.plot_directive', |
| 76 | +] |
75 | 77 |
|
76 | 78 | # Autosummary always wants to use a `generated/` directory.
|
77 | 79 | # We generate with `make api-stamp`
|
|
85 | 87 | source_suffix = '.rst'
|
86 | 88 |
|
87 | 89 | # The encoding of source files.
|
88 |
| -#source_encoding = 'utf-8' |
| 90 | +# source_encoding = 'utf-8' |
89 | 91 |
|
90 | 92 | # The master toctree document.
|
91 | 93 | master_doc = 'index'
|
92 | 94 |
|
93 | 95 | # General information about the project.
|
94 |
| -project = u'NiBabel' |
| 96 | +project = 'NiBabel' |
95 | 97 | copyright = f"2006-2022, {authors['name']} <{authors['email']}>"
|
96 | 98 |
|
97 | 99 | # The version info for the project you're documenting, acts as replacement for
|
|
105 | 107 |
|
106 | 108 | # The language for content autogenerated by Sphinx. Refer to documentation
|
107 | 109 | # for a list of supported languages.
|
108 |
| -#language = None |
| 110 | +# language = None |
109 | 111 |
|
110 | 112 | # There are two options for replacing |today|: either, you set today to some
|
111 | 113 | # non-false value, then it is used:
|
112 |
| -#today = '' |
| 114 | +# today = '' |
113 | 115 | # Else, today_fmt is used as the format for a strftime call.
|
114 | 116 | today_fmt = '%B %d, %Y, %H:%M PDT'
|
115 | 117 |
|
|
124 | 126 | exclude_trees = ['_build']
|
125 | 127 |
|
126 | 128 | # The reST default role (used for this markup: `text`) to use for all documents
|
127 |
| -#default_role = None |
| 129 | +# default_role = None |
128 | 130 |
|
129 | 131 | # If true, '()' will be appended to :func: etc. cross-reference text.
|
130 |
| -#add_function_parentheses = True |
| 132 | +# add_function_parentheses = True |
131 | 133 |
|
132 | 134 | # If true, the current module name will be prepended to all description
|
133 | 135 | # unit titles (such as .. function::).
|
134 |
| -#add_module_names = True |
| 136 | +# add_module_names = True |
135 | 137 |
|
136 | 138 | # If true, sectionauthor and moduleauthor directives will be shown in the
|
137 | 139 | # output. They are ignored by default.
|
138 |
| -#show_authors = False |
| 140 | +# show_authors = False |
139 | 141 |
|
140 | 142 | # The name of the Pygments (syntax highlighting) style to use.
|
141 | 143 | pygments_style = 'sphinx'
|
142 | 144 |
|
143 | 145 | # A list of ignored prefixes for module index sorting.
|
144 |
| -#modindex_common_prefix = [] |
| 146 | +# modindex_common_prefix = [] |
145 | 147 |
|
146 | 148 | # -- Sphinxext configuration --------------------------------------------------
|
147 | 149 |
|
148 | 150 | # Set attributes for layout of inheritance diagrams
|
149 |
| -inheritance_graph_attrs = dict(rankdir="LR", size='"6.0, 8.0"', fontsize=14, |
150 |
| - ratio='compress') |
151 |
| -inheritance_node_attrs = dict(shape='ellipse', fontsize=14, height=0.75, |
152 |
| - color='dodgerblue1', style='filled') |
| 151 | +inheritance_graph_attrs = dict(rankdir='LR', size='"6.0, 8.0"', fontsize=14, ratio='compress') |
| 152 | +inheritance_node_attrs = dict( |
| 153 | + shape='ellipse', fontsize=14, height=0.75, color='dodgerblue1', style='filled' |
| 154 | +) |
153 | 155 |
|
154 | 156 | # Flag to show todo items in rendered output
|
155 | 157 | todo_include_todos = True
|
|
168 | 170 | # Theme options are theme-specific and customize the look and feel of a theme
|
169 | 171 | # further. For a list of options available for each theme, see the
|
170 | 172 | # documentation.
|
171 |
| -#html_theme_options = {} |
| 173 | +# html_theme_options = {} |
172 | 174 |
|
173 | 175 | # Add any paths that contain custom themes here, relative to this directory.
|
174 |
| -#html_theme_path = [] |
| 176 | +# html_theme_path = [] |
175 | 177 |
|
176 | 178 | # The name for this set of Sphinx documents. If None, it defaults to
|
177 | 179 | # "<project> v<release> documentation".
|
178 |
| -#html_title = '' |
| 180 | +# html_title = '' |
179 | 181 |
|
180 | 182 | # A shorter title for the navigation bar. Default is the same as html_title.
|
181 |
| -#html_short_title = None |
| 183 | +# html_short_title = None |
182 | 184 |
|
183 | 185 | # The name of an image file (relative to this directory) to place at the top
|
184 | 186 | # of the sidebar.
|
185 |
| -#html_logo = None |
| 187 | +# html_logo = None |
186 | 188 |
|
187 | 189 | # The name of an image file (within the static path) to use as favicon of the
|
188 | 190 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
189 | 191 | # pixels large.
|
190 |
| -#html_favicon = None |
| 192 | +# html_favicon = None |
191 | 193 |
|
192 | 194 | # Add any paths that contain custom static files (such as style sheets) here,
|
193 | 195 | # relative to this directory. They are copied after the builtin static files,
|
|
196 | 198 |
|
197 | 199 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
198 | 200 | # using the given strftime format.
|
199 |
| -#html_last_updated_fmt = '%b %d, %Y' |
| 201 | +# html_last_updated_fmt = '%b %d, %Y' |
200 | 202 |
|
201 | 203 | # Content template for the index page.
|
202 | 204 | html_index = 'index.html'
|
203 | 205 |
|
204 | 206 | # If true, SmartyPants will be used to convert quotes and dashes to
|
205 | 207 | # typographically correct entities.
|
206 |
| -#html_use_smartypants = True |
| 208 | +# html_use_smartypants = True |
207 | 209 |
|
208 | 210 | # Custom sidebar templates, maps document names to template names.
|
209 |
| -html_sidebars = {'index': ['localtoc.html', 'relations.html', 'sourcelink.html', |
210 |
| - 'indexsidebar.html', 'searchbox.html', 'reggie.html']} |
| 211 | +html_sidebars = { |
| 212 | + 'index': [ |
| 213 | + 'localtoc.html', |
| 214 | + 'relations.html', |
| 215 | + 'sourcelink.html', |
| 216 | + 'indexsidebar.html', |
| 217 | + 'searchbox.html', |
| 218 | + 'reggie.html', |
| 219 | + ] |
| 220 | +} |
211 | 221 |
|
212 | 222 | # Additional templates that should be rendered to pages, maps page names to
|
213 | 223 | # template names.
|
214 |
| -#html_additional_pages = {'index': 'index.html'} |
| 224 | +# html_additional_pages = {'index': 'index.html'} |
215 | 225 |
|
216 | 226 | # If false, no module index is generated.
|
217 |
| -#html_use_modindex = True |
| 227 | +# html_use_modindex = True |
218 | 228 |
|
219 | 229 | # If false, no index is generated.
|
220 |
| -#html_use_index = True |
| 230 | +# html_use_index = True |
221 | 231 |
|
222 | 232 | # If true, the index is split into individual pages for each letter.
|
223 |
| -#html_split_index = False |
| 233 | +# html_split_index = False |
224 | 234 |
|
225 | 235 | # If true, links to the reST sources are added to the pages.
|
226 | 236 | html_show_sourcelink = True
|
227 | 237 |
|
228 | 238 | # If true, an OpenSearch description file will be output, and all pages will
|
229 | 239 | # contain a <link> tag referring to it. The value of this option must be the
|
230 | 240 | # base URL from which the finished HTML is served.
|
231 |
| -#html_use_opensearch = '' |
| 241 | +# html_use_opensearch = '' |
232 | 242 |
|
233 | 243 | # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
|
234 |
| -#html_file_suffix = '' |
| 244 | +# html_file_suffix = '' |
235 | 245 |
|
236 | 246 | # Output file base name for HTML help builder.
|
237 | 247 | htmlhelp_basename = 'nibabeldoc'
|
|
241 | 251 | # -- Options for LaTeX output -------------------------------------------------
|
242 | 252 |
|
243 | 253 | # The paper size ('letter' or 'a4').
|
244 |
| -#latex_paper_size = 'letter' |
| 254 | +# latex_paper_size = 'letter' |
245 | 255 |
|
246 | 256 | # The font size ('10pt', '11pt' or '12pt').
|
247 |
| -#latex_font_size = '10pt' |
| 257 | +# latex_font_size = '10pt' |
248 | 258 |
|
249 | 259 | # Grouping the document tree into LaTeX files. List of tuples
|
250 | 260 | # (source start file, target name, title, author,
|
251 | 261 | # documentclass [howto/manual]).
|
252 |
| -latex_documents = [ |
253 |
| - ('index', 'nibabel.tex', u'NiBabel Documentation', u'NiBabel Authors', |
254 |
| - 'manual')] |
| 262 | +latex_documents = [('index', 'nibabel.tex', 'NiBabel Documentation', 'NiBabel Authors', 'manual')] |
255 | 263 |
|
256 | 264 | # The name of an image file (relative to this directory) to place at the top of
|
257 | 265 | # the title page.
|
258 |
| -#latex_logo = None |
| 266 | +# latex_logo = None |
259 | 267 |
|
260 | 268 | # For "manual" documents, if this is true, then toplevel headings are parts,
|
261 | 269 | # not chapters.
|
262 |
| -#latex_use_parts = False |
| 270 | +# latex_use_parts = False |
263 | 271 |
|
264 | 272 | # Additional stuff for the LaTeX preamble.
|
265 |
| -#latex_preamble = '' |
| 273 | +# latex_preamble = '' |
266 | 274 |
|
267 | 275 | # Documents to append as an appendix to all manuals.
|
268 |
| -#latex_appendices = [] |
| 276 | +# latex_appendices = [] |
269 | 277 |
|
270 | 278 | # If false, no module index is generated.
|
271 |
| -#latex_use_modindex = True |
| 279 | +# latex_use_modindex = True |
272 | 280 |
|
273 | 281 |
|
274 | 282 | # Example configuration for intersphinx: refer to the Python standard library.
|
|
0 commit comments