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