-
Notifications
You must be signed in to change notification settings - Fork 70
/
pyproject.toml
161 lines (144 loc) · 5.05 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
[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.1",
"typing-extensions>=4.7,<4.13",
"ordered-set==4.1.0",
]
dynamic = ["version"]
[project.optional-dependencies]
dev = [
"pip<25.0",
"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.9.16",
"pre-commit==4.0.1",
"ruff==0.7.2",
"asv<0.7",
"nbconvert>=7.7.2,<8.0.0",
"textual-dev==1.6.1",
"pytest-asyncio==0.24.0",
"pyright==1.1.388",
]
gui = ["textual==0.85.2", "pyclip==0.7"]
jax = ["jax==0.4.35", "numpy==2.1.3"]
onnx = ["onnx==1.17.0", "numpy==2.1.3"]
riscv = ["riscemu==2.2.7"]
wgpu = ["wgpu==0.19.0"]
[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.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
typeCheckingMode = "strict"
"include" = ["docs", "xdsl", "tests", "bench"]
"exclude" = [
"tests/dialects/test_memref.py",
"tests/frontend/onnx/test_build_ir.py",
"tests/frontend/onnx/test_type.py",
"tests/test_frontend_op_resolver.py",
"tests/test_frontend_python_code_check.py",
"xdsl/frontend/onnx/ir_builder.py",
"xdsl/frontend/onnx/type.py",
"xdsl/interpreters/experimental/wgpu.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"]
ignore = [
"E741", # https://beta.ruff.rs/docs/rules/ambiguous-variable-name/
"PT006", # https://beta.ruff.rs/docs/rules/pytest-parametrize-names-wrong-type/
"PT007", # https://beta.ruff.rs/docs/rules/pytest-parametrize-values-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/
"PT015", # https://beta.ruff.rs/docs/rules/pytest-assert-always-false/
]
[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 = 300
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"xdsl.parser.core".msg = "Use xdsl.parser instead."
"xdsl.parser.attribute_parser".msg = "Use xdsl.parser instead."
"xdsl.parser.affine_parser".msg = "Use xdsl.parser instead."
"xdsl.ir.core".msg = "Use xdsl.ir instead."
"xdsl.irdl.common".msg = "Use xdsl.irdl instead"
"xdsl.irdl.constraints".msg = "Use xdsl.irdl instead"
"xdsl.irdl.attributes".msg = "Use xdsl.irdl instead"
"xdsl.irdl.operations".msg = "Use xdsl.irdl 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"
[tool.ruff.lint.per-file-ignores]
"versioneer.py" = ["ALL"]
"tests/test_declarative_assembly_format.py" = ["F811"]
"tests/filecheck/frontend/programs/invalid.py" = ["F811", "F841"]
"tests/filecheck/frontend/dialects/invalid.py" = ["F811"]
"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"]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.format]
exclude = ["versioneer.py", "xdsl/_version.py", "docs/marimo/**/*.py"]
[tool.pytest.ini_options]
python_files = ["tests/*test_*.py", "docs/*test_*.py"]
python_classes = "Test_*"
python_functions = "test_*"
addopts = ["--durations=20", "--maxfail=5"]
[tool.versioneer]
VCS = "git"
style = "pep440"
versionfile_source = "xdsl/_version.py"
versionfile_build = "xdsl/_version.py"
tag_prefix = "v"