forked from edgedb/edgedb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
242 lines (213 loc) · 5.8 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
242
[project]
name = "edgedb-server"
description = "EdgeDB Server"
requires-python = '>=3.11.0'
dynamic = ["version"]
dependencies = [
'edgedb==1.9.0',
'httptools>=0.6.0',
'immutables>=0.18',
'parsing~=2.0',
'uvloop~=0.19.0',
'click~=8.0',
'cryptography~=42.0',
'graphql-core~=3.1.5',
'jwcrypto~=1.3.1',
'psutil~=5.8',
'setproctitle~=1.2',
'httpx~=0.24.1',
'hishel==0.0.24',
'webauthn~=2.0.0',
'argon2-cffi~=23.1.0',
'aiosmtplib~=2.0',
]
[project.scripts]
edgedb-server = "edb.server.main:main"
edb = "edb.tools.edb:edbcommands"
edgedb = "edb.cli:rustcli"
[project.optional-dependencies]
test = [
'black~=24.2.0',
'coverage~=7.4',
'ruff~=0.1.6',
'asyncpg~=0.29.0',
# Needed for testing asyncutil
'async_solipsism==0.5.0',
# Needed for test_docs_sphinx_ext
'requests-xml~=0.2.3',
# For rebuilding GHA workflows
'Jinja2~=2.11',
'MarkupSafe~=1.1',
'PyYAML~=6.0',
'mypy~=1.7.1',
# mypy stub packages; when updating, you can use mypy --install-types
# to install stub packages and then pip freeze to read out the specifier
'types-docutils~=0.17.0,<0.17.6', # incomplete nodes.document.__init__
'types-Jinja2~=2.11',
'types-MarkupSafe~=1.1',
'types-pkg-resources~=0.1.3',
'types-typed-ast~=1.4.2',
'types-requests~=2.25.6',
'types-PyYAML~=6.0',
'prometheus_client~=0.11.0',
'docutils~=0.17.0',
'lxml~=4.9.0',
'Pygments~=2.10.0',
'Sphinx~=4.2.0',
'sphinxcontrib-asyncio~=0.3.0',
'sphinxcontrib-applehelp<1.0.8',
'sphinxcontrib-devhelp<1.0.6',
'sphinxcontrib-htmlhelp<2.0.5',
'sphinxcontrib-serializinghtml<1.1.10',
'sphinxcontrib-qthelp<1.0.7',
'sphinx_code_tabs~=0.5.3',
]
docs = [
'docutils~=0.17.0',
'lxml~=4.9.0',
'Pygments~=2.10.0',
'Sphinx~=4.2.0',
'sphinxcontrib-asyncio~=0.3.0',
'sphinx_code_tabs~=0.5.3',
]
[build-system]
requires = [
"Cython (>=0.29.32, <0.30.0)",
"packaging >= 21.0",
"setuptools >= 67",
"setuptools-rust ~= 1.8",
"wheel",
"parsing ~= 2.0",
'edgedb == 1.9.0',
]
# Custom backend needed to set up build-time sys.path because
# setup.py needs to import `edb.buildmeta`.
build-backend = "build_backend"
backend-path = ["."]
[tool.setuptools]
packages = { find = { include = ["edb", "edb.*"] } }
zip-safe = false
# ========================
# BLACK
# ========================
[tool.black]
line-length = 80
target-version = ["py310"]
skip-string-normalization = true
# ========================
# MYPY
# ========================
[tool.mypy]
python_version = "3.11"
plugins = "edb/tools/mypy/plugin.py"
follow_imports = "normal"
ignore_missing_imports = true
warn_redundant_casts = true
warn_unused_configs = true
show_column_numbers = true
show_error_codes = true
# This being an error seems super confused to me.
disable_error_code = "type-abstract"
[[tool.mypy.overrides]]
module = [
"edb.common.adapter",
"edb.edgeql.compiler.*",
"edb.edgeql.codegen",
"edb.edgeql.declarative",
"edb.edgeql.tracer",
"edb.graphql.types",
"edb.ir.*",
"edb.pgsql.metaschema",
"edb.pgsql.codegen",
"edb.pgsql.types",
"edb.pgsql.compiler.*",
"edb.repl.*",
"edb.schema.*",
"edb.schema.reflection.*",
"edb.server.cluster",
"edb.server.config",
"edb.server.connpool.*",
"edb.server.pgcluster",
"edb.server.pgconnparams",
"edb.server.compiler.*",
]
# Equivalent of --strict on the command line,
# but without disallow_untyped_calls:
disallow_subclassing_any = true
disallow_any_generics = true
# disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_unused_ignores = true
warn_return_any = true
no_implicit_reexport = true
strict_equality = true
[[tool.mypy.overrides]]
module = [
"edb.common.checked",
"edb.common.compiler",
"edb.common.ordered",
"edb.common.parametric",
"edb.common.retryloop",
"edb.common.struct",
"edb.common.topological",
"edb.common.uuidgen",
"edb.common.value_dispatch",
]
# Equivalent of --strict on the command line:
disallow_subclassing_any = true
disallow_any_generics = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_unused_ignores = true
warn_return_any = true
no_implicit_reexport = true
strict_equality = true
# ========================
# COVERAGE
# ========================
[tool.coverage.run]
branch = false
plugins = ["Cython.Coverage"]
parallel = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if debug",
"raise NotImplementedError",
"if __name__ == .__main__.",
]
show_missing = true
ignore_errors = true
# Change the below to invalidate dependency cache in CI
# CACHE-TAG: 1
[tool.ruff]
lint.select = ["E", "F", "W", "B"]
lint.ignore = [
"F541", # f-string without any placeholders
"B904", # Within an except clause, raise exceptions with raise ... from err
# or raise ... from None to distinguish them from errors in
# exception handling
"E731", # Do not assign a lambda expression, use a def
"E741", # Ambiguous variable name: l or i or I
"E252", # Missing whitespace around parameter equals
# TODO: enable this
"B905", # zip() without an explicit strict= parameter
# TODO: enable this (this was tried before - it is non-trivial)
"B019", # Use of functools.lru_cache or functools.cache on methods can lead
# to memory leaks
]
line-length = 80
indent-width = 4
exclude = ["postgres", ".github"]
lint.flake8-bugbear.extend-immutable-calls = [
"immutables.Map"
]