Skip to content

Commit 0a17c39

Browse files
committed
black stuff
1 parent 6f36c23 commit 0a17c39

File tree

6 files changed

+95
-88
lines changed

6 files changed

+95
-88
lines changed

.github/workflows/testing_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- uses: actions/[email protected]
4747
- name: Install black
4848
run: |
49-
pip install black[jupyter]==24.2.0
49+
pip install black[jupyter]==24.4.2
5050
5151
- name: Run black formatter on PyDMD source code
5252
run: |

docs/source/conf.py

Lines changed: 90 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -22,61 +22,63 @@
2222
# If extensions (or modules to document with autodoc) are in another directory,
2323
# add these directories to sys.path here. If the directory is relative to the
2424
# documentation root, use os.path.abspath to make it absolute, like shown here.
25-
sys.path.insert(0, os.path.abspath('../..'))
25+
sys.path.insert(0, os.path.abspath("../.."))
2626
import pydmd
2727

2828
# -- General configuration ------------------------------------------------
2929

3030
# If your documentation needs a minimal Sphinx version, state it here.
31-
needs_sphinx = '1.4'
31+
needs_sphinx = "1.4"
3232
if needs_sphinx > sphinx.__display_version__:
33-
message = 'This project needs at least Sphinx v{0!s}'.format(needs_sphinx)
33+
message = "This project needs at least Sphinx v{0!s}".format(needs_sphinx)
3434
raise VersionRequirementError(message)
3535

3636
# Add any Sphinx extension module names here, as strings. They can be
3737
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3838
# ones.
3939
extensions = [
40-
'sphinx.ext.autodoc',
41-
'sphinx.ext.autosummary',
42-
'sphinx.ext.coverage',
43-
'sphinx.ext.graphviz',
44-
'sphinx.ext.doctest',
45-
'sphinx.ext.intersphinx',
46-
'sphinx.ext.todo',
47-
'sphinx.ext.coverage',
48-
'sphinx.ext.viewcode',
49-
'sphinx.ext.imgmath',
50-
'sphinx.ext.ifconfig',
51-
'sphinx.ext.mathjax',
40+
"sphinx.ext.autodoc",
41+
"sphinx.ext.autosummary",
42+
"sphinx.ext.coverage",
43+
"sphinx.ext.graphviz",
44+
"sphinx.ext.doctest",
45+
"sphinx.ext.intersphinx",
46+
"sphinx.ext.todo",
47+
"sphinx.ext.coverage",
48+
"sphinx.ext.viewcode",
49+
"sphinx.ext.imgmath",
50+
"sphinx.ext.ifconfig",
51+
"sphinx.ext.mathjax",
5252
]
5353

54-
intersphinx_mapping = {'python': ('http://docs.python.org/2', None),
55-
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
56-
'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None),
57-
'matplotlib': ('http://matplotlib.sourceforge.net/', None)}
54+
intersphinx_mapping = {
55+
"python": ("http://docs.python.org/2", None),
56+
"numpy": ("http://docs.scipy.org/doc/numpy/", None),
57+
"scipy": ("http://docs.scipy.org/doc/scipy/reference/", None),
58+
"matplotlib": ("http://matplotlib.sourceforge.net/", None),
59+
}
5860

5961
# Add any paths that contain templates here, relative to this directory.
60-
templates_path = ['_templates']
62+
templates_path = ["_templates"]
6163

6264
# The suffix(es) of source filenames.
6365
# You can specify multiple suffix as a list of string:
6466
# source_suffix = ['.rst', '.md']
65-
source_suffix = '.rst'
67+
source_suffix = ".rst"
6668

6769
# The encoding of source files.
68-
#source_encoding = 'utf-8-sig'
70+
# source_encoding = 'utf-8-sig'
6971

7072
# The master toctree document.
71-
master_doc = 'index'
73+
master_doc = "index"
7274

7375
# General information about the project.
74-
project = u'PyDMD'
76+
project = "PyDMD"
7577
copyright = pydmd.__copyright__
7678
author = pydmd.__author__
7779

7880
# autoclass
79-
autoclass_content = 'both'
81+
autoclass_content = "both"
8082

8183
# The version info for the project you're documenting, acts as replacement for
8284
# |version| and |release|, also used in various other places throughout the
@@ -96,17 +98,17 @@
9698

9799
# There are two options for replacing |today|: either, you set today to some
98100
# non-false value, then it is used:
99-
#today = ''
101+
# today = ''
100102
# Else, today_fmt is used as the format for a strftime call.
101-
#today_fmt = '%B %d, %Y'
103+
# today_fmt = '%B %d, %Y'
102104

103105
# List of patterns, relative to source directory, that match files and
104106
# directories to ignore when looking for source files.
105107
exclude_patterns = []
106108

107109
# The reST default role (used for this markup: `text`) to use for all
108110
# documents.
109-
#default_role = None
111+
# default_role = None
110112

