|
17 | 17 |
|
18 | 18 | from packaging.version import Version
|
19 | 19 |
|
20 |
| -with open('../../pyproject.toml', mode='r') as f: |
| 20 | +with open("../../pyproject.toml", mode="r") as f: |
21 | 21 | txt = f.read()
|
22 | 22 | neo_release = re.findall('version = "(\S+)"', txt)[0]
|
23 | 23 |
|
24 |
| -neo_version = '.'.join((str(e) for e in Version(neo_release).release[:2])) |
| 24 | +neo_version = ".".join((str(e) for e in Version(neo_release).release[:2])) |
25 | 25 |
|
26 |
| -AUTHORS = 'Neo authors and contributors <[email protected]>' |
| 26 | +AUTHORS = "Neo authors and contributors <[email protected]>" |
27 | 27 |
|
28 | 28 | # If extensions (or modules to document with autodoc) are in another directory,
|
29 | 29 | # add these directories to sys.path here. If the directory is relative to the
|
|
34 | 34 |
|
35 | 35 | # Add any Sphinx extension module names here, as strings. They can be
|
36 | 36 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
37 |
| -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', |
38 |
| - 'IPython.sphinxext.ipython_console_highlighting', |
39 |
| - 'IPython.sphinxext.ipython_directive', |
40 |
| - 'matplotlib.sphinxext.plot_directive', |
41 |
| - 'sphinx_gallery.gen_gallery', |
42 |
| - 'sphinx_inline_tabs', "sphinx_design"] |
| 37 | +extensions = [ |
| 38 | + "sphinx.ext.autodoc", |
| 39 | + "sphinx.ext.doctest", |
| 40 | + "sphinx.ext.todo", |
| 41 | + "IPython.sphinxext.ipython_console_highlighting", |
| 42 | + "IPython.sphinxext.ipython_directive", |
| 43 | + "matplotlib.sphinxext.plot_directive", |
| 44 | + "sphinx_gallery.gen_gallery", |
| 45 | + "sphinx_inline_tabs", |
| 46 | + "sphinx_design", |
| 47 | +] |
43 | 48 |
|
44 | 49 | # Add any paths that contain templates here, relative to this directory.
|
45 |
| -templates_path = ['_templates'] |
| 50 | +templates_path = ["_templates"] |
46 | 51 |
|
47 | 52 | # The suffix of source filenames.
|
48 |
| -source_suffix = '.rst' |
| 53 | +source_suffix = ".rst" |
49 | 54 |
|
50 | 55 | # The encoding of source files.
|
51 | 56 | # source_encoding = 'utf-8'
|
52 | 57 |
|
53 | 58 | # The master toctree document.
|
54 |
| -master_doc = 'index' |
| 59 | +master_doc = "index" |
55 | 60 |
|
56 | 61 | # General information about the project.
|
57 |
| -project = 'Neo' |
58 |
| -copyright = '2010-2024, ' + AUTHORS |
| 62 | +project = "Neo" |
| 63 | +copyright = "2010-2024, " + AUTHORS |
59 | 64 |
|
60 | 65 | # The version info for the project you're documenting, acts as replacement for
|
61 | 66 | # |version| and |release|, also used in various other places throughout the
|
|
99 | 104 | # show_authors = False
|
100 | 105 |
|
101 | 106 | # The name of the Pygments (syntax highlighting) style to use.
|
102 |
| -pygments_style = 'sphinx' |
| 107 | +pygments_style = "sphinx" |
103 | 108 |
|
104 | 109 | # A list of ignored prefixes for module index sorting.
|
105 | 110 | # modindex_common_prefix = []
|
|
115 | 120 | # html_theme = 'scrolls'
|
116 | 121 | # html_theme = 'agogo'
|
117 | 122 | # html_theme = 'alabaster'
|
118 |
| -html_theme = 'pydata_sphinx_theme' |
| 123 | +html_theme = "pydata_sphinx_theme" |
119 | 124 |
|
120 | 125 | # Theme options are theme-specific and customize the look and feel of a theme
|
121 | 126 | # further. For a list of options available for each theme, see the
|
122 | 127 | # documentation.
|
123 | 128 |
|
124 | 129 | html_theme_options = {
|
125 | 130 | "logo": {
|
126 |
| - "image_light": "images/neologo_small.png", |
127 |
| - "image_dark": "images/neologo_small_darkmode.png", |
| 131 | + "image_light": "images/neologo_small.png", |
| 132 | + "image_dark": "images/neologo_small_darkmode.png", |
128 | 133 | },
|
129 |
| - 'icon_links': [ |
130 |
| - { |
131 |
| - "name": 'GitHub', |
132 |
| - "url": 'https://github.com/NeuralEnsemble/python-neo', |
133 |
| - "icon": 'fa-brands fa-square-github' |
134 |
| - }, |
| 134 | + "icon_links": [ |
| 135 | + {"name": "GitHub", "url": "https://github.com/NeuralEnsemble/python-neo", "icon": "fa-brands fa-square-github"}, |
135 | 136 | {
|
136 | 137 | "name": "PyPI",
|
137 | 138 | "url": "https://pypi.org/project/neo",
|
138 | 139 | "icon": "fa-solid fa-box",
|
139 | 140 | },
|
140 | 141 | ],
|
141 |
| - 'icon_links_label': 'External Links', # for screen reader |
142 |
| - 'use_edit_page_button': False, |
143 |
| - 'navbar_end': ['theme-switcher', 'navbar-icon-links'], |
| 142 | + "icon_links_label": "External Links", # for screen reader |
| 143 | + "use_edit_page_button": False, |
| 144 | + "navbar_end": ["theme-switcher", "navbar-icon-links"], |
144 | 145 | }
|
145 | 146 |
|
146 | 147 | # Add any paths that contain custom themes here, relative to this directory.
|
|
155 | 156 |
|
156 | 157 | # The name of an image file (relative to this directory) to place at the top
|
157 | 158 | # of the sidebar.
|
158 |
| -html_logo = 'images/neologo_small.png' |
| 159 | +html_logo = "images/neologo_small.png" |
159 | 160 |
|
160 | 161 |
|
161 | 162 | # The name of an image file (within the static path) to use as favicon of the
|
162 | 163 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
163 | 164 | # pixels large.
|
164 |
| -html_favicon = 'images/neologo_favicon.png' |
| 165 | +html_favicon = "images/neologo_favicon.png" |
165 | 166 |
|
166 | 167 |
|
167 | 168 | # Add any paths that contain custom static files (such as style sheets) here,
|
168 | 169 | # relative to this directory. They are copied after the builtin static files,
|
169 | 170 | # so a file named "default.css" will overwrite the builtin "default.css".
|
170 |
| -html_static_path = ['images', '_static'] |
| 171 | +html_static_path = ["images", "_static"] |
171 | 172 |
|
172 | 173 | html_css_files = [
|
173 |
| - 'css/custom.css', |
| 174 | + "css/custom.css", |
174 | 175 | ]
|
175 | 176 |
|
176 | 177 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
|
209 | 210 | # html_file_suffix = ''
|
210 | 211 |
|
211 | 212 | # Output file base name for HTML help builder.
|
212 |
| -htmlhelp_basename = 'neodoc' |
| 213 | +htmlhelp_basename = "neodoc" |
213 | 214 |
|
214 | 215 |
|
215 | 216 | # -- Options for LaTeX output -------------------------------------------------
|
|
223 | 224 | # Grouping the document tree into LaTeX files. List of tuples
|
224 | 225 | # (source start file, target name, title, author,
|
225 | 226 | # documentclass [howto/manual]).
|
226 |
| -latex_documents = [('index', 'neo.tex', 'Neo Documentation', |
227 |
| - AUTHORS, 'manual')] |
| 227 | +latex_documents = [("index", "neo.tex", "Neo Documentation", AUTHORS, "manual")] |
228 | 228 |
|
229 | 229 | # The name of an image file (relative to this directory) to place at the
|
230 | 230 | # top of the title page.
|
|
247 | 247 |
|
248 | 248 | rst_epilog = """
|
249 | 249 | .. |neo_github_url| replace:: https://github.com/NeuralEnsemble/python-neo/archive/neo-{}.zip
|
250 |
| -""".format(neo_release) |
| 250 | +""".format( |
| 251 | + neo_release |
| 252 | +) |
251 | 253 |
|
252 | 254 | sphinx_gallery_conf = {
|
253 |
| - 'examples_dirs': '../../examples', # path to your example scripts |
254 |
| - 'gallery_dirs': 'examples', # path to where to save gallery generated output |
| 255 | + "examples_dirs": "../../examples", # path to your example scripts |
| 256 | + "gallery_dirs": "examples", # path to where to save gallery generated output |
255 | 257 | }
|
0 commit comments