This repository has been archived by the owner on May 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
225 lines (210 loc) · 4.56 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
[build-system]
requires = ["setuptools>=61.0.0", "wheel", "setuptools_scm"]
build-backend = "setuptools.build_meta"
[project]
name = "psycop_model_training"
version = "0.59.1"
description = "PSYCOP model training utilities"
authors = [
{name = "Martin Bernstorff", email = "[email protected]"},
{name = "Lasse Hansen", email = "[email protected]"},
{name = "Kenneth Enevoldsen"}
]
classifiers = [
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10"
]
requires-python = ">=3.8.0"
dependencies = [
"pandas>=1.4.3,<2.1.0",
"scikit-learn>=1.1.1,<1.3.0",
"xgboost>=1.6.1,<1.8.0",
"hydra-core>=1.1.13,<1.4.0",
"plotly>=5.8.2,<5.14.0",
"matplotlib>=3.5.2,<3.8.0",
"wandb>=0.12.21,<0.16.0",
"tabulate>=0.8.10,<0.10.0",
"optuna>=2.10.1,<3.2.0",
"hydra-optuna-sweeper>=1.2.0,<1.3.0",
"hydra-joblib-launcher>=1.2.0, <1.3.0",
"selenium>=4.2.0,<4.10.0",
"seaborn>=0.12.0,<0.12.2",
"pyarrow>=9.0.0,<10.1.0",
"Random-Word>=1.0.11, <=1.0.12",
"diskcache>=5.4.0",
"psycopmlutils>=0.3.0,<0.13.0",
"Levenshtein>=0.20.0, <0.22.0",
"seaborn>=0.10.1, <0.13.0"
]
[project.optional-dependencies]
dev = [
"pyright",
"pyright-polite",
"pre-commit>=2.19.0,<3.2.3",
"setuptools>=65.3.0,<67.8.0",
"ruff==0.0.262", # important that these match the pre-commit hooks
"black==22.8.0", # important that these match the pre-commit hooks
"pandas-stubs",
"pydantic",
"invoke",
"tox",
]
tests = [
"pytest>=7.1.2,<7.3.2",
"pytest-cov>=3.0.0,<4.0.1",
"pytest-xdist>=3.0.0,<3.2.0",
"pytest-sugar>=0.9.4,<0.10.0",
]
tutorials = [
"sphinx_togglebutton>=0.2.3,<0.4.0",
"myst-nb>=0.6.0,<1.17.0", # for rendering notebooks
"jupyter>=1.0.0,<1.1.0", # for tutorials
]
[tool.coverage.run]
omit = [
"**/tests/*",
"**/_vendorized/*",
"**/about.py"
]
exclude_lines = [
"pragma: no cover",
# Don't complain about missing debug-only code:
"def __unicode__",
"def __repr__",
"if self.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:"
]
[tool.pyright]
exclude = [
".*venv*",
".*/",
".git",
".tox",
]
pythonPlatform = "Darwin"
[tool.pytest.ini_options]
markers = [
"pre_push_test: Tests run on push. Should be as minimal as possible to maintain fast push speeds."
]
pythonpath = [
"."
]
testpaths = ["tests"]
[tool.ruff]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
select = [
"A",
"ARG",
"ANN",
"B",
"C4",
"COM",
"D417",
"E",
"ERA",
"F",
"I",
"ICN",
"NPY001",
"PD002",
"PIE",
"PLE",
"PLW",
"PT",
"UP",
"Q",
"PTH",
"RSE",
"RET",
"RUF",
"SIM",
"W"
]
ignore = [
"ANN101",
"ANN401",
"E402",
"E501",
"F401",
"F841",
"RET504"
]
ignore-init-module-imports = true
# Allow autofix for all enabled rules (when `--fix`) is provided.
unfixable = ["ERA"]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"__init__.py",
"docs/conf.py",
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
target-version = "py39"
[tool.ruff.flake8-annotations]
mypy-init-return = true
suppress-none-returning = true
[tool.ruff.isort]
known-third-party = ["wandb"]
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.semantic_release]
branch = "main"
version_variable = [
"pyproject.toml:version"
]
upload_to_pypi = false
upload_to_release = true
build_command = "python -m pip install build; python -m build"
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py{39,310}
[testenv]
description: run unit tests
extras = tests
use_develop = true
commands =
pytest -n auto {posargs:test}
[testenv:type]
description: run type checks
extras = test, dev
basepython = py39 # Setting these explicitly avoid recreating env if your shell is set to a different version
use_develop = true
commands =
pyright .
[testenv:docs]
description: build docs
extras = docs
basepython = py39 # Setting these explicitly avoid recreating env if your shell is set to a different version
use_develop = true
commands =
sphinx-build -b html docs docs/_build/html
"""