111113
# If true, '()' will be appended to :func: etc. cross-reference text.
112114
add_function_parentheses = True
@@ -117,13 +119,13 @@
117119

118120
# If true, sectionauthor and moduleauthor directives will be shown in the
119121
# output. They are ignored by default.
120-
#show_authors = False
122+
# show_authors = False
121123

122124
# The name of the Pygments (syntax highlighting) style to use.
123-
pygments_style = 'sphinx'
125+
pygments_style = "sphinx"
124126

125127
# A list of ignored prefixes for module index sorting.
126-
#modindex_common_prefix = []
128+
# modindex_common_prefix = []
127129

128130
# If true, keep warnings as "system message" paragraphs in the built documents.
129131
keep_warnings = False
@@ -145,157 +147,156 @@
145147

146148
# The theme to use for HTML and HTML Help pages. See the documentation for
147149
# a list of builtin themes.
148-
#html_theme = 'bizstyle'
150+
# html_theme = 'bizstyle'
149151
html_theme = "sphinx_rtd_theme"
150152

151153
# Theme options are theme-specific and customize the look and feel of a theme
152154
# further. For a list of options available for each theme, see the
153155
# documentation.
154-
#html_theme_options = {}
156+
# html_theme_options = {}
155157

156158
# Add any paths that contain custom themes here, relative to this directory.
157159
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
158160

159161
# The name for this set of Sphinx documents. If None, it defaults to
160162
# "<project> v<release> documentation".
161-
#html_title = None
163+
# html_title = None
162164

163165
# A shorter title for the navigation bar. Default is the same as html_title.
164-
#html_short_title = None
166+
# html_short_title = None
165167

166168
# The name of an image file (relative to this directory) to place at the top
167169
# of the sidebar.
168-
#html_logo = None
170+
# html_logo = None
169171

170172
# The name of an image file (within the static path) to use as favicon of the
171173
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
172174
# pixels large.
173-
#html_favicon = None
175+
# html_favicon = None
174176

175177
# Add any paths that contain custom static files (such as style sheets) here,
176178
# relative to this directory. They are copied after the builtin static files,
177179
# so a file named "default.css" will overwrite the builtin "default.css".
178-
html_static_path = ['_static']
180+
html_static_path = ["_static"]
179181

180182
# Add any extra paths that contain custom files (such as robots.txt or
181183
# .htaccess) here, relative to this directory. These files are copied
182184
# directly to the root of the documentation.
183-
html_extra_path = ['_tutorials']
185+
html_extra_path = ["_tutorials"]
184186

185187
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
186188
# using the given strftime format.
187-
html_last_updated_fmt = '%b %d, %Y'
189+
html_last_updated_fmt = "%b %d, %Y"
188190

189191
# If true, SmartyPants will be used to convert quotes and dashes to
190192
# typographically correct entities.
191-
#html_use_smartypants = True
193+
# html_use_smartypants = True
192194

193195
# Custom sidebar templates, maps document names to template names.
194-
#html_sidebars = {}
196+
# html_sidebars = {}
195197

196198
# Additional templates that should be rendered to pages, maps page names to
197199
# template names.
198-
#html_additional_pages = {}
200+
# html_additional_pages = {}
199201

200202
# If false, no module index is generated.
201-
#html_domain_indices = True
203+
# html_domain_indices = True
202204

203205
# If false, no index is generated.
204206
html_use_index = True
205207

206208
# If true, the index is split into individual pages for each letter.
207-
#html_split_index = False
209+
# html_split_index = False
208210

209211
# If true, links to the reST sources are added to the pages.
210212
html_show_sourcelink = True
211213

212214
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
213-
#html_show_sphinx = True
215+
# html_show_sphinx = True
214216

215217
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
216218
html_show_copyright = True
217219

218220
# If true, an OpenSearch description file will be output, and all pages will
219221
# contain a <link> tag referring to it. The value of this option must be the
220222
# base URL from which the finished HTML is served.
221-
#html_use_opensearch = ''
223+
# html_use_opensearch = ''
222224

223225
# This is the file name suffix for HTML files (e.g. ".xhtml").
224-
#html_file_suffix = None
226+
# html_file_suffix = None
225227

226228
# Language to be used for generating the HTML full-text search index.
227229
# Sphinx supports the following languages:
228230
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
229231
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
230-
#html_search_language = 'en'
232+
# html_search_language = 'en'
231233

232234
# A dictionary with options for the search language support, empty by default.
233235
# Now only 'ja' uses this config value
234-
#html_search_options = {'type': 'default'}
236+
# html_search_options = {'type': 'default'}
235237

236238
# The name of a javascript file (relative to the configuration directory) that
237239
# implements a search results scorer. If empty, the default will be used.
238-
#html_search_scorer = 'scorer.js'
240+
# html_search_scorer = 'scorer.js'
239241

240242
# Output file base name for HTML help builder.
241-
htmlhelp_basename = 'pydmddoc'
243+
htmlhelp_basename = "pydmddoc"
242244

