|
21 | 21 | # If extensions (or modules to document with autodoc) are in another directory,
|
22 | 22 | # add these directories to sys.path here. If the directory is relative to the
|
23 | 23 | # documentation root, use os.path.abspath to make it absolute, like shown here.
|
24 |
| -sys.path.append(os.path.abspath('sphinxext')) |
25 |
| -sys.path.insert(0, os.path.abspath('../wrapper')) |
| 24 | +sys.path.append(os.path.abspath("sphinxext")) |
| 25 | +sys.path.insert(0, os.path.abspath("../wrapper")) |
26 | 26 |
|
27 | 27 | from github_link import make_linkcode_resolve
|
28 | 28 |
|
29 | 29 | # -- General configuration ------------------------------------------------
|
30 | 30 |
|
31 | 31 | # If your documentation needs a minimal Sphinx version, state it here.
|
32 |
| -needs_sphinx = '1.5.3' |
| 32 | +needs_sphinx = "1.5.3" |
33 | 33 |
|
34 | 34 | # Add any Sphinx extension module names here, as strings. They can be
|
35 |
| -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 35 | +# extensions coming with Sphinx (named "sphinx.ext.*") or your custom |
36 | 36 | # ones.
|
37 | 37 | extensions = [
|
38 |
| - 'sphinx.ext.autodoc', |
39 |
| - 'sphinx.ext.doctest', |
40 |
| - 'sphinx.ext.intersphinx', |
41 |
| - 'sphinx.ext.coverage', |
42 |
| - 'sphinx.ext.mathjax', |
43 |
| - 'sphinx.ext.linkcode', |
44 |
| - 'sphinxarg.ext', # argparse extension |
45 |
| - 'nipype.sphinxext.plot_workflow', |
46 |
| - 'nbsphinx', |
47 |
| - 'sphinxcontrib.napoleon', |
| 38 | + "sphinx.ext.autodoc", |
| 39 | + "sphinx.ext.doctest", |
| 40 | + "sphinx.ext.intersphinx", |
| 41 | + "sphinx.ext.coverage", |
| 42 | + "sphinx.ext.mathjax", |
| 43 | + "sphinx.ext.linkcode", |
| 44 | + "sphinxarg.ext", # argparse extension |
| 45 | + "nipype.sphinxext.plot_workflow", |
| 46 | + "nbsphinx", |
| 47 | + "sphinxcontrib.napoleon", |
48 | 48 | ]
|
49 | 49 |
|
50 | 50 | # Mock modules in autodoc:
|
51 | 51 | autodoc_mock_imports = [
|
52 |
| - 'numpy', |
53 |
| - 'nitime', |
54 |
| - 'matplotlib', |
| 52 | + "numpy", |
| 53 | + "nitime", |
| 54 | + "matplotlib", |
55 | 55 | ]
|
56 | 56 |
|
57 |
| -if pver.parse(sphinxversion) >= pver.parse('1.7.0'): |
| 57 | +if pver.parse(sphinxversion) >= pver.parse("1.7.0"): |
58 | 58 | autodoc_mock_imports += [
|
59 |
| - 'pandas', |
60 |
| - 'nilearn', |
61 |
| - 'seaborn', |
| 59 | + "pandas", |
| 60 | + "nilearn", |
| 61 | + "seaborn", |
62 | 62 | ]
|
63 | 63 |
|
64 | 64 | # Add any paths that contain templates here, relative to this directory.
|
65 |
| -templates_path = ['_templates'] |
| 65 | +templates_path = ["_templates"] |
66 | 66 |
|
67 | 67 | # Accept custom section names to be parsed for numpy-style docstrings
|
68 | 68 | # of parameters.
|
69 | 69 | # Requires pinning sphinxcontrib-napoleon to a specific commit while
|
70 | 70 | # https://github.com/sphinx-contrib/napoleon/pull/10 is merged.
|
71 | 71 | napoleon_use_param = False
|
72 | 72 | napoleon_custom_sections = [
|
73 |
| - ('Inputs', 'Parameters'), |
74 |
| - ('Outputs', 'Parameters'), |
| 73 | + ("Inputs", "Parameters"), |
| 74 | + ("Outputs", "Parameters"), |
75 | 75 | ]
|
76 | 76 |
|
77 | 77 | # The suffix(es) of source filenames.
|
78 | 78 | # You can specify multiple suffix as a list of string:
|
79 |
| -# source_suffix = ['.rst', '.md'] |
80 |
| -source_suffix = '.rst' |
| 79 | +# source_suffix = [".rst", ".md"] |
| 80 | +source_suffix = ".rst" |
81 | 81 |
|
82 | 82 | # The encoding of source files.
|
83 |
| -# source_encoding = 'utf-8-sig' |
| 83 | +# source_encoding = "utf-8-sig" |
84 | 84 |
|
85 | 85 | # The master toctree document.
|
86 |
| -master_doc = 'index' |
| 86 | +master_doc = "index" |
87 | 87 |
|
88 | 88 | # General information about the project.
|
89 |
| -project = 'fmriprep' |
90 |
| -author = 'The fMRIPrep developers' |
91 |
| -copyright = '2016-%s, %s' % (datetime.now().year, author) |
| 89 | +project = "fmriprep" |
| 90 | +author = "The fMRIPrep developers" |
| 91 | +copyright = "2016-%s, %s" % (datetime.now().year, author) |
92 | 92 |
|
93 | 93 | # The version info for the project you're documenting, acts as replacement for
|
94 | 94 | # |version| and |release|, also used in various other places throughout the
|
95 | 95 | # built documents.
|
96 | 96 | #
|
97 | 97 | # The short X.Y version.
|
98 |
| -version = u'version' |
| 98 | +version = "version" |
99 | 99 | # The full version, including alpha/beta/rc tags.
|
100 |
| -release = u'version' |
| 100 | +release = "version" |
101 | 101 |
|
102 | 102 | # The language for content autogenerated by Sphinx. Refer to documentation
|
103 | 103 | # for a list of supported languages.
|
|
115 | 115 | # List of patterns, relative to source directory, that match files and
|
116 | 116 | # directories to ignore when looking for source files.
|
117 | 117 | # This patterns also effect to html_static_path and html_extra_path
|
118 |
| -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] |
| 118 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
119 | 119 |
|
120 | 120 | # The reST default role (used for this markup: `text`) to use for all
|
121 | 121 | # documents.
|
|
133 | 133 | # show_authors = False
|
134 | 134 |
|
135 | 135 | # The name of the Pygments (syntax highlighting) style to use.
|
136 |
| -pygments_style = 'sphinx' |
| 136 | +pygments_style = "sphinx" |
137 | 137 |
|
138 | 138 | # A list of ignored prefixes for module index sorting.
|
139 | 139 | # modindex_common_prefix = []
|
|
149 | 149 |
|
150 | 150 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
151 | 151 | # a list of builtin themes.
|
152 |
| -html_theme = 'sphinx_rtd_theme' |
| 152 | +html_theme = "sphinx_rtd_theme" |
153 | 153 |
|
154 | 154 | # Theme options are theme-specific and customize the look and feel of a theme
|
155 | 155 | # further. For a list of options available for each theme, see the
|
|
178 | 178 | # Add any paths that contain custom static files (such as style sheets) here,
|
179 | 179 | # relative to this directory. They are copied after the builtin static files,
|
180 | 180 | # so a file named "default.css" will overwrite the builtin "default.css".
|
181 |
| -html_static_path = ['_static'] |
| 181 | +html_static_path = ["_static"] |
182 | 182 |
|
183 | 183 | # Add any extra paths that contain custom files (such as robots.txt or
|
184 | 184 | # .htaccess) here, relative to this directory. These files are copied
|
|
243 | 243 | # html_search_scorer = 'scorer.js'
|
244 | 244 |
|
245 | 245 | # Output file base name for HTML help builder.
|
246 |
| -htmlhelp_basename = 'fmriprepdoc' |
| 246 | +htmlhelp_basename = "fmriprepdoc" |
247 | 247 |
|
248 | 248 | # -- Options for LaTeX output ---------------------------------------------
|
249 | 249 |
|
|
265 | 265 | # (source start file, target name, title,
|
266 | 266 | # author, documentclass [howto, manual, or own class]).
|
267 | 267 | latex_documents = [
|
268 |
| - (master_doc, 'fmriprep.tex', u'fMRIprep Documentation', |
| 268 | + (master_doc, "fmriprep.tex", "fMRIprep Documentation", |
269 | 269 | author,
|
270 |
| - 'manual'), |
| 270 | + "manual"), |
271 | 271 | ]
|
272 | 272 |
|
273 | 273 | # The name of an image file (relative to this directory) to place at the top of
|
|
296 | 296 | # One entry per manual page. List of tuples
|
297 | 297 | # (source start file, name, description, authors, manual section).
|
298 | 298 | man_pages = [
|
299 |
| - (master_doc, 'fmriprep', u'fmriprep Documentation', |
| 299 | + (master_doc, "fmriprep", "fmriprep Documentation", |
300 | 300 | [author], 1)
|
301 | 301 | ]
|
302 | 302 |
|
|
310 | 310 | # (source start file, target name, title, author,
|
311 | 311 | # dir menu entry, description, category)
|
312 | 312 | texinfo_documents = [
|
313 |
| - (master_doc, 'fmriprep', u'fMRIprep Documentation', |
314 |
| - author, 'fmriprep', 'One line description of project.', |
315 |
| - 'Miscellaneous'), |
| 313 | + (master_doc, "fmriprep", "fMRIprep Documentation", |
| 314 | + author, "fmriprep", "One line description of project.", |
| 315 | + "Miscellaneous"), |
316 | 316 | ]
|
317 | 317 |
|
318 | 318 | # Documents to append as an appendix to all manuals.
|
|
328 | 328 | # texinfo_no_detailmenu = False
|
329 | 329 |
|
330 | 330 | # The following is used by sphinx.ext.linkcode to provide links to github
|
331 |
| -linkcode_resolve = make_linkcode_resolve('fmriprep', |
332 |
| - u'https://github.com/poldracklab/' |
333 |
| - 'fmriprep/blob/{revision}/' |
334 |
| - '{package}/{path}#L{lineno}') |
| 331 | +linkcode_resolve = make_linkcode_resolve("fmriprep", |
| 332 | + "https://github.com/poldracklab/" |
| 333 | + "fmriprep/blob/{revision}/" |
| 334 | + "{package}/{path}#L{lineno}") |
335 | 335 |
|
336 | 336 | # Example configuration for intersphinx: refer to the Python standard library.
|
337 |
| -intersphinx_mapping = {'https://docs.python.org/': None} |
| 337 | +intersphinx_mapping = { |
| 338 | + "python": ("https://docs.python.org/", None), |
| 339 | + "numpy": ("http://docs.scipy.org/doc/numpy", None), |
| 340 | + "scipy": ("http://docs.scipy.org/doc/scipy/reference", None), |
| 341 | + "matplotlib": ("http://matplotlib.sourceforge.net", None), |
| 342 | + "bids": ("https://bids-standard.github.io/pybids/", None), |
| 343 | + "nibabel": ("https://nipy.org/nibabel/", None), |
| 344 | + "nipype": ("https://nipype.readthedocs.io/en/latest/", None), |
| 345 | + "niworkflows": ("https://poldracklab.github.io/niworkflows/", None), |
| 346 | + "sdcflows": ("https://www.nipreps.org/sdcflows/", None), |
| 347 | + "smriprep": ("https://poldracklab.github.io/smriprep/", None), |
| 348 | + "templateflow": ("https://www.templateflow.org/python-client", None), |
| 349 | +} |
338 | 350 |
|
339 | 351 | suppress_warnings = ["image.nonlocal_uri"]
|
340 | 352 |
|
341 | 353 |
|
342 | 354 | def setup(app):
|
343 |
| - app.add_stylesheet('theme_overrides.css') |
| 355 | + app.add_stylesheet("theme_overrides.css") |
344 | 356 | # We need this for the boilerplate script
|
345 | 357 | app.add_javascript("https://cdn.rawgit.com/chrisfilo/zenodo.js/v0.1/zenodo.js")
|
0 commit comments