|
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 |
| - "numpy", |
63 |
| - "pandas", |
64 |
| - "seaborn", |
65 |
| - "skimage", |
66 |
| - "svgutils", |
67 |
| - "transforms3d", |
| 64 | + 'matplotlib', |
| 65 | + 'nilearn', |
| 66 | + 'nitime', |
| 67 | + 'pandas', |
| 68 | + 'seaborn', |
| 69 | + 'skimage', |
| 70 | + 'svgutils', |
| 71 | + 'transforms3d', |
68 | 72 | ]
|
69 | 73 |
|
70 | 74 | # Accept custom section names to be parsed for numpy-style docstrings
|
|
73 | 77 | # https://github.com/sphinx-contrib/napoleon/pull/10 is merged.
|
74 | 78 | napoleon_use_param = False
|
75 | 79 | napoleon_custom_sections = [
|
76 |
| - ("Inputs", "Parameters"), |
77 |
| - ("Outputs", "Parameters"), |
78 |
| - ("Attributes", "Parameters"), |
79 |
| - ("Mandatory Inputs", "Parameters"), |
80 |
| - ("Optional Inputs", "Parameters"), |
| 80 | + ('Inputs', 'Parameters'), |
| 81 | + ('Outputs', 'Parameters'), |
| 82 | + ('Attributes', 'Parameters'), |
| 83 | + ('Mandatory Inputs', 'Parameters'), |
| 84 | + ('Optional Inputs', 'Parameters'), |
81 | 85 | ]
|
82 | 86 |
|
83 | 87 | # Add any paths that contain templates here, relative to this directory.
|
84 |
| -templates_path = ["_templates"] |
| 88 | +templates_path = ['_templates'] |
85 | 89 |
|
86 | 90 | # The suffix(es) of source filenames.
|
87 | 91 | # You can specify multiple suffix as a list of string:
|
88 | 92 | #
|
89 | 93 | # source_suffix = ['.rst', '.md']
|
90 |
| -source_suffix = ".rst" |
| 94 | +source_suffix = '.rst' |
91 | 95 |
|
92 | 96 | # The master toctree document.
|
93 |
| -master_doc = "index" |
| 97 | +master_doc = 'index' |
94 | 98 |
|
95 | 99 | # The language for content autogenerated by Sphinx. Refer to documentation
|
96 | 100 | # for a list of supported languages.
|
97 | 101 | #
|
98 | 102 | # This is also used if you do content translation via gettext catalogs.
|
99 | 103 | # Usually you set "language" from the command line for these cases.
|
100 |
| -language = "en" |
| 104 | +language = 'en' |
101 | 105 |
|
102 | 106 | # List of patterns, relative to source directory, that match files and
|
103 | 107 | # directories to ignore when looking for source files.
|
104 | 108 | # This pattern also affects html_static_path and html_extra_path.
|
105 | 109 | exclude_patterns = [
|
106 |
| - "_build", |
107 |
| - "Thumbs.db", |
108 |
| - ".DS_Store", |
109 |
| - "api/modules.rst", |
110 |
| - "api/smriprep.rst", |
| 110 | + '_build', |
| 111 | + 'Thumbs.db', |
| 112 | + '.DS_Store', |
| 113 | + 'api/modules.rst', |
| 114 | + 'api/smriprep.rst', |
111 | 115 | ]
|
112 | 116 |
|
113 | 117 | # The name of the Pygments (syntax highlighting) style to use.
|
|
119 | 123 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
120 | 124 | # a list of builtin themes.
|
121 | 125 | #
|
122 |
| -html_theme = "sphinx_rtd_theme" |
| 126 | +html_theme = 'sphinx_rtd_theme' |
123 | 127 |
|
124 | 128 | # Theme options are theme-specific and customize the look and feel of a theme
|
125 | 129 | # further. For a list of options available for each theme, see the
|
|
130 | 134 | # Add any paths that contain custom static files (such as style sheets) here,
|
131 | 135 | # relative to this directory. They are copied after the builtin static files,
|
132 | 136 | # so a file named "default.css" will overwrite the builtin "default.css".
|
133 |
| -html_static_path = ["_static"] |
| 137 | +html_static_path = ['_static'] |
134 | 138 |
|
135 | 139 | # Custom sidebar templates, must be a dictionary that maps document names
|
136 | 140 | # to template names.
|
|
146 | 150 | # -- Options for HTMLHelp output ---------------------------------------------
|
147 | 151 |
|
148 | 152 | # Output file base name for HTML help builder.
|
149 |
| -htmlhelp_basename = "smriprepdoc" |
| 153 | +htmlhelp_basename = 'smriprepdoc' |
150 | 154 |
|
151 | 155 |
|
152 | 156 | # -- Options for LaTeX output ------------------------------------------------
|
|
172 | 176 | latex_documents = [
|
173 | 177 | (
|
174 | 178 | master_doc,
|
175 |
| - "smriprep.tex", |
176 |
| - "sMRIPrep Documentation", |
177 |
| - "The NiPreps Developers", |
178 |
| - "manual", |
| 179 | + 'smriprep.tex', |
| 180 | + 'sMRIPrep Documentation', |
| 181 | + 'The NiPreps Developers', |
| 182 | + 'manual', |
179 | 183 | ),
|
180 | 184 | ]
|
181 | 185 |
|
|
184 | 188 |
|
185 | 189 | # One entry per manual page. List of tuples
|
186 | 190 | # (source start file, name, description, authors, manual section).
|
187 |
| -man_pages = [(master_doc, "smriprep", "sMRIPrep Documentation", [author], 1)] |
| 191 | +man_pages = [(master_doc, 'smriprep', 'sMRIPrep Documentation', [author], 1)] |
188 | 192 |
|
189 | 193 |
|
190 | 194 | # -- Options for Texinfo output ----------------------------------------------
|
|
195 | 199 | texinfo_documents = [
|
196 | 200 | (
|
197 | 201 | master_doc,
|
198 |
| - "smriprep", |
199 |
| - "sMRIPrep Documentation", |
| 202 | + 'smriprep', |
| 203 | + 'sMRIPrep Documentation', |
200 | 204 | author,
|
201 |
| - "sMRIPrep", |
202 |
| - "One line description of project.", |
203 |
| - "Miscellaneous", |
| 205 | + 'sMRIPrep', |
| 206 | + 'One line description of project.', |
| 207 | + 'Miscellaneous', |
204 | 208 | ),
|
205 | 209 | ]
|
206 | 210 |
|
|
220 | 224 | # epub_uid = ''
|
221 | 225 |
|
222 | 226 | # A list of files that should not be packed into the epub file.
|
223 |
| -epub_exclude_files = ["search.html"] |
| 227 | +epub_exclude_files = ['search.html'] |
224 | 228 |
|
225 | 229 |
|
226 | 230 | # -- Extension configuration -------------------------------------------------
|
227 | 231 |
|
228 |
| -apidoc_module_dir = "../smriprep" |
229 |
| -apidoc_output_dir = "api" |
| 232 | +apidoc_module_dir = '../smriprep' |
| 233 | +apidoc_output_dir = 'api' |
230 | 234 | apidoc_excluded_paths = [
|
231 |
| - "conftest.py", |
232 |
| - "*/conftest.py", |
233 |
| - "*/tests/*", |
234 |
| - "tests/*", |
235 |
| - "data/*", |
236 |
| - "conf/*", |
| 235 | + 'conftest.py', |
| 236 | + '*/conftest.py', |
| 237 | + '*/tests/*', |
| 238 | + 'tests/*', |
| 239 | + 'data/*', |
| 240 | + 'conf/*', |
237 | 241 | ]
|
238 | 242 | apidoc_separate_modules = True
|
239 |
| -apidoc_extra_args = ["--module-first", "-d 1", "-T"] |
| 243 | +apidoc_extra_args = ['--module-first', '-d 1', '-T'] |
240 | 244 |
|
241 | 245 | # Options for github links
|
242 | 246 | # The following is used by sphinx.ext.linkcode to provide links to github
|
243 | 247 | linkcode_resolve = make_linkcode_resolve(
|
244 |
| - "smriprep", |
245 |
| - "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}', |
246 | 250 | )
|
247 | 251 |
|
248 | 252 | # -- Options for intersphinx extension ---------------------------------------
|
249 | 253 | intersphinx_mapping = {
|
250 |
| - "python": ("https://docs.python.org/3/", None), |
251 |
| - "numpy": ("https://numpy.org/doc/stable/", None), |
252 |
| - "scipy": ("https://docs.scipy.org/doc/scipy/", None), |
253 |
| - "matplotlib": ("https://matplotlib.org/", None), |
254 |
| - "bids": ("https://bids-standard.github.io/pybids/", None), |
255 |
| - "nibabel": ("https://nipy.org/nibabel/", None), |
256 |
| - "nipype": ("https://nipype.readthedocs.io/en/latest/", None), |
257 |
| - "niworkflows": ("https://www.nipreps.org/niworkflows/", None), |
258 |
| - "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), |
259 | 263 | }
|
260 | 264 |
|
261 | 265 | # -- Options for versioning extension ----------------------------------------
|
|
0 commit comments