-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
200 lines (187 loc) · 4.82 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
[tool.poetry]
name = "safe-ds"
version = "0.29.0"
description = "A user-friendly library for Data Science in Python."
authors = ["Lars Reimann <[email protected]>"]
license = "MIT"
readme = ".github/README.md"
repository = "https://github.com/Safe-DS/Library"
documentation = "https://library.safeds.com"
keywords = ["data-science", "machine-learning", "usability", "learnability"]
packages = [
{ include = "safeds", from = "src"},
]
[tool.poetry.dependencies]
python = "^3.11,<3.13"
apipkg = "^3.0.2"
matplotlib = "^3.6.3"
numpy = "<3.0.0"
pillow = ">=9.5,<12.0"
polars = {extras = ["numpy", "pyarrow"], version = "^1.7.1"}
scikit-learn = "^1.2.0"
statsmodels = "^0.14.1"
torch = "^2.4.1"
torchvision = "^0.19.1"
transformers = "^4.40.2"
xxhash = "^3.4.1"
[tool.poetry.group.dev.dependencies]
pytest = ">=7.2.1,<9.0.0"
pytest-cov = ">=4,<6"
syrupy = "^4.6.0"
torch = [
# Install the CUDA version on Windows. Projects that depend on us always get their dependencies from PyPI, so
# there's no point moving this to the main dependencies section.
{ version = "^2.4.1", markers="sys_platform == 'win32'", source = "torch_cuda" },
{ version = "^2.4.1", markers="sys_platform != 'win32'", source = "pypi" },
]
torchvision = [
# Install the CUDA version on Windows. Projects that depend on us always get their dependencies from PyPI, so
# there's no point moving this to the main dependencies section.
{ version = "^0.19.1", markers="sys_platform == 'win32'", source = "torch_cuda" },
{ version = "^0.19.1", markers="sys_platform != 'win32'", source = "pypi" },
]
[tool.poetry.group.docs.dependencies]
mkdocs = "^1.4.2"
mkdocstrings = ">=0.20,<0.26"
mkdocstrings-python = ">=0.8.3,<1.11.0"
mkdocs-autorefs = ">=0.4.1,<1.3.0"
mkdocs-exclude = "^1.0.2"
mkdocs-gen-files = ">=0.4,<0.6"
mkdocs-glightbox = ">=0.3.1,<0.5.0"
mkdocs-jupyter = ">=0.23,<0.26"
mkdocs-literate-nav = "^0.6.0"
mkdocs-material = "^9.1.2"
mkdocs-section-index = "^0.3.5"
[[tool.poetry.source]]
name = "torch_cuda"
url = "https://download.pytorch.org/whl/cu121"
priority = "explicit"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 120
[tool.coverage.report]
exclude_also = [
"if\\s+(typing\\.)?TYPE_CHECKING:",
"\\.\\.\\.",
]
omit = [
"*experimental*.py"
]
[tool.pytest.ini_options]
addopts = "--snapshot-warn-unused --tb=short"
filterwarnings = [
"ignore:Deprecated call to `pkg_resources.declare_namespace",
"ignore:Jupyter is migrating its paths to use standard platformdirs"
]
[tool.ruff]
line-length = 120
target-version = "py311"
[tool.ruff.lint]
ignore-init-module-imports = true
select = [
"F",
"E",
"W",
"I",
"N",
"D",
"UP",
"YTT",
"BLE",
"FBT",
"B",
"A",
"COM",
"C4",
"DTZ",
"T10",
"ISC",
"ICN",
"G",
"INP",
"PIE",
"T20",
"PYI",
"PT",
"Q",
"RSE",
"RET",
"SLF",
"SIM",
"TID",
"TCH",
"INT",
"ARG",
"PTH",
"PD",
"PGH",
"PL",
"TRY",
"NPY",
"RUF"
]
ignore = [
# line-too-long (handled by black)
"E501",
# tab-indentation (handled by black)
"W191",
# trailing-whitespace (handled by black)
"W291",
# missing-newline-at-end-of-file (handled by black)
"W292",
# blank-line-with-witespace (handled by black)
"W293",
# boolean-positional-arg-in-function-definition (we leave it to the call-site)
"FBT001",
# boolean-default-value-in-function-definition (we leave it to the call-site)
"FBT002",
# builtin-attribute-shadowing (not an issue)
"A003",
# implicit-return (can add a return even though all cases are covered)
"RET503",
# superfluous-else-return (sometimes it's more readable)
"RET505",
# superfluous-else-raise (sometimes it's more readable)
"RET506",
# superfluous-else-continue (sometimes it's more readable)
"RET507",
# superfluous-else-break (sometimes it's more readable)
"RET508",
# private-member-access (we cannot always avoid it if we want a clean API)
"SLF001",
# if-else-block-instead-of-if-exp (an if-else block can be more readable)
"SIM108",
# compare-to-empty-string (sometimes it's better to be explicit)
"PLC1901",
# too-many-return-statements
"PLR0911",
# too-many-branches
"PLR0912",
# too-many-arguments
"PLR0913",
# too-many-statements
"PLR0915",
# magic-value-comparison
"PLR2004",
# raise-vanilla-args
"TRY003",
]
[tool.ruff.lint.per-file-ignores]
"benchmarks/**/*.py" = [
# Undocumented declarations
"D10",
# print
"T20",
]
"*test*.py" = [
# Undocumented declarations
"D10",
]
"__init__.py" = [
# runtime-import-in-type-checking-block: Does not work with apipkg.
"TCH004",
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"