243245
# -- Options for LaTeX output ---------------------------------------------
244246

245247
latex_elements = {
246-
# The paper size ('letterpaper' or 'a4paper').
247-
#'papersize': 'letterpaper',
248-
249-
# The font size ('10pt', '11pt' or '12pt').
250-
#'pointsize': '10pt',
251-
252-
# Additional stuff for the LaTeX preamble.
253-
#'preamble': '',
254-
255-
# Latex figure (float) alignment
256-
#'figure_align': 'htbp',
248+
# The paper size ('letterpaper' or 'a4paper').
249+
#'papersize': 'letterpaper',
250+
# The font size ('10pt', '11pt' or '12pt').
251+
#'pointsize': '10pt',
252+
# Additional stuff for the LaTeX preamble.
253+
#'preamble': '',
254+
# Latex figure (float) alignment
255+
#'figure_align': 'htbp',
257256
}
258257

259258
# Grouping the document tree into LaTeX files. List of tuples
260259
# (source start file, target name, title,
261260
# author, documentclass [howto, manual, or own class]).
262261
latex_documents = [
263-
(master_doc, 'pydmd.tex', u'pydmd Documentation',
264-
u'PyDMD contributors', 'manual'),
262+
(
263+
master_doc,
264+
"pydmd.tex",
265+
"pydmd Documentation",
266+
"PyDMD contributors",
267+
"manual",
268+
),
265269
]
266270

267271
# The name of an image file (relative to this directory) to place at the top of
268272
# the title page.
269-
#latex_logo = None
273+
# latex_logo = None
270274

271275
# For "manual" documents, if this is true, then toplevel headings are parts,
272276
# not chapters.
273-
#latex_use_parts = False
277+
# latex_use_parts = False
274278

275279
# If true, show page references after internal links.
276-
#latex_show_pagerefs = False
280+
# latex_show_pagerefs = False
277281

278282
# If true, show URL addresses after external links.
279-
#latex_show_urls = False
283+
# latex_show_urls = False
280284

281285
# Documents to append as an appendix to all manuals.
282-
#latex_appendices = []
286+
# latex_appendices = []
283287

284288
# If false, no module index is generated.
285-
#latex_domain_indices = True
289+
# latex_domain_indices = True
286290

287291

288292
# -- Options for manual page output ---------------------------------------
289293

290294
# One entry per manual page. List of tuples
291295
# (source start file, name, description, authors, manual section).
292-
man_pages = [
293-
(master_doc, 'pydmd', u'pydmd Documentation',
294-
[author], 1)
295-
]
296+
man_pages = [(master_doc, "pydmd", "pydmd Documentation", [author], 1)]
296297

297298
# If true, show URL addresses after external links.
298-
#man_show_urls = False
299+
# man_show_urls = False
299300

300301

301302
# -- Options for Texinfo output -------------------------------------------
@@ -304,19 +305,25 @@
304305
# (source start file, target name, title, author,
305306
# dir menu entry, description, category)
306307
texinfo_documents = [
307-
(master_doc, 'pydmd', u'pydmd Documentation',
308-
author, 'pydmd', 'One line description of project.',
309-
'Miscellaneous'),
308+
(
309+
master_doc,
310+
"pydmd",
311+
"pydmd Documentation",
312+
author,
313+
"pydmd",
314+
"One line description of project.",
315+
"Miscellaneous",
316+
),
310317
]
311318

312319
# Documents to append as an appendix to all manuals.
313-
#texinfo_appendices = []
320+
# texinfo_appendices = []
314321

315322
# If false, no module index is generated.
316-
#texinfo_domain_indices = True
323+
# texinfo_domain_indices = True
317324

318325
# How to display URL addresses: 'footnote', 'no', or 'inline'.
319-
#texinfo_show_urls = 'footnote'
326+
# texinfo_show_urls = 'footnote'
320327

321328
# If true, do not generate a @detailmenu in the "Top" node's menu.
322-
#texinfo_no_detailmenu = False
329+
# texinfo_no_detailmenu = False

pydmd/preprocessing/randomized.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def _pre(
5353
power_iters: int,
5454
test_matrix: np.ndarray,
5555
seed: int,
56-
**kwargs
56+
**kwargs,
5757
):
5858
Q = compute_rqb(
5959
X,

tests/test_bopdmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def ode_sys(zt, z):
3030
[t_eval[0], t_eval[-1]],
3131
[1.0, 0.1],
3232
t_eval=t_eval,
33-
**integrator_keywords
33+
**integrator_keywords,
3434
)
3535

3636
return sol.y

tests/test_xyinput.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def ode_sys(zt, z):
3030
[t_eval[0], t_eval[-1]],
3131
[1.0, 0.1],
3232
t_eval=t_eval,
33-
**integrator_keywords
33+
**integrator_keywords,
3434
)
3535

3636
return sol.y

0 commit comments

Comments
 (0)