forked from optimagic-dev/optimagic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
122 lines (104 loc) · 4.13 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
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
write_to = "src/estimagic/_version.py"
[tool.ruff]
target-version = "py37"
select = ["ALL"]
fix = true
extend-ignore = [
# Docstrings
"D103", # missing docstring in public function
"D107",
"D203",
"D212",
"D213",
"D402",
"D413",
"D415",
"D416",
"D417",
# Others.
"D404", # Do not start module docstring with "This".
"RET504", # unnecessary variable assignment before return.
"S101", # raise errors for asserts.
"B905", # strict parameter for zip that was implemented in py310.
"ANN101", # type annotating self
"ANN102", # type annotating cls
"FBT", # flake8-boolean-trap
"EM", # flake8-errmsg
"ANN401", # flake8-annotate typing.Any
"PD", # pandas-vet
"E731", # do not assign a lambda expression, use a def
"RET", # unnecessary elif or else statements after return, rais, continue, ...
"S324", # Probable use of insecure hash function.
"COM812", # trailing comma missing, but black takes care of that
"PT007", # wrong type in parametrize, gave false positives
"EXE001", # Shebang is present but file is not executable
"PIE804", # unnecessary dict kwargs
# Things we are not sure we want
# ==============================
"SIM102", # Use single if statement instead of nested if statements
"SIM108", # Use ternary operator instead of if-else block
"SIM117", # do not use nested with statements
"BLE001", # Do not catch blind exceptions (even after handling some specific ones)
"PLR2004", # Magic values used in comparison
"PT006", # Allows only lists of tuples in parametrize, even if single argument
# Things ignored during transition phase
# ======================================
"D", # docstrings
"ANN", # missing annotations
"C901", # function too complex
"PT011", # pytest raises without match statement
"INP001", # implicit namespace packages without init.
"TRY",
"PLR",
"TCH",
"RSE",
"SLF",
"PTH123",
# ======================================
]
[tool.ruff.per-file-ignores]
"docs/source/conf.py" = ["E501", "ERA001", "DTZ005"]
"src/estimagic/parameters/kernel_transformations.py" = ["ARG001", "N806"]
[tool.ruff.pydocstyle]
convention = "google"
[tool.nbqa.config]
black = "pyproject.toml"
[tool.nbqa.mutate]
black = 1
[tool.pytask]
infer_latex_dependencies = true
[tool.pytest.ini_options]
filterwarnings = [
"ignore:Using or importing the ABCs from 'collections'",
"ignore:the imp module is deprecated",
"ignore:indexing past lexsort depth may impact performance.",
"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:Only a subset of the cartis_roberts",
"ignore:Please use `MemoizeJac` from the `scipy.optimize` namespace",
"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:Tranquilo is extremely experimental",
"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",
]
addopts = ["--doctest-modules"]
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", ".envs"]
[tool.yamlfix]
line_length = 88
sequence_style = "block_style"
none_representation = "null"