|
13 | 13 | import sys
|
14 | 14 | from pathlib import Path
|
15 | 15 | from packaging.version import Version
|
| 16 | + |
16 | 17 | sys.path.insert(0, str(Path(__file__).parent.parent.absolute()))
|
17 |
| -sys.path.insert(1, str(Path(__file__).parent / 'sphinxext')) |
| 18 | +sys.path.insert(1, str(Path(__file__).parent / "sphinxext")) |
18 | 19 | from pydra import __version__
|
19 | 20 | from github_link import make_linkcode_resolve
|
20 | 21 |
|
21 | 22 |
|
22 | 23 | # -- Project information -----------------------------------------------------
|
23 | 24 |
|
24 |
| -project = 'Pydra: A simple dataflow engine with scalable semantics' |
25 |
| -copyright = '2019 - 2020, The Nipype Developers team' |
26 |
| -author = 'The Nipype Developers team' |
| 25 | +project = "Pydra: A simple dataflow engine with scalable semantics" |
| 26 | +copyright = "2019 - 2020, The Nipype Developers team" |
| 27 | +author = "The Nipype Developers team" |
27 | 28 |
|
28 | 29 | # The full version, including alpha/beta/rc tags
|
29 | 30 | release = __version__
|
|
36 | 37 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
37 | 38 | # ones.
|
38 | 39 | extensions = [
|
39 |
| - 'sphinx.ext.autodoc', |
40 |
| - 'sphinx.ext.doctest', |
41 |
| - 'sphinx.ext.intersphinx', |
42 |
| - 'sphinx.ext.coverage', |
43 |
| - 'sphinx.ext.mathjax', |
44 |
| - 'sphinx.ext.ifconfig', |
45 |
| - 'sphinx.ext.linkcode', |
46 |
| - 'sphinx.ext.githubpages', |
47 |
| - 'sphinxcontrib.apidoc', |
48 |
| - 'sphinxcontrib.napoleon' |
| 40 | + "sphinx.ext.autodoc", |
| 41 | + "sphinx.ext.doctest", |
| 42 | + "sphinx.ext.intersphinx", |
| 43 | + "sphinx.ext.coverage", |
| 44 | + "sphinx.ext.mathjax", |
| 45 | + "sphinx.ext.ifconfig", |
| 46 | + "sphinx.ext.linkcode", |
| 47 | + "sphinx.ext.githubpages", |
| 48 | + "sphinxcontrib.apidoc", |
| 49 | + "sphinxcontrib.napoleon", |
49 | 50 | ]
|
50 | 51 |
|
51 | 52 | # Add any paths that contain templates here, relative to this directory.
|
52 |
| -templates_path = ['_templates'] |
| 53 | +templates_path = ["_templates"] |
53 | 54 |
|
54 | 55 | # List of patterns, relative to source directory, that match files and
|
55 | 56 | # directories to ignore when looking for source files.
|
56 | 57 | # This pattern also affects html_static_path and html_extra_path.
|
57 |
| -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'api/pydra.rst'] |
| 58 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "api/pydra.rst"] |
58 | 59 |
|
59 | 60 |
|
60 | 61 | # -- Options for HTML output -------------------------------------------------
|
61 | 62 |
|
62 | 63 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
63 | 64 | # a list of builtin themes.
|
64 | 65 | #
|
65 |
| -html_theme = 'sphinx_rtd_theme' |
| 66 | +html_theme = "sphinx_rtd_theme" |
66 | 67 |
|
67 | 68 | # Add any paths that contain custom static files (such as style sheets) here,
|
68 | 69 | # relative to this directory. They are copied after the builtin static files,
|
69 | 70 | # so a file named "default.css" will overwrite the builtin "default.css".
|
70 |
| -html_static_path = ['_static'] |
| 71 | +html_static_path = ["_static"] |
71 | 72 |
|
72 | 73 | # -- Options for extensions ---------------------------------------------------
|
73 | 74 |
|
74 | 75 | # Autodoc
|
75 |
| -autodoc_mock_imports = [ |
76 |
| - 'cloudpickle', |
77 |
| - 'matplotlib', |
78 |
| - 'numpy', |
79 |
| - 'psutil', |
80 |
| -] |
81 |
| -apidoc_module_dir = '../pydra' |
82 |
| -apidoc_output_dir = 'api' |
83 |
| -apidoc_excluded_paths = ['conftest.py', '*/tests/*', 'tests/*', 'data/*'] |
| 76 | +autodoc_mock_imports = ["cloudpickle", "matplotlib", "numpy", "psutil"] |
| 77 | +apidoc_module_dir = "../pydra" |
| 78 | +apidoc_output_dir = "api" |
| 79 | +apidoc_excluded_paths = ["conftest.py", "*/tests/*", "tests/*", "data/*"] |
84 | 80 | apidoc_separate_modules = True
|
85 |
| -apidoc_extra_args = ['--module-first', '-d 1', '-T'] |
| 81 | +apidoc_extra_args = ["--module-first", "-d 1", "-T"] |
86 | 82 |
|
87 | 83 | # Napoleon
|
88 | 84 | # Accept custom section names to be parsed for numpy-style docstrings
|
89 | 85 | # of parameters.
|
90 | 86 | # Requires pinning sphinxcontrib-napoleon to a specific commit while
|
91 | 87 | # https://github.com/sphinx-contrib/napoleon/pull/10 is merged.
|
92 | 88 | napoleon_use_param = False
|
93 |
| -napoleon_custom_sections = [ |
94 |
| - ('Inputs', 'Parameters'), |
95 |
| - ('Outputs', 'Parameters'), |
96 |
| -] |
| 89 | +napoleon_custom_sections = [("Inputs", "Parameters"), ("Outputs", "Parameters")] |
97 | 90 |
|
98 | 91 | # Intersphinx
|
99 |
| -intersphinx_mapping = { |
100 |
| - 'https://docs.python.org/': None, |
101 |
| -} |
| 92 | +intersphinx_mapping = {"https://docs.python.org/": None} |
102 | 93 |
|
103 | 94 | # Linkcode
|
104 | 95 | # The following is used by sphinx.ext.linkcode to provide links to github
|
105 | 96 | linkcode_resolve = make_linkcode_resolve(
|
106 |
| - 'pydra', 'https://github.com/nipype/pydra/blob/{revision}/' |
107 |
| - '{package}/{path}#L{lineno}') |
| 97 | + "pydra", |
| 98 | + "https://github.com/nipype/pydra/blob/{revision}/" "{package}/{path}#L{lineno}", |
| 99 | +) |
108 | 100 |
|
109 | 101 | # Sphinx-versioning
|
110 | 102 | scv_show_banner = True
|
0 commit comments