|
1 |
| -# Configuration file for the Sphinx documentation builder. |
2 |
| -# |
3 |
| -# This file does only contain a selection of the most common options. For a |
4 |
| -# full list see the documentation: |
5 |
| -# http://www.sphinx-doc.org/en/master/config |
| 1 | +""" |
| 2 | +Configuration file for the Sphinx documentation builder. |
6 | 3 |
|
7 |
| -# -- Path setup -------------------------------------------------------------- |
| 4 | +This file does only contain a selection of the most common options. For a |
| 5 | +full list see the documentation: |
| 6 | +http://www.sphinx-doc.org/en/master/config |
8 | 7 |
|
9 |
| -# If extensions (or modules to document with autodoc) are in another directory, |
10 |
| -# add these directories to sys.path here. If the directory is relative to the |
11 |
| -# documentation root, use os.path.abspath to make it absolute, like shown here. |
12 |
| -# |
13 |
| -import os |
14 |
| -import sys |
| 8 | +""" |
15 | 9 | from packaging.version import Version
|
16 |
| - |
17 | 10 | from sdcflows import __version__, __copyright__, __packagename__
|
18 | 11 |
|
19 |
| -sys.path.append(os.path.abspath('sphinxext')) |
| 12 | +# -- Path setup -------------------------------------------------------------- |
| 13 | +# If extensions (or modules to document with autodoc) are in another directory, |
| 14 | +# add these directories to sys.path here. If the directory is relative to the |
| 15 | +# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 16 | +# sys.path.append(os.path.abspath("sphinxext")) |
20 | 17 |
|
21 | 18 | # -- Project information -----------------------------------------------------
|
22 | 19 | project = __packagename__
|
23 | 20 | copyright = __copyright__
|
24 |
| -author = 'The SDCflows Developers' |
| 21 | +author = "The SDCflows Developers" |
25 | 22 |
|
26 | 23 | # The short X.Y version
|
27 | 24 | version = Version(__version__).public
|
28 | 25 | # The full version, including alpha/beta/rc tags
|
29 |
| -release = version |
30 |
| - |
| 26 | +release = __version__ |
31 | 27 |
|
32 | 28 | # -- General configuration ---------------------------------------------------
|
33 | 29 | extensions = [
|
34 |
| - 'sphinx.ext.autodoc', |
35 |
| - 'sphinx.ext.doctest', |
36 |
| - 'sphinx.ext.intersphinx', |
37 |
| - 'sphinx.ext.coverage', |
38 |
| - 'sphinx.ext.mathjax', |
39 |
| - 'sphinx.ext.ifconfig', |
40 |
| - 'sphinx.ext.viewcode', |
41 |
| - 'sphinx.ext.githubpages', |
42 |
| - 'nipype.sphinxext.plot_workflow', |
43 |
| - 'sphinxcontrib.apidoc', |
44 |
| - 'sphinxcontrib.napoleon' |
| 30 | + "sphinx.ext.autodoc", |
| 31 | + "sphinx.ext.coverage", |
| 32 | + "sphinx.ext.doctest", |
| 33 | + "sphinx.ext.githubpages", |
| 34 | + "sphinx.ext.ifconfig", |
| 35 | + "sphinx.ext.intersphinx", |
| 36 | + "sphinx.ext.mathjax", |
| 37 | + "sphinx.ext.viewcode", |
| 38 | + "sphinxcontrib.apidoc", |
| 39 | + "nipype.sphinxext.apidoc", |
| 40 | + "nipype.sphinxext.plot_workflow", |
45 | 41 | ]
|
46 | 42 |
|
47 | 43 | autodoc_mock_imports = [
|
48 |
| - 'matplotlib', |
49 |
| - 'nilearn', |
50 |
| - 'nipy', |
51 |
| - 'nitime', |
52 |
| - 'numpy', |
53 |
| - 'pandas', |
54 |
| - 'seaborn', |
55 |
| - 'skimage', |
56 |
| - 'svgutils', |
57 |
| - 'transforms3d', |
| 44 | + "matplotlib", |
| 45 | + "nilearn", |
| 46 | + "nipy", |
| 47 | + "nitime", |
| 48 | + "numpy", |
| 49 | + "pandas", |
| 50 | + "seaborn", |
| 51 | + "skimage", |
| 52 | + "svgutils", |
| 53 | + "transforms3d", |
58 | 54 | ]
|
59 | 55 |
|
60 | 56 | # Accept custom section names to be parsed for numpy-style docstrings
|
61 | 57 | # of parameters.
|
62 |
| -# Requires pinning sphinxcontrib-napoleon to a specific commit while |
63 |
| -# https://github.com/sphinx-contrib/napoleon/pull/10 is merged. |
64 | 58 | napoleon_use_param = False
|
65 | 59 | napoleon_custom_sections = [
|
66 |
| - ('Inputs', 'Parameters'), |
67 |
| - ('Outputs', 'Parameters'), |
| 60 | + ("Inputs", "Parameters"), |
| 61 | + ("Outputs", "Parameters"), |
| 62 | + ("Attributes", "Parameters"), |
| 63 | + ("Mandatory Inputs", "Parameters"), |
| 64 | + ("Optional Inputs", "Parameters"), |
68 | 65 | ]
|
69 | 66 |
|
70 | 67 | # Add any paths that contain templates here, relative to this directory.
|
71 |
| -templates_path = ['_templates'] |
| 68 | +templates_path = ["_templates"] |
72 | 69 |
|
73 | 70 | # The suffix(es) of source filenames.
|
74 | 71 | # You can specify multiple suffix as a list of string:
|
75 | 72 | #
|
76 | 73 | # source_suffix = ['.rst', '.md']
|
77 |
| -source_suffix = '.rst' |
| 74 | +source_suffix = ".rst" |
78 | 75 |
|
79 | 76 | # The master toctree document.
|
80 |
| -master_doc = 'index' |
| 77 | +master_doc = "index" |
| 78 | + |
| 79 | +numfig = True |
81 | 80 |
|
82 | 81 | # The language for content autogenerated by Sphinx. Refer to documentation
|
83 | 82 | # for a list of supported languages.
|
|
90 | 89 | # directories to ignore when looking for source files.
|
91 | 90 | # This pattern also affects html_static_path and html_extra_path.
|
92 | 91 | exclude_patterns = [
|
93 |
| - '_build', 'Thumbs.db', '.DS_Store', |
94 |
| - 'api/sdcflows.rst', |
95 |
| - 'api/sdcflows.cli.rst', 'api/sdcflows.cli.*.rst'] |
| 92 | + "_build", |
| 93 | + "Thumbs.db", |
| 94 | + ".DS_Store", |
| 95 | + "api/sdcflows.rst", |
| 96 | +] |
96 | 97 |
|
97 | 98 | # The name of the Pygments (syntax highlighting) style to use.
|
98 | 99 | pygments_style = None
|
|
103 | 104 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
104 | 105 | # a list of builtin themes.
|
105 | 106 | #
|
106 |
| -html_theme = 'sphinx_rtd_theme' |
| 107 | +html_theme = "furo" |
107 | 108 |
|
108 | 109 | # Theme options are theme-specific and customize the look and feel of a theme
|
109 | 110 | # further. For a list of options available for each theme, see the
|
|
114 | 115 | # Add any paths that contain custom static files (such as style sheets) here,
|
115 | 116 | # relative to this directory. They are copied after the builtin static files,
|
116 | 117 | # so a file named "default.css" will overwrite the builtin "default.css".
|
117 |
| -html_static_path = ['_static'] |
| 118 | +html_static_path = ["_static"] |
| 119 | +html_js_files = [ |
| 120 | + "js/version-switch.js", |
| 121 | +] |
| 122 | +html_css_files = [ |
| 123 | + "css/version-switch.css", |
| 124 | +] |
118 | 125 |
|
119 | 126 | # Custom sidebar templates, must be a dictionary that maps document names
|
120 | 127 | # to template names.
|
|
130 | 137 | # -- Options for HTMLHelp output ---------------------------------------------
|
131 | 138 |
|
132 | 139 | # Output file base name for HTML help builder.
|
133 |
| -htmlhelp_basename = 'sdcflowsdoc' |
| 140 | +htmlhelp_basename = "sdcflowsdoc" |
134 | 141 |
|
135 | 142 |
|
136 | 143 | # -- Options for LaTeX output ------------------------------------------------
|
|
139 | 146 | # The paper size ('letterpaper' or 'a4paper').
|
140 | 147 | #
|
141 | 148 | # 'papersize': 'letterpaper',
|
142 |
| - |
143 | 149 | # The font size ('10pt', '11pt' or '12pt').
|
144 | 150 | #
|
145 | 151 | # 'pointsize': '10pt',
|
146 |
| - |
147 | 152 | # Additional stuff for the LaTeX preamble.
|
148 | 153 | #
|
149 | 154 | # 'preamble': '',
|
150 |
| - |
151 | 155 | # Latex figure (float) alignment
|
152 | 156 | #
|
153 | 157 | # 'figure_align': 'htbp',
|
|
157 | 161 | # (source start file, target name, title,
|
158 | 162 | # author, documentclass [howto, manual, or own class]).
|
159 | 163 | latex_documents = [
|
160 |
| - (master_doc, 'smriprep.tex', 'sMRIPrep Documentation', |
161 |
| - 'The sMRIPrep Developers', 'manual'), |
| 164 | + ( |
| 165 | + master_doc, |
| 166 | + "smriprep.tex", |
| 167 | + "sMRIPrep Documentation", |
| 168 | + "The sMRIPrep Developers", |
| 169 | + "manual", |
| 170 | + ), |
162 | 171 | ]
|
163 | 172 |
|
164 | 173 |
|
165 | 174 | # -- Options for manual page output ------------------------------------------
|
166 | 175 |
|
167 | 176 | # One entry per manual page. List of tuples
|
168 | 177 | # (source start file, name, description, authors, manual section).
|
169 |
| -man_pages = [ |
170 |
| - (master_doc, 'smriprep', 'sMRIPrep Documentation', |
171 |
| - [author], 1) |
172 |
| -] |
| 178 | +man_pages = [(master_doc, "smriprep", "sMRIPrep Documentation", [author], 1)] |
173 | 179 |
|
174 | 180 |
|
175 | 181 | # -- Options for Texinfo output ----------------------------------------------
|
|
178 | 184 | # (source start file, target name, title, author,
|
179 | 185 | # dir menu entry, description, category)
|
180 | 186 | texinfo_documents = [
|
181 |
| - (master_doc, 'smriprep', 'sMRIPrep Documentation', |
182 |
| - author, 'sMRIPrep', 'One line description of project.', |
183 |
| - 'Miscellaneous'), |
| 187 | + ( |
| 188 | + master_doc, |
| 189 | + "smriprep", |
| 190 | + "sMRIPrep Documentation", |
| 191 | + author, |
| 192 | + "sMRIPrep", |
| 193 | + "One line description of project.", |
| 194 | + "Miscellaneous", |
| 195 | + ), |
184 | 196 | ]
|
185 | 197 |
|
186 | 198 |
|
|
199 | 211 | # epub_uid = ''
|
200 | 212 |
|
201 | 213 | # A list of files that should not be packed into the epub file.
|
202 |
| -epub_exclude_files = ['search.html'] |
| 214 | +epub_exclude_files = ["search.html"] |
203 | 215 |
|
204 | 216 |
|
205 | 217 | # -- Extension configuration -------------------------------------------------
|
206 | 218 |
|
207 |
| -apidoc_module_dir = '../sdcflows' |
208 |
| -apidoc_output_dir = 'api' |
209 |
| -apidoc_excluded_paths = ['conftest.py', '*/tests/*', 'tests/*', 'data/*'] |
| 219 | +apidoc_module_dir = "../sdcflows" |
| 220 | +apidoc_output_dir = "api" |
| 221 | +apidoc_excluded_paths = ["conftest.py", "*/tests/*", "tests/*", "data/*"] |
210 | 222 | apidoc_separate_modules = True
|
211 |
| -apidoc_extra_args = ['--module-first', '-d 1', '-T'] |
| 223 | +apidoc_extra_args = ["--module-first", "-d 1", "-T"] |
212 | 224 |
|
213 | 225 | # -- Options for intersphinx extension ---------------------------------------
|
214 | 226 |
|
215 | 227 | # Example configuration for intersphinx: refer to the Python standard library.
|
216 |
| -intersphinx_mapping = {'https://docs.python.org/': None} |
| 228 | +intersphinx_mapping = { |
| 229 | + "python": ("https://docs.python.org/3/", None), |
| 230 | + "numpy": ("https://numpy.org/doc/stable/", None), |
| 231 | + "scipy": ("https://docs.scipy.org/doc/scipy/", None), |
| 232 | + "matplotlib": ("https://matplotlib.org/stable", None), |
| 233 | + "bids": ("https://bids-standard.github.io/pybids/", None), |
| 234 | + "nibabel": ("https://nipy.org/nibabel/", None), |
| 235 | + "nipype": ("https://nipype.readthedocs.io/en/latest/", None), |
| 236 | + "niworkflows": ("https://www.nipreps.org/niworkflows/", None), |
| 237 | + "smriprep": ("https://www.nipreps.org/smriprep/", None), |
| 238 | + "templateflow": ("https://www.templateflow.org/python-client", None), |
| 239 | +} |
217 | 240 |
|
218 | 241 | # -- Options for versioning extension ----------------------------------------
|
219 | 242 | scv_show_banner = True
|
0 commit comments