-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
179 lines (167 loc) · 4.36 KB
/
pyproject.toml
File metadata and controls
179 lines (167 loc) · 4.36 KB
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
[tool.poetry]
name = "safe-ds-runner"
version = "0.20.0"
description = "Execute Safe-DS programs that were compiled to Python."
authors = ["Lars Reimann <mail@larsreimann.com>"]
license = "MIT"
readme = "docs/README.md"
repository = "https://github.com/Safe-DS/Runner"
documentation = "https://safe-ds-runner.readthedocs.io"
keywords = ["data-science", "machine-learning", "usability", "learnability"]
packages = [
{ include = "safeds_runner", from = "src" },
]
[tool.poetry.scripts]
safe-ds-runner = "safeds_runner.main:main"
[tool.poetry.dependencies]
python = "^3.12,<3.14"
safe-ds = ">=0.31.0,<0.32.0"
hypercorn = ">=0.16,<0.19"
psutil = ">=5.9.8,<8.0.0"
pydantic = "^2.9.2"
quart = ">=0.19.4,<0.21.0"
[tool.poetry.group.dev.dependencies]
pytest = "^8.3.4"
pytest-cov = ">=6,<8"
pytest-timeout = "^2.3.1"
pytest-asyncio = ">=0.25.3,<1.3.0"
simple-websocket = "^1.1.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.7.0", markers="sys_platform == 'win32'", source = "torch_cuda" },
{ version = "^2.7.0", 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.22.0", markers="sys_platform == 'win32'", source = "torch_cuda" },
{ version = "~0.22.0", markers="sys_platform != 'win32'", source = "pypi" },
]
[tool.poetry.group.docs.dependencies]
mkdocs = "^1.4.3"
mkdocs-glightbox = ">=0.3.4,<0.6.0"
mkdocs-material = "^9.1.17"
[[tool.poetry.source]]
name = "torch_cuda"
url = "https://download.pytorch.org/whl/cu128"
priority = "explicit"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 120
[tool.pytest.ini_options]
addopts = "--tb=short"
asyncio_default_fixture_loop_scope = "session"
[tool.ruff]
line-length = 120
target-version = "py311"
[tool.ruff.lint]
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-argument-shadowing (we want readable parameter names in our API)
"A002",
# 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"