-
Notifications
You must be signed in to change notification settings - Fork 30
/
pyproject.toml
382 lines (342 loc) · 11.3 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
# ======================================================================================
# Project metadata
# ======================================================================================
[project]
name = "optimagic"
description = "Tools to solve difficult numerical optimization problems."
requires-python = ">=3.10"
dependencies = [
"cloudpickle",
"joblib",
"numpy",
"pandas",
"plotly",
"pybaum>=0.1.2",
"scipy>=1.2.1",
"sqlalchemy>=1.3",
"annotated-types",
"typing-extensions",
]
dynamic = ["version"]
keywords = [
"nonlinear optimization",
"optimization",
"derivative free optimization",
"global optimization",
"parallel optimization",
"statistics",
"estimation",
"extremum estimation",
"inference",
"numerical differentiation",
"finite differences",
"method of simulated moments",
"maximum likelihood",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
]
authors = [
{ name = "Janos Gabler", email = "[email protected]" },
]
maintainers = [
{ name = "Janos Gabler", email = "[email protected]" },
{ name = "Tim Mensinger", email = "[email protected]" },
]
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.license]
text = "MIT"
[project.urls]
Repository = "https://github.com/optimagic-dev/optimagic"
Github = "https://github.com/optimagic-dev/optimagic"
Tracker = "https://github.com/optimagic-dev/optimagic/issues"
# ======================================================================================
# Build system configuration
# ======================================================================================
[build-system]
requires = ["hatchling", "hatch_vcs"]
build-backend = "hatchling.build"
[tool.hatch.build.hooks.vcs]
version-file = "src/optimagic/_version.py"
[tool.hatch.build.targets.sdist]
exclude = ["tests"]
only-packages = true
[tool.hatch.build.targets.wheel]
only-include = ["src"]
sources = ["src"]
[tool.hatch.version]
source = "vcs"
[tool.hatch.metadata]
allow-direct-references = true
# ======================================================================================
# Ruff configuration
# ======================================================================================
[tool.ruff]
target-version = "py310"
fix = true
[tool.ruff.lint]
select = [
# isort
"I",
# pyflakes
"F",
# pycodestyle
"E",
"W",
# flake8-2020
"YTT",
# flake8-bugbear
"B",
# flake8-quotes
"Q",
# pylint
"PLE", "PLR", "PLW",
# misc lints
"PIE",
# tidy imports
"TID",
# implicit string concatenation
"ISC",
]
extend-ignore = [
# allow module import not at top of file, important for notebooks
"E402",
# do not assign a lambda expression, use a def
"E731",
# Too many arguments to function call
"PLR0913",
# Too many returns
"PLR0911",
# Too many branches
"PLR0912",
# Too many statements
"PLR0915",
# Magic number
"PLR2004",
# Consider `elif` instead of `else` then `if` to remove indentation level
"PLR5501",
# For calls to warnings.warn(): No explicit `stacklevel` keyword argument found
"B028",
# Incompatible with formatting
"ISC001",
]
[tool.ruff.lint.per-file-ignores]
"docs/source/conf.py" = ["E501", "ERA001", "DTZ005"]
"src/optimagic/parameters/kernel_transformations.py" = ["ARG001", "N806"]
"docs/source/*" = ["B018"]
"src/optimagic/algorithms.py" = ["E501"]
[tool.ruff.lint.pydocstyle]
convention = "google"
# ======================================================================================
# Pytest configuration
# ======================================================================================
[tool.pytest.ini_options]
filterwarnings = [
"ignore:Using or importing the ABCs from 'collections'",
"ignore:the imp module is deprecated",
"ignore:Method .ptp is deprecated and will be removed in a future version. Use numpy.ptp instead.",
"ignore:In a future version of pandas all arguments of concat except for the argument 'objs' will be keyword-only",
"ignore:Please use `MemoizeJac` from the `scipy.optimize` namespace",
"ignore:`scipy.optimize.optimize.MemoizeJac` is deprecated",
"ignore:Some algorithms did not converge. Their walltime has been set to a very high value instead of infinity because Timedeltas do notsupport infinite values",
"ignore:In a future version, the Index constructor will not infer numeric dtypes when passed object-dtype sequences",
"ignore:distutils Version classes are deprecated. Use packaging.version instead",
"ignore:Standard matrix inversion failed due to LinAlgError",
"ignore:delta_grad == 0.0",
"ignore:Widget._active_widgets is deprecated",
"ignore:Widget._widget_types is deprecated",
"ignore:Widget.widget_types is deprecated",
"ignore:Widget.widgets is deprecated",
"ignore:Parallelization together with",
"ignore:Conversion of an array with ndim > 0 to a scalar is deprecated",
"ignore:The following exception was caught when evaluating",
"ignore:The following exception was caught when calculating",
"ignore:Usage of the parameter log_options",
]
addopts = ["--doctest-modules", "--pdbcls=pdbp:Pdb"]
markers = [
"wip: Tests that are work-in-progress.",
"slow: Tests that take a long time to run and are skipped in continuous integration.",
"jax: Tests that require jax to be installed and are skipped on non-Linux systems.",
]
norecursedirs = ["docs", ".tools"]
# ======================================================================================
# Misc configuration
# ======================================================================================
[tool.yamlfix]
line_length = 88
sequence_style = "block_style"
none_representation = "null"
# ======================================================================================
# Mypy configuration
# ======================================================================================
[tool.mypy]
files = ["src", "tests", ".tools"]
check_untyped_defs = true
disallow_any_generics = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = [
"optimagic.benchmarking",
"optimagic.benchmarking.benchmark_reports",
"optimagic.benchmarking.cartis_roberts",
"optimagic.benchmarking.get_benchmark_problems",
"optimagic.benchmarking.more_wild",
"optimagic.benchmarking.noise_distributions",
"optimagic.benchmarking.process_benchmark_results",
"optimagic.benchmarking.run_benchmark",
"optimagic.differentiation",
"optimagic.differentiation.derivatives",
"optimagic.differentiation.finite_differences",
"optimagic.differentiation.generate_steps",
"optimagic.differentiation.richardson_extrapolation",
"optimagic.examples",
"optimagic.examples.numdiff_functions",
"optimagic.optimization",
"optimagic.optimization.algo_options",
"optimagic.optimization.convergence_report",
"optimagic.optimization.optimization_logging",
"optimagic.optimization.optimize_result",
"optimagic.optimization.optimize",
"optimagic.optimization.multistart",
"optimagic.optimization.scipy_aliases",
"optimagic.optimization.create_optimization_problem",
"optimagic.optimizers._pounders",
"optimagic.optimizers._pounders.pounders_auxiliary",
"optimagic.optimizers._pounders.pounders_history",
"optimagic.optimizers._pounders._conjugate_gradient",
"optimagic.optimizers._pounders._steihaug_toint",
"optimagic.optimizers._pounders._trsbox",
"optimagic.optimizers._pounders.bntr",
"optimagic.optimizers._pounders.gqtpar",
"optimagic.optimizers._pounders.linear_subsolvers",
"optimagic.optimizers",
"optimagic.optimizers.tranquilo",
"optimagic.optimizers.pygmo_optimizers",
"optimagic.optimizers.scipy_optimizers",
"optimagic.optimizers.nag_optimizers",
"optimagic.optimizers.neldermead",
"optimagic.optimizers.nlopt_optimizers",
"optimagic.optimizers.ipopt",
"optimagic.optimizers.fides",
"optimagic.optimizers.pounders",
"optimagic.optimizers.tao_optimizers",
"optimagic.parameters",
"optimagic.parameters.block_trees",
"optimagic.parameters.check_constraints",
"optimagic.parameters.consolidate_constraints",
"optimagic.parameters.constraint_tools",
"optimagic.parameters.conversion",
"optimagic.parameters.kernel_transformations",
"optimagic.parameters.nonlinear_constraints",
"optimagic.parameters.process_constraints",
"optimagic.parameters.process_selectors",
"optimagic.parameters.space_conversion",
"optimagic.parameters.tree_conversion",
"optimagic.parameters.tree_registry",
"optimagic.shared",
"optimagic.shared.check_option_dicts",
"optimagic.shared.compat",
"optimagic.shared.process_user_function",
"optimagic.visualization",
"optimagic.visualization.convergence_plot",
"optimagic.visualization.deviation_plot",
"optimagic.visualization.history_plots",
"optimagic.visualization.plotting_utilities",
"optimagic.visualization.profile_plot",
"optimagic.visualization.slice_plot",
"optimagic",
"optimagic.decorators",
"optimagic.exceptions",
"optimagic.utilities",
"optimagic.deprecations",
"estimagic",
"estimagic.examples",
"estimagic.examples.logit",
"estimagic.estimate_ml",
"estimagic.estimate_msm",
"estimagic.estimation_summaries",
"estimagic.msm_weighting",
"estimagic.bootstrap_ci",
"estimagic.bootstrap_helpers",
"estimagic.bootstrap_outcomes",
"estimagic.bootstrap_samples",
"estimagic.bootstrap",
"estimagic.ml_covs",
"estimagic.msm_covs",
"estimagic.shared_covs",
"estimagic.msm_sensitivity",
"estimagic.estimation_table",
"estimagic.lollipop_plot",
]
check_untyped_defs = false
disallow_any_generics = false
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
ignore_errors = true
[[tool.mypy.overrides]]
module = [
"pybaum",
"scipy",
"scipy.linalg",
"scipy.linalg.lapack",
"scipy.stats",
"scipy.optimize",
"scipy.ndimage",
"scipy.optimize._trustregion_exact",
"plotly",
"plotly.graph_objects",
"plotly.express",
"plotly.subplots",
"cyipopt",
"nlopt",
"bokeh",
"bokeh.layouts",
"bokeh.models",
"bokeh.plotting",
"bokeh.application",
"bokeh.application.handlers",
"bokeh.application.handlers.function",
"bokeh.server",
"bokeh.server.server",
"bokeh.command",
"bokeh.command.util",
"fides",
"petsc4py",
"petsc4py.PETSc",
"tranquilo",
"tranquilo.tranquilo",
"tranquilo.options",
"tranquilo.process_arguments",
"dfols",
"pybobyqa",
"pygmo",
"jax",
"joblib",
"cloudpickle",
"numba",
"pathos",
"pathos.pools",
"optimagic._version",
"annotated_types",
"pdbp",
]
ignore_missing_imports = true