-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathpyproject.toml
More file actions
228 lines (199 loc) · 5.08 KB
/
pyproject.toml
File metadata and controls
228 lines (199 loc) · 5.08 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
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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "pytato"
version = "2024.1"
description = "Get Descriptions of Array Computations via Lazy Evaluation"
readme = "README.rst"
license = "MIT"
requires-python = "~=3.10"
authors = [
{ name = "Andreas Kloeckner", email = "inform@tiker.net" },
{ name = "Matt Wala" },
{ name = "Xiaoyu Wei" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Other Audience",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Software Development :: Libraries",
]
dependencies = [
"bidict",
"constantdict",
"loopy>=2020.2",
"pytools>=2025.1.5",
"pymbolic>=2024.2",
"typing_extensions>=4",
"orderedsets",
]
[project.urls]
Homepage = "https://github.com/inducer/pytato"
[tool.hatch.build.targets.sdist]
include = [
"/pytato",
]
exclude = [
"/.git*",
"/doc/_build",
"/.editorconfig",
"/run-*.sh",
"/.basedpyright",
]
[tool.ruff.lint]
preview = true
extend-select = [
"B", # flake8-bugbear
"C", # flake8-comprehensions
"E", # pycodestyle
"F", # pyflakes
"I", # flake8-isort
"N", # pep8-naming
"Q", # flake8-quotes
"W", # pycodestyle
"NPY", # numpy
"RUF",
"UP",
"TC",
"SIM",
]
extend-ignore = [
"E226",
"E241",
"E242",
"E265",
"N802",
"E402",
"N814",
"N817",
"C90",
"RUF067", # no code in __init__ *shrug*
# numpy random generators---disable for now
"NPY002",
"TRY004",
"TRY300",
]
allowed-confusables = [
"∪", # union
" ", # nbsp
]
[tool.ruff.lint.per-file-ignores]
"examples/advection.py" = ["B023"]
"test/test_linalg.py" = ["N806"]
"doc/*.py" = ["I002"]
"examples/*.py" = ["I002"]
"test/*.py" = ["S102"]
"doc/conf.py" = ["S102"]
[tool.ruff.lint.isort]
known-first-party = ["pytools", "pymbolic", "loopy", "pyopencl"]
known-local-folder = ["pytato"]
lines-after-imports = 2
combine-as-imports = true
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.flake8-quotes]
inline-quotes = "double"
docstring-quotes = "double"
multiline-quotes = "double"
[tool.mypy]
# FIXME
# basedmypy baseline contains spurious errors flagged due to
# https://github.com/python/mypy/issues/17731
# https://github.com/python/mypy/issues/19017
strict = true
warn_unused_ignores = true
default_return = false
# FIXME
disallow_any_explicit = false
disallow_any_expr = false
disallow_any_decorated = false
disable_error_code = [
"explicit-override",
"unreachable",
"redundant-expr",
"callable-functiontype",
]
[[tool.mypy.overrides]]
module = [
"islpy",
"pyopencl.*",
"jax.*",
"pygments.*",
"mako.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"pytato.raising",
]
# We'll be getting rid of it, no point in fixing it.
ignore_errors = true
[tool.basedpyright]
reportImplicitStringConcatenation = "none"
reportUnnecessaryIsInstance = "none"
reportUnusedCallResult = "none"
reportExplicitAny = "none"
reportPrivateUsage = "hint"
reportUnusedParameter = "hint"
# This reports even cycles that are qualified by 'if TYPE_CHECKING'. Not what
# we care about at this moment.
# https://github.com/microsoft/pyright/issues/746
reportImportCycles = "none"
# Some errors get flagged in CI, but not locally. This makes it awkward to
# include those in the baseline, so they get ignored with 'pyright: ignore'.
# Local runs now flag this as unnecessary. Downgrading to hint to avoid
# circular complaints.
reportUnnecessaryTypeIgnoreComment = "hint"
pythonVersion = "3.10"
pythonPlatform = "All"
ignore = [
"build",
"doc/_build",
"doc/conf.py",
".venv",
# We'll be getting rid of it, no point in fixing it.
"pytato/raising.py",
]
[[tool.basedpyright.executionEnvironments]]
root = "test"
reportUnknownArgumentType = "hint"
reportUnknownParameterType = "hint"
reportUnknownVariableType = "hint"
reportUnknownMemberType = "hint"
reportMissingParameterType = "hint"
reportAny = "hint"
reportArgumentType = "hint"
reportAttributeAccessIssue = "hint"
[[tool.basedpyright.executionEnvironments]]
root = "examples"
reportUnknownArgumentType = "none"
reportUnknownVariableType = "none"
reportMissingParameterType = "none"
reportAttributeAccessIssue = "none"
reportMissingImports = "none"
reportArgumentType = "hint"
reportUnknownMemberType = "hint"
reportUnknownParameterType = "hint"
reportAny = "none"
reportPrivateUsage = "hint"
reportUnusedParameter = "hint"
[tool.typos.default]
extend-ignore-re = [
"(?Rm)^.*(#|//)\\s*spellchecker:\\s*disable-line$"
]
[tool.typos.default.extend-words]
# like the numpy function, array range
arange = "arange"
[tool.typos.files]
extend-exclude = [
]