-
Notifications
You must be signed in to change notification settings - Fork 6
/
pyproject.toml
211 lines (197 loc) · 4.65 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
[build-system]
requires = ["maturin>=0.13,<0.14"]
build-backend = "maturin"
[project]
name = "egglog"
description = "e-graphs in Python built around the the egglog rust library"
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.10"
classifiers = [
"Environment :: MacOS X",
"Environment :: Win32 (MS Windows)",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Compilers",
"Topic :: Software Development :: Interpreters",
"Typing :: Typed",
]
dependencies = ["typing-extensions", "black", "graphviz"]
[project.optional-dependencies]
array = [
"scikit-learn",
"array_api_compat",
"numba==0.59.0rc1",
"llvmlite==0.42.0rc1",
]
dev = ["pre-commit", "ruff", "mypy", "anywidget[dev]", "egglog[docs,test]"]
test = [
"pytest",
"mypy",
"syrupy",
"egglog[array]",
"pytest-codspeed",
"pytest-benchmark",
"pytest-xdist",
]
docs = [
"pydata-sphinx-theme",
"myst-nb",
"sphinx-autodoc-typehints",
"sphinx-gallery",
"nbconvert",
"matplotlib",
"anywidget",
"seaborn",
"egglog[array]",
"line-profiler",
"sphinxcontrib-mermaid",
"ablog",
]
[tool.ruff]
ignore = [
# Allow uppercase vars
"N806",
"N802",
# Allow subprocess run
"S603",
# ALlow any
"ANN401",
# Allow exec
"S102",
"S307",
"PGH001",
# allow star imports
"F405",
"F403",
# Dont care if cls isnt typed explicitly in classmethod
"ANN102",
# Same for self
"ANN101",
# Allow single line docstrings on multiple lines
"D200",
"D212",
# Allow shadoing builtins
"A003",
"A002",
# Allow Unused args
"ARG001",
"ARG002",
# Allow TODOs
"TD002",
"TD003",
"FIX002",
# Allow commented out code
"ARG001",
"ERA001",
# Allow boolean positional args
"FBT003",
"FBT002",
"FBT001",
# Allow creating types in function arg defaults
"B008",
# Allow no type annotations for private functions
"ANN202",
# Allow short var names
"E741",
# Allow docstring to not end with period
"D400",
"D415",
# Allow asserts
"S101",
# Allow try except in loop
"PERF203",
# Allow unused args
"ARG003",
# Allow no type annotation for kwargs
"ANN003",
# And for args
"ANN002",
# Allow globals
"PLW0603",
# Allow lots of statements
"PLR0915",
# Allow print
"T201",
# Allow constants
"PLR2004",
# Inconsistant formatting
"D203",
"COM812",
"COM819",
"E501",
"ISC001",
"Q001",
"Q002",
"Q003",
"W191",
"Q000",
"D206",
# Allow shadowing builtin
"A001",
# Allow unused lambda vars
"ARG005",
# Allow no space after first line of docstring
"D205",
# Allow "useless expressions" as they show up in examples
"B018",
# TODO: Remove the rest of these eventually
# Allow public methods to not have docstrings
"D102",
# Allow longer messages for custom errors
"TRY003",
# Allow f-string in exceptions
"EM102",
# No docstrings for public module
"D100",
# docstring public class
"D101",
# Docstring init
"D107",
# Docstring public function
"D103",
# docstring magic method
"D105",
# Allow lots of args for functions
"PLR0913",
# Allow non imperative docstrings
"D401",
# Allow private member refs
"SLF001",
]
line-length = 120
# Allow lines to be as long as 120.
src = ["python"]
select = ["ALL"]
extend-exclude = ["python/tests/__snapshots__"]
unsafe-fixes = true
[tool.ruff.format]
preview = true
[tool.ruff.lint.per-file-ignores]
# Don't require annotations for tests
"python/tests/**" = ["ANN001", "ANN201"]
[tool.mypy]
ignore_missing_imports = true
warn_redundant_casts = true
check_untyped_defs = true
strict_equality = true
warn_unused_configs = true
allow_redefinition = true
enable_incomplete_feature = ["Unpack"]
exclude = ["__snapshots__", "_build", "^conftest.py$"]
[tool.maturin]
python-source = "python"
[tool.pytest.ini_options]
addopts = ["--import-mode=importlib"]
testpaths = ["python"]
python_files = ["test_*.py", "test.py"]
markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"]
norecursedirs = ["__snapshots__"]