-
Notifications
You must be signed in to change notification settings - Fork 81
/
Copy pathpyproject.toml
203 lines (183 loc) · 6.11 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
[project]
name = "xdsl"
description = "xDSL"
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT License" }
authors = [{ name = "Mathieu Fehr", email = "[email protected]" }]
classifiers = ["Programming Language :: Python :: 3"]
dependencies = [
"immutabledict<4.2.2",
"typing-extensions>=4.7,<4.13",
"ordered-set==4.1.0",
]
dynamic = ["version"]
[project.optional-dependencies]
dev = [
"toml<0.11",
"pytest-cov",
"coverage<8.0.0",
"ipykernel",
"pytest<8.4",
"nbval<0.12",
"filecheck==1.0.1",
"lit<19.0.0",
"marimo==0.11.14",
"pre-commit==4.1.0",
"ruff==0.9.9",
"nbconvert>=7.7.2,<8.0.0",
"textual-dev==1.7.0",
"pytest-asyncio==0.25.3",
"pyright==1.1.396",
"sympy==1.13.3",
]
docs = [
"mkdocs-gen-files>=0.5.0",
"mkdocs-material>=9.5.49",
"mkdocs>=1.6.1",
"mkdocstrings[python]>=0.27.0",
]
gui = ["textual==2.1.2", "pyclip==0.7"]
jax = ["jax==0.5.1", "numpy==2.2.3"]
riscv = ["riscemu==2.2.7"]
bench = ["asv>=0.6.4", "viztracer>=1.0.2", "orjson>=3.10.15"]
[project.urls]
Homepage = "https://xdsl.dev/"
"Source Code" = "https://github.com/xdslproject/xdsl"
"Issue Tracker" = "https://github.com/xdslproject/xdsl/issues"
[project.scripts]
xdsl-opt = "xdsl.tools.xdsl_opt:main"
irdl-to-pyrdl = "xdsl.tools.irdl_to_pyrdl:main"
xdsl-run = "xdsl.tools.xdsl_run:main"
xdsl-gui = "xdsl.interactive.app:main"
xdsl-stubgen = "xdsl.utils.dialect_stub:make_all_stubs"
xdsl-tblgen = "xdsl.tools.tblgen_to_py:main"
[tool.setuptools]
platforms = ["Linux", "Mac OS-X", "Unix"]
zip-safe = false
[tool.setuptools.packages]
find = {}
[tool.setuptools.package-data]
xdsl = ["**/*.irdl", "py.typed", "interactive/*.tcss", "_version.py"]
[build-system]
requires = ["setuptools>=42", "wheel", "versioneer[toml]"]
build-backend = "setuptools.build_meta"
[tool.pyright]
reportImportCycles = false
reportMissingModuleSource = false
enableTypeIgnoreComments = false
enableExperimentalFeatures = true
typeCheckingMode = "strict"
extraPaths = ["tests"]
"include" = ["docs", "xdsl", "tests"]
"exclude" = [
"tests/dialects/test_memref.py",
"tests/test_frontend_op_resolver.py",
"tests/test_frontend_python_code_check.py",
]
"ignore" = [
"docs/marimo",
"tests/filecheck/frontend/dialects/builtin.py",
"tests/filecheck/frontend/dialects/invalid.py",
"tests/filecheck/frontend/dialects/arith.py",
"tests/filecheck/frontend/dialects/scf.py",
"tests/filecheck/frontend/programs/invalid.py",
"xdsl/_version.py",
]
[tool.ruff]
target-version = "py310"
extend-include = ["*.ipynb", "*.pyi"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "PT", "TID251", "INP"]
ignore = [
"E741", # https://beta.ruff.rs/docs/rules/ambiguous-variable-name/
"PT006", # https://beta.ruff.rs/docs/rules/pytest-parametrize-names-wrong-type/
"PT011", # https://beta.ruff.rs/docs/rules/pytest-raises-too-broad/
"PT012", # https://beta.ruff.rs/docs/rules/pytest-raises-with-multiple-statements/
]
[tool.ruff.lint.pycodestyle]
# TODO: remove this setting and go to default line length of 88
# Removing this line length results in a large number of errors for doc strings, ideally
# these should be ignored separately.
max-line-length = 130
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"xdsl.dialects.utils.fast_math".msg = "Use xdsl.dialects.utils instead"
"xdsl.dialects.utils.format".msg = "Use xdsl.dialects.utils instead"
"xdsl.ir.affine.affine_expr".msg = "Use xdsl.ir.affine instead"
"xdsl.ir.affine.affine_map".msg = "Use xdsl.ir.affine instead"
"xdsl.ir.affine.affine_set".msg = "Use xdsl.ir.affine instead"
"xdsl.ir.core".msg = "Use xdsl.ir instead."
"xdsl.irdl.attributes".msg = "Use xdsl.irdl instead"
"xdsl.irdl.common".msg = "Use xdsl.irdl instead"
"xdsl.irdl.constraints".msg = "Use xdsl.irdl instead"
"xdsl.irdl.operations".msg = "Use xdsl.irdl instead"
"xdsl.parser.affine_parser".msg = "Use xdsl.parser instead."
"xdsl.parser.attribute_parser".msg = "Use xdsl.parser instead."
"xdsl.parser.base_parser".msg = "Use xdsl.parser instead."
"xdsl.parser.core".msg = "Use xdsl.parser instead."
"xdsl.parser.generic_parser".msg = "Use xdsl.parser instead."
[tool.ruff.lint.per-file-ignores]
"versioneer.py" = ["ALL"]
"tests/test_declarative_assembly_format.py" = ["F811"]
"**/filecheck/*" = ["F811", "F841", "E501"]
"docs/xdsl-introduction.ipynb" = ["ALL"]
"docs/tutorial.ipynb" = ["ALL"]
"docs/Toy/Toy_Ch3.ipynb" = ["E402"]
"docs/Toy/Toy_Ch2.ipynb" = ["E402"]
"docs/Toy/Toy_Ch1.ipynb" = ["E402"]
"docs/mlir_interoperation.ipynb" = ["E402"]
"docs/irdl.ipynb" = ["ALL"]
"docs/database_example.ipynb" = ["ALL"]
"**/{docs/marimo}/*" = ["E501", "I001"]
"_version.py" = ["ALL"]
"__init__.py" = ["F403"]
"tests/*" = ["E501", "INP"]
"docs/marimo/**" = ["INP"]
"scripts/**" = ["INP"]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.format]
exclude = [
"versioneer.py",
"xdsl/_version.py",
"docs/marimo/**/*.py",
"docs/marimo/**/*.ipynb",
]
[tool.pytest.ini_options]
python_files = ["tests/*test_*.py", "docs/*test_*.py"]
python_classes = "Test_*"
python_functions = "test_*"
addopts = ["--durations=20", "--maxfail=5", "--import-mode=importlib"]
asyncio_default_fixture_loop_scope = "function"
[tool.versioneer]
VCS = "git"
style = "pep440"
versionfile_source = "xdsl/_version.py"
versionfile_build = "xdsl/_version.py"
tag_prefix = "v"
[tool.coverage.run]
branch = true
omit = [
# Autogenerated missed code handles other VCSes.
"xdsl/_version.py",
"tests/filecheck/frontend/*",
]
concurrency = ["multiprocessing"]
parallel = true
source = ["xdsl/", "docs/"]
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_lines = [
# Don't complain about missing debug-only code:
"def __repr__",
# Don't complain if tests don't hit defensive assertion code:
"raise NotImplementedError",
"raise ValueError",
"raise TypeError",
"raise RuntimeError",
]
format = "markdown"
# Converts some errors to warnings
# we should investigate whether this is still necessary once the online codecov reporting is fixed
# https://github.com/nedbat/coveragepy/blob/1aecfa7ae2a81aa9c278cbb43718ae7e4bdcf5b5/coverage/report_core.py#L108
ignore_errors = true