Skip to content

Commit 893af71

Browse files
committed
DOC: Update docs wholesale from master
1 parent e338802 commit 893af71

File tree

5 files changed

+29
-591
lines changed

5 files changed

+29
-591
lines changed

docs/conf.py

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,29 @@
1414
#
1515
import os
1616
import sys
17+
from unittest import mock
18+
import tempfile
19+
1720
from packaging.version import Version
21+
import templateflow
22+
23+
# Prevent etelemetry from loading at all
24+
# Could set NO_ET environment variable, but why?
25+
MOCKS = [
26+
"etelemetry",
27+
"matplotlib",
28+
"matplotlib.pyplot",
29+
"matplotlib.cm",
30+
"matplotlib.colors",
31+
"matplotlib.colorbar",
32+
]
33+
sys.modules.update({mod: mock.Mock() for mod in MOCKS})
34+
35+
# Keep templateflow API intact except for fetching files.
36+
# Return an existent but empty temporary file
37+
tffiledesc, tffilename = tempfile.mkstemp()
38+
os.close(tffiledesc)
39+
templateflow.api.get = mock.MagicMock(return_value=tffilename)
1840

1941
from niworkflows import __version__, __copyright__, __packagename__
2042

@@ -47,7 +69,6 @@
4769
]
4870

4971
autodoc_mock_imports = [
50-
"matplotlib",
5172
"nilearn",
5273
"nitime",
5374
"numpy",
@@ -57,6 +78,7 @@
5778
"svgutils",
5879
"templateflow",
5980
"transforms3d",
81+
"yaml",
6082
]
6183

6284
# Accept custom section names to be parsed for numpy-style docstrings
@@ -225,7 +247,7 @@
225247

226248
apidoc_module_dir = "../niworkflows"
227249
apidoc_output_dir = "api"
228-
apidoc_excluded_paths = ["conftest.py", "*/tests/*", "tests/*", "data/*"]
250+
apidoc_excluded_paths = ["conftest.py", "*/tests/*", "tests/*", "data/*", "testing.py"]
229251
apidoc_separate_modules = True
230252
apidoc_extra_args = ["--module-first", "-d 1", "-T"]
231253

@@ -234,13 +256,13 @@
234256
# Example configuration for intersphinx: refer to the Python standard library.
235257
intersphinx_mapping = {
236258
"bids": ("https://bids-standard.github.io/pybids/", None),
237-
"matplotlib": ("https://matplotlib.org/", None),
259+
"matplotlib": ("https://matplotlib.org/stable", None),
238260
"nibabel": ("https://nipy.org/nibabel/", None),
239261
"nipype": ("https://nipype.readthedocs.io/en/latest/", None),
240262
"numpy": ("https://numpy.org/doc/stable/", None),
241263
"pandas": ("https://pandas.pydata.org/pandas-docs/dev", None),
242264
"python": ("https://docs.python.org/3/", None),
243-
"scipy": ("https://docs.scipy.org/doc/scipy-1.8.0/html-scipyorg/", None),
265+
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
244266
"smriprep": ("https://www.nipreps.org/smriprep/", None),
245267
"surfplot": ("https://surfplot.readthedocs.io/en/latest/", None),
246268
"templateflow": ("https://www.templateflow.org/python-client", None),

docs/requirements.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
furo ~= 2021.10.09
2-
matplotlib >= 2.2.0
3-
nibabel
1+
attrs
2+
furo ~= 2022.4.7
43
nipype >= 1.5.1
5-
numpy
4+
traits < 6.4
65
packaging
7-
pydot >= 1.2.3
8-
pydotplus
96
sphinx ~= 4.2
107
sphinxcontrib-apidoc
118
sphinxcontrib-napoleon
129
templateflow
13-
nitransforms >= 20.0.0rc3

docs/tools/LICENSE.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)