|
15 | 15 | # add these directories to sys.path here. If the directory is relative to the |
16 | 16 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
17 | 17 | # |
18 | | -sys.path.insert(0, os.path.abspath('..')) |
| 18 | +sys.path.insert(0, os.path.abspath("..")) |
19 | 19 |
|
20 | 20 | # -- Project information ----------------------------------------------------- |
21 | 21 |
|
22 | | -project = 'libpetab-python' |
23 | | -copyright = '2018, the PEtab developers' |
24 | | -author = 'PEtab developers' |
| 22 | +project = "libpetab-python" |
| 23 | +copyright = "2018, the PEtab developers" |
| 24 | +author = "PEtab developers" |
25 | 25 |
|
26 | 26 | # The full version, including alpha/beta/rc tags |
27 | | -release = 'latest' |
| 27 | +release = "latest" |
28 | 28 |
|
29 | 29 | # -- Custom pre-build -------------------------------------------------------- |
30 | 30 |
|
31 | 31 |
|
32 | | -subprocess.run(['python', 'md2rst.py']) |
| 32 | +subprocess.run(["python", "md2rst.py"]) |
33 | 33 |
|
34 | 34 | # -- General configuration --------------------------------------------------- |
35 | 35 |
|
36 | 36 | # Add any Sphinx extension module names here, as strings. They can be |
37 | 37 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
38 | 38 | # ones. |
39 | 39 | extensions = [ |
40 | | - 'sphinx.ext.napoleon', |
41 | | - 'sphinx.ext.autodoc', |
42 | | - 'sphinx.ext.autosummary', |
43 | | - 'sphinx.ext.intersphinx', |
44 | | - 'sphinx.ext.viewcode', |
45 | | - 'sphinx_markdown_tables', |
46 | | - 'myst_nb', |
| 40 | + "sphinx.ext.napoleon", |
| 41 | + "sphinx.ext.autodoc", |
| 42 | + "sphinx.ext.autosummary", |
| 43 | + "sphinx.ext.intersphinx", |
| 44 | + "sphinx.ext.viewcode", |
| 45 | + "sphinx_markdown_tables", |
| 46 | + "myst_nb", |
47 | 47 | ] |
48 | 48 |
|
49 | 49 | intersphinx_mapping = { |
50 | | - 'pandas': ('https://pandas.pydata.org/docs/', None), |
51 | | - 'numpy': ('https://numpy.org/devdocs/', None), |
52 | | - 'sympy': ('https://docs.sympy.org/latest/', None), |
53 | | - 'python': ('https://docs.python.org/3', None), |
| 50 | + "pandas": ("https://pandas.pydata.org/docs/", None), |
| 51 | + "numpy": ("https://numpy.org/devdocs/", None), |
| 52 | + "sympy": ("https://docs.sympy.org/latest/", None), |
| 53 | + "python": ("https://docs.python.org/3", None), |
54 | 54 | } |
55 | 55 |
|
56 | 56 | # Add any paths that contain templates here, relative to this directory. |
57 | | -templates_path = ['_templates'] |
| 57 | +templates_path = ["_templates"] |
58 | 58 |
|
59 | 59 | # List of patterns, relative to source directory, that match files and |
60 | 60 | # directories to ignore when looking for source files. |
61 | 61 | # This pattern also affects html_static_path and html_extra_path. |
62 | 62 | exclude_patterns = [ |
63 | | - 'build/doctrees', |
64 | | - 'build/html', |
65 | | - '**.ipynb_checkpoints', |
66 | | - 'logo/LICENSE.md', |
| 63 | + "build/doctrees", |
| 64 | + "build/html", |
| 65 | + "**.ipynb_checkpoints", |
| 66 | + "logo/LICENSE.md", |
67 | 67 | ] |
68 | 68 |
|
69 | | -master_doc = 'index' |
| 69 | +master_doc = "index" |
70 | 70 |
|
71 | 71 | autosummary_generate = True |
72 | 72 |
|
73 | 73 | autodoc_default_options = { |
74 | 74 | "members": None, |
75 | | - "imported-members": ['petab'], |
| 75 | + "imported-members": ["petab"], |
76 | 76 | "inherited-members": None, |
77 | 77 | "private-members": None, |
78 | 78 | "show-inheritance": None, |
79 | 79 | } |
80 | 80 |
|
81 | 81 | # For some reason causes sphinx import errors otherwise |
82 | | -autodoc_mock_imports = ['yaml'] |
| 82 | +autodoc_mock_imports = ["yaml"] |
83 | 83 |
|
84 | 84 | # myst_nb options |
85 | 85 | # https://myst-nb.readthedocs.io/en/latest/configuration.html |
86 | 86 | nb_execution_mode = "force" |
87 | 87 |
|
88 | 88 |
|
89 | 89 | source_suffix = { |
90 | | - '.rst': 'restructuredtext', |
91 | | - '.txt': 'restructuredtext', |
| 90 | + ".rst": "restructuredtext", |
| 91 | + ".txt": "restructuredtext", |
92 | 92 | } |
93 | 93 |
|
94 | 94 | # ignore numpy warnings |
|
100 | 100 | # The theme to use for HTML and HTML Help pages. See the documentation for |
101 | 101 | # a list of builtin themes. |
102 | 102 | # |
103 | | -html_theme = 'sphinx_rtd_theme' |
| 103 | +html_theme = "sphinx_rtd_theme" |
104 | 104 |
|
105 | 105 | # Add any paths that contain custom static files (such as style sheets) here, |
106 | 106 | # relative to this directory. They are copied after the builtin static files, |
107 | 107 | # so a file named "default.css" will overwrite the builtin "default.css". |
108 | | -html_static_path = ['_static'] |
| 108 | +html_static_path = ["_static"] |
109 | 109 |
|
110 | 110 | html_context = { |
111 | 111 | "display_github": True, |
|
115 | 115 | "conf_py_path": "/doc", |
116 | 116 | } |
117 | 117 |
|
118 | | -html_logo = 'logo/PEtab.png' |
| 118 | +html_logo = "logo/PEtab.png" |
119 | 119 |
|
120 | 120 |
|
121 | 121 | def skip_some_objects(app, what, name, obj, skip, options): |
122 | 122 | """Exclude some objects from the documentation""" |
123 | | - if getattr(obj, '__module__', None) == 'collections': |
| 123 | + if getattr(obj, "__module__", None) == "collections": |
124 | 124 | return True |
125 | 125 |
|
126 | 126 |
|
127 | 127 | def setup(app): |
128 | 128 | """Sphinx setup""" |
129 | | - app.connect('autodoc-skip-member', skip_some_objects) |
| 129 | + app.connect("autodoc-skip-member", skip_some_objects) |
0 commit comments