forked from GridTools/jace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
241 lines (220 loc) · 5.42 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
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=61",
]
[project]
authors = [
{name = "ETH Zurich", email = "gridtools@cscs.ch"},
]
classifiers = [
"Development Status :: 1 - Planning",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Typing :: Typed",
]
dependencies = [
"dace>=0.15",
"jax[cpu]>=0.4.24",
"numpy>=1.26.0",
]
description = "JAX jit using DaCe (Data Centric Parallel Programming)"
name = "JaCe"
readme = "README.md"
requires-python = ">=3.10"
version = "0.1.0"
license.file = "LICENSE"
[project.optional-dependencies]
cuda12 = [
"cupy-cuda12x>=12.1.0",
"jax[cuda12]>=0.4.24",
"optuna>=3.4.0",
]
[project.urls]
"Bug Tracker" = "https://github.com/GridTools/JaCe/issues"
Changelog = "https://github.com/GridTools/JaCe/releases"
Discussions = "https://github.com/GridTools/JaCe/discussions"
Homepage = "https://github.com/GridTools/JaCe"
# -- coverage --
[tool.coverage]
[tool.coverage.html]
show_contexts = true
[tool.coverage.report]
exclude_also = [
'\.\.\.',
'if TYPE_CHECKING:',
'if typing.TYPE_CHECKING:',
'def __repr__',
'@overload',
'raise AssertionError',
'raise NotImplementedError',
'if 0:',
'if __name__ == .__main__.:',
'@(abc\\.)?abstractmethod',
'@(abc\\.)?abstract',
'class .*\bProtocol\):',
]
[tool.coverage.run]
branch = true
dynamic_context = "test_function"
source = ["jace"]
# -- mypy --
[tool.mypy]
disallow_incomplete_defs = true
disallow_untyped_defs = true
files = ["src", "tests"]
ignore_missing_imports = false
implicit_optional = false
implicit_reexport = false
# install_types = true
namespace_packages = false
# pretty = true
python_version = "3.10"
show_column_numbers = true
show_error_codes = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
disallow_incomplete_defs = false
disallow_untyped_defs = false
ignore_missing_imports = true
module = [
"tests.*",
"dace.*",
"jax.*",
"jaxlib.*",
]
# -- pytest --
[tool.pytest]
[tool.pytest.ini_options]
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
filterwarnings = ["error"]
log_cli_level = "INFO"
minversion = "6.0"
testpaths = ["tests"]
xfail_strict = true
# -- ruff --
[tool.ruff]
line-length = 100
preview = true
respect-gitignore = true
show-fixes = true
src = ["src"]
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
extend-safe-fixes = ["D", "TCH"]
extend-select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"I", # isort
"G", # flake8-logging-format
"N", # pep8-naming
"W", # pycodestyle-warning
"C4", # flake8-comprehensions
"C90", # mccabe
"D", # pydocstyle
"D213", # multi-line-summary-second-line (off by default in pydocstyle "google' convention)
"PT", # flake8-pytest-style
"TD", # flake8-todo
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"ERA", # eradicate
"FLY", # flynt
"ICN", # flake8-import-conventions
"NPY", # NumPy specific rules
"PERF", # Perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"T10", # flake8-debugger
"T20", # flake8-print
"TCH", # flake8-type-checking
"TRY", # tryceratops
]
ignore = [
"B905", # [zip-without-explicit-strict]
"D105", # [undocumented-magic-method]
"D107", # [undocumented-public-init]
"D212", # [multi-line-summary-first-line]
"D402", # [no-signature]
"E501", # [line-too-long]
"TCH003", # [typing-only-standard-library-import]
"TD003", # [missing-todo-link]
"TRY003", # [raise-vanilla-args] # TODO(egparedes): reevaluate if it should be activated
"UP038", # [non-pep604-isinstance]
]
# ignore-init-module-imports = true # deprecated in preview mode
unfixable = []
[tool.ruff.lint.isort]
combine-as-imports = true
known-first-party = ["jace"]
known-third-party = [
"cupy",
"dace",
"jax",
"numpy",
"pytest",
"typing_extensions",
]
lines-after-imports = 2
order-by-type = true
required-imports = ["from __future__ import annotations"]
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"tests",
"local-folder",
]
[tool.ruff.lint.isort.sections]
tests = [
"tests",
"unit_tests",
"integration_tests",
]
[tool.ruff.lint.mccabe]
max-complexity = 12
[tool.ruff.lint.per-file-ignores]
"!tests/**.py" = ["PT"] # Ignore flake8-pytest-style outside 'tests/'
"docs/**" = [
"D", # pydocstyle
"T10", # flake8-debugger
"T20", # flake8-print
]
"noxfile.py" = [
"D", # pydocstyle
"T20", # flake8-print
]
"tests/**" = [
"D", # pydocstyle
"N", # TODO(egparedes): remove ignore as soon as all tests are properly named
"PLR2004", # [magic-value-comparison]
"T10", # flake8-debugger
"T20", # flake8-print
]
[tool.ruff.lint.pycodestyle]
ignore-overlong-task-comments = true
max-doc-length = 88
[tool.ruff.lint.pydocstyle]
convention = "google"
ignore-decorators = ["typing.overload"]
[tool.ruff.lint.pylint]
max-args = 6