|
12 | 12 | #
|
13 | 13 | import os
|
14 | 14 | import sys
|
| 15 | + |
15 | 16 | from packaging.version import Version
|
16 | 17 |
|
| 18 | +from smriprep import ( |
| 19 | + __copyright__ as _copyright, |
| 20 | +) |
17 | 21 | from smriprep import (
|
18 | 22 | __package__ as _package,
|
| 23 | +) |
| 24 | +from smriprep import ( |
19 | 25 | __version__ as _version,
|
20 |
| - __copyright__ as _copyright, |
21 | 26 | )
|
22 | 27 |
|
23 |
| -sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "sphinxext"))) |
| 28 | +sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), 'sphinxext'))) |
24 | 29 |
|
25 | 30 | from github_link import make_linkcode_resolve # noqa: E402
|
26 | 31 |
|
27 | 32 | os.environ['NO_ET'] = '1'
|
28 | 33 |
|
29 |
| -sys.path.insert(0, os.path.abspath("../wrapper")) |
| 34 | +sys.path.insert(0, os.path.abspath('../wrapper')) |
30 | 35 |
|
31 | 36 | # -- Project information -----------------------------------------------------
|
32 | 37 | project = _package
|
33 |
| -copyright = _copyright |
34 |
| -author = "The sMRIPrep Developers" |
| 38 | +copyright = _copyright # noqa: A001 |
| 39 | +author = 'The sMRIPrep Developers' |
35 | 40 |
|
36 | 41 | # The short X.Y version
|
37 | 42 | version = Version(_version).public
|
|
41 | 46 |
|
42 | 47 | # -- General configuration ---------------------------------------------------
|
43 | 48 | extensions = [
|
44 |
| - "sphinx.ext.autodoc", |
45 |
| - "sphinx.ext.doctest", |
46 |
| - "sphinx.ext.intersphinx", |
47 |
| - "sphinx.ext.coverage", |
48 |
| - "sphinx.ext.mathjax", |
49 |
| - "sphinx.ext.ifconfig", |
50 |
| - "sphinx.ext.viewcode", |
51 |
| - "sphinx.ext.githubpages", |
52 |
| - "sphinxarg.ext", # argparse extension |
53 |
| - "sphinxcontrib.apidoc", |
54 |
| - "nipype.sphinxext.plot_workflow", |
55 |
| - "nipype.sphinxext.apidoc", |
| 49 | + 'sphinx.ext.autodoc', |
| 50 | + 'sphinx.ext.doctest', |
| 51 | + 'sphinx.ext.intersphinx', |
| 52 | + 'sphinx.ext.coverage', |
| 53 | + 'sphinx.ext.mathjax', |
| 54 | + 'sphinx.ext.ifconfig', |
| 55 | + 'sphinx.ext.viewcode', |
| 56 | + 'sphinx.ext.githubpages', |
| 57 | + 'sphinxarg.ext', # argparse extension |
| 58 | + 'sphinxcontrib.apidoc', |
| 59 | + 'nipype.sphinxext.plot_workflow', |
| 60 | + 'nipype.sphinxext.apidoc', |
56 | 61 | ]
|
57 | 62 |
|
58 | 63 | autodoc_mock_imports = [
|
59 |
| - "matplotlib", |
60 |
| - "nilearn", |
61 |
| - "nitime", |
62 |
| - "pandas", |
63 |
| - "seaborn", |
64 |
| - "skimage", |
65 |
| - "svgutils", |
66 |
| - "transforms3d", |
| 64 | + 'matplotlib', |
| 65 | + 'nilearn', |
| 66 | + 'nitime', |
| 67 | + 'pandas', |
| 68 | + 'seaborn', |
| 69 | + 'skimage', |
| 70 | + 'svgutils', |
| 71 | + 'transforms3d', |
67 | 72 | ]
|
68 | 73 |
|
69 | 74 | # Accept custom section names to be parsed for numpy-style docstrings
|
|
72 | 77 | # https://github.com/sphinx-contrib/napoleon/pull/10 is merged.
|
73 | 78 | napoleon_use_param = False
|
74 | 79 | napoleon_custom_sections = [
|
75 |
| - ("Inputs", "Parameters"), |
76 |
| - ("Outputs", "Parameters"), |
77 |
| - ("Attributes", "Parameters"), |
78 |
| - ("Mandatory Inputs", "Parameters"), |
79 |
| - ("Optional Inputs", "Parameters"), |
| 80 | + ('Inputs', 'Parameters'), |
| 81 | + ('Outputs', 'Parameters'), |
| 82 | + ('Attributes', 'Parameters'), |
| 83 | + ('Mandatory Inputs', 'Parameters'), |
| 84 | + ('Optional Inputs', 'Parameters'), |
80 | 85 | ]
|
81 | 86 |
|
82 | 87 | # Add any paths that contain templates here, relative to this directory.
|
83 |
| -templates_path = ["_templates"] |
| 88 | +templates_path = ['_templates'] |
84 | 89 |
|
85 | 90 | # The suffix(es) of source filenames.
|
86 | 91 | # You can specify multiple suffix as a list of string:
|
87 | 92 | #
|
88 | 93 | # source_suffix = ['.rst', '.md']
|
89 |
| -source_suffix = ".rst" |
| 94 | +source_suffix = '.rst' |
90 | 95 |
|
91 | 96 | # The master toctree document.
|
92 |
| -master_doc = "index" |
| 97 | +master_doc = 'index' |
93 | 98 |
|
94 | 99 | # The language for content autogenerated by Sphinx. Refer to documentation
|
95 | 100 | # for a list of supported languages.
|
96 | 101 | #
|
97 | 102 | # This is also used if you do content translation via gettext catalogs.
|
98 | 103 | # Usually you set "language" from the command line for these cases.
|
99 |
| -language = "en" |
| 104 | +language = 'en' |
100 | 105 |
|
101 | 106 | # List of patterns, relative to source directory, that match files and
|
102 | 107 | # directories to ignore when looking for source files.
|
103 | 108 | # This pattern also affects html_static_path and html_extra_path.
|
104 | 109 | exclude_patterns = [
|
105 |
| - "_build", |
106 |
| - "Thumbs.db", |
107 |
| - ".DS_Store", |
108 |
| - "api/modules.rst", |
109 |
| - "api/smriprep.rst", |
| 110 | + '_build', |
| 111 | + 'Thumbs.db', |
| 112 | + '.DS_Store', |
| 113 | + 'api/modules.rst', |
| 114 | + 'api/smriprep.rst', |
110 | 115 | ]
|
111 | 116 |
|
112 | 117 | # The name of the Pygments (syntax highlighting) style to use.
|
|
118 | 123 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
119 | 124 | # a list of builtin themes.
|
120 | 125 | #
|
121 |
| -html_theme = "sphinx_rtd_theme" |
| 126 | +html_theme = 'sphinx_rtd_theme' |
122 | 127 |
|
123 | 128 | # Theme options are theme-specific and customize the look and feel of a theme
|
124 | 129 | # further. For a list of options available for each theme, see the
|
|
129 | 134 | # Add any paths that contain custom static files (such as style sheets) here,
|
130 | 135 | # relative to this directory. They are copied after the builtin static files,
|
131 | 136 | # so a file named "default.css" will overwrite the builtin "default.css".
|
132 |
| -html_static_path = ["_static"] |
| 137 | +html_static_path = ['_static'] |
133 | 138 |
|
134 | 139 | # Custom sidebar templates, must be a dictionary that maps document names
|
135 | 140 | # to template names.
|
|
145 | 150 | # -- Options for HTMLHelp output ---------------------------------------------
|
146 | 151 |
|
147 | 152 | # Output file base name for HTML help builder.
|
148 |
| -htmlhelp_basename = "smriprepdoc" |
| 153 | +htmlhelp_basename = 'smriprepdoc' |
149 | 154 |
|
150 | 155 |
|
151 | 156 | # -- Options for LaTeX output ------------------------------------------------
|
|
171 | 176 | latex_documents = [
|
172 | 177 | (
|
173 | 178 | master_doc,
|
174 |
| - "smriprep.tex", |
175 |
| - "sMRIPrep Documentation", |
176 |
| - "The NiPreps Developers", |
177 |
| - "manual", |
| 179 | + 'smriprep.tex', |
| 180 | + 'sMRIPrep Documentation', |
| 181 | + 'The NiPreps Developers', |
| 182 | + 'manual', |
178 | 183 | ),
|
179 | 184 | ]
|
180 | 185 |
|
|
183 | 188 |
|
184 | 189 | # One entry per manual page. List of tuples
|
185 | 190 | # (source start file, name, description, authors, manual section).
|
186 |
| -man_pages = [(master_doc, "smriprep", "sMRIPrep Documentation", [author], 1)] |
| 191 | +man_pages = [(master_doc, 'smriprep', 'sMRIPrep Documentation', [author], 1)] |
187 | 192 |
|
188 | 193 |
|
189 | 194 | # -- Options for Texinfo output ----------------------------------------------
|
|
194 | 199 | texinfo_documents = [
|
195 | 200 | (
|
196 | 201 | master_doc,
|
197 |
| - "smriprep", |
198 |
| - "sMRIPrep Documentation", |
| 202 | + 'smriprep', |
| 203 | + 'sMRIPrep Documentation', |
199 | 204 | author,
|
200 |
| - "sMRIPrep", |
201 |
| - "One line description of project.", |
202 |
| - "Miscellaneous", |
| 205 | + 'sMRIPrep', |
| 206 | + 'One line description of project.', |
| 207 | + 'Miscellaneous', |
203 | 208 | ),
|
204 | 209 | ]
|
205 | 210 |
|
|
219 | 224 | # epub_uid = ''
|
220 | 225 |
|
221 | 226 | # A list of files that should not be packed into the epub file.
|
222 |
| -epub_exclude_files = ["search.html"] |
| 227 | +epub_exclude_files = ['search.html'] |
223 | 228 |
|
224 | 229 |
|
225 | 230 | # -- Extension configuration -------------------------------------------------
|
226 | 231 |
|
227 |
| -apidoc_module_dir = "../smriprep" |
228 |
| -apidoc_output_dir = "api" |
| 232 | +apidoc_module_dir = '../smriprep' |
| 233 | +apidoc_output_dir = 'api' |
229 | 234 | apidoc_excluded_paths = [
|
230 |
| - "conftest.py", |
231 |
| - "*/conftest.py", |
232 |
| - "*/tests/*", |
233 |
| - "tests/*", |
234 |
| - "data/*", |
235 |
| - "conf/*", |
| 235 | + 'conftest.py', |
| 236 | + '*/conftest.py', |
| 237 | + '*/tests/*', |
| 238 | + 'tests/*', |
| 239 | + 'data/*', |
| 240 | + 'conf/*', |
236 | 241 | ]
|
237 | 242 | apidoc_separate_modules = True
|
238 |
| -apidoc_extra_args = ["--module-first", "-d 1", "-T"] |
| 243 | +apidoc_extra_args = ['--module-first', '-d 1', '-T'] |
239 | 244 |
|
240 | 245 | # Options for github links
|
241 | 246 | # The following is used by sphinx.ext.linkcode to provide links to github
|
242 | 247 | linkcode_resolve = make_linkcode_resolve(
|
243 |
| - "smriprep", |
244 |
| - "https://github.com/nipreps/smriprep/blob/{revision}/{package}/{path}#L{lineno}", |
| 248 | + 'smriprep', |
| 249 | + 'https://github.com/nipreps/smriprep/blob/{revision}/{package}/{path}#L{lineno}', |
245 | 250 | )
|
246 | 251 |
|
247 | 252 | # -- Options for intersphinx extension ---------------------------------------
|
248 | 253 | intersphinx_mapping = {
|
249 |
| - "python": ("https://docs.python.org/3/", None), |
250 |
| - "numpy": ("https://numpy.org/doc/stable/", None), |
251 |
| - "scipy": ("https://docs.scipy.org/doc/scipy/", None), |
252 |
| - "matplotlib": ("https://matplotlib.org/", None), |
253 |
| - "bids": ("https://bids-standard.github.io/pybids/", None), |
254 |
| - "nibabel": ("https://nipy.org/nibabel/", None), |
255 |
| - "nipype": ("https://nipype.readthedocs.io/en/latest/", None), |
256 |
| - "niworkflows": ("https://www.nipreps.org/niworkflows/", None), |
257 |
| - "templateflow": ("https://www.templateflow.org/python-client", None), |
| 254 | + 'python': ('https://docs.python.org/3/', None), |
| 255 | + 'numpy': ('https://numpy.org/doc/stable/', None), |
| 256 | + 'scipy': ('https://docs.scipy.org/doc/scipy/', None), |
| 257 | + 'matplotlib': ('https://matplotlib.org/', None), |
| 258 | + 'bids': ('https://bids-standard.github.io/pybids/', None), |
| 259 | + 'nibabel': ('https://nipy.org/nibabel/', None), |
| 260 | + 'nipype': ('https://nipype.readthedocs.io/en/latest/', None), |
| 261 | + 'niworkflows': ('https://www.nipreps.org/niworkflows/', None), |
| 262 | + 'templateflow': ('https://www.templateflow.org/python-client', None), |
258 | 263 | }
|
259 | 264 |
|
260 | 265 | # -- Options for versioning extension ----------------------------------------
|
|
0 commit comments