-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
205 lines (176 loc) · 5.38 KB
/
pyproject.toml
File metadata and controls
205 lines (176 loc) · 5.38 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
[project]
name = "vgi-rpc"
version = "0.7.0"
description = "Vector Gateway Interface - RPC framework based on Apache Arrow"
readme = "README.md"
requires-python = ">=3.13"
license = {file = "LICENSE.md"}
authors = [{ name = "Query.farm" }]
keywords = ["rpc", "arrow", "ipc", "serialization", "streaming"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = ["pyarrow>=14.0", "docstring-parser>=0.16", "tzdata>=2024.1; sys_platform == 'win32'"]
[project.urls]
Homepage = "https://github.com/Query-farm/vgi-rpc-python"
Repository = "https://github.com/Query-farm/vgi-rpc-python"
Issues = "https://github.com/Query-farm/vgi-rpc-python/issues"
Documentation = "https://vgi-rpc-python.query.farm/"
[project.optional-dependencies]
http = ["falcon>=3.0", "httpx>=0.24", "waitress>=2.0", "zstandard>=0.20"]
s3 = ["boto3>=1.28"]
gcs = ["google-cloud-storage>=2.10"]
cli = ["typer>=0.9", "httpx>=0.24"]
external = ["aiohttp>=3.9", "tenacity>=8.0", "zstandard>=0.20"]
otel = ["opentelemetry-api>=1.20", "opentelemetry-sdk>=1.20"]
oauth = ["authlib>=1.3"]
mtls = ["cryptography>=41.0"]
sentry = ["sentry-sdk>=2.0"]
[project.scripts]
vgi-rpc = "vgi_rpc.cli:app"
vgi-rpc-conformance = "vgi_rpc.conformance._cli:main"
vgi-rpc-test = "vgi_rpc.conformance._test_cli:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.ruff]
line-length = 120
target-version = "py313"
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM", "D", "RUF", "PERF"]
ignore = [
"D203", # incompatible with D211 (no-blank-line-before-class)
"D213", # incompatible with D212 (multi-line-summary-first-line)
"RUF022", # __all__ is intentionally grouped by category, not sorted
]
[tool.ruff.format]
quote-style = "double"
[tool.mypy]
python_version = "3.13"
strict = true
warn_return_any = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = "falcon.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "waitress.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "boto3.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "moto.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "aioresponses.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "google.cloud.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "typer.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "opentelemetry.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "authlib.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "sentry_sdk.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "cryptography.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "pytest_benchmark.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "tests.*"
# Protocol classes are passed as type markers (not instantiated) to serve_pipe/connect/http_connect;
# type[P] correctly triggers type-abstract for abstract Protocol classes.
disable_error_code = ["type-abstract"]
[tool.ty.rules]
unused-type-ignore-comment = "ignore" # these comments are required by mypy
[tool.ty.environment]
python-version = "3.13"
[tool.pytest.ini_options]
addopts = "--mypy --ruff --timeout=50 --benchmark-disable -m 'not benchmark'"
markers = ["benchmark: performance benchmarks (deselected by default)"]
testpaths = ["tests"]
[tool.coverage.run]
# Each subprocess writes to its own data file (.coverage.<hostname>.<pid>)
parallel = true
# Handle SIGTERM gracefully (writes coverage data before exit)
sigterm = true
# Measure branch coverage
branch = true
# What to measure
source = ["vgi_rpc"]
# Omit test files and examples from coverage
omit = ["vgi_rpc/examples/*", "tests/*"]
[tool.coverage.report]
# Fail if coverage drops below this threshold
fail_under = 80
# Show missing lines in the report
show_missing = true
# Exclude common patterns from coverage
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"@overload",
"raise NotImplementedError",
"\\.\\.\\.", # Ellipsis in stub files
]
[tool.coverage.html]
directory = "htmlcov"
[tool.mutmut]
paths_to_mutate = ["vgi_rpc/utils.py"]
pytest_add_cli_args_test_selection = ["tests/"]
also_copy = ["vgi_rpc/"]
pytest_add_cli_args = ["--timeout=50", "--no-header", "-o", "addopts=", "-o", "pythonpath=.", "--ignore=tests/test_external_fetch.py"]
[dependency-groups]
docs = [
"mkdocs>=1.6",
"mkdocs-material>=9.5",
"mkdocstrings[python]>=0.27",
"mkdocs-section-index>=0.3",
"mkdocs-d2-plugin>=1.4",
"pygments>=2.19,<2.20",
]
dev = [
"aioresponses>=0.7",
"authlib>=1.3",
"boto3>=1.28",
"falcon>=3.0",
"google-cloud-storage>=2.10",
"httpx>=0.24",
"lxml>=6.0.2",
"moto[s3]>=4.0",
"mutmut>=3.4.0",
"mypy>=1.0",
"pyarrow-stubs>=17.0",
"pytest>=7.0",
"pytest-cov>=4.0",
"pytest-examples>=0.0.10",
"pytest-mypy>=0.10",
"pytest-ruff>=0.1",
"pytest-timeout>=2.4.0",
"ruff>=0.1",
"ty>=0.0.8",
"typer>=0.9",
"waitress>=2.0",
"opentelemetry-api>=1.20",
"opentelemetry-sdk>=1.20",
"pytest-benchmark>=4.0",
"sentry-sdk>=2.0",
"cryptography>=41.0",
]