-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
150 lines (134 loc) · 4.45 KB
/
pyproject.toml
File metadata and controls
150 lines (134 loc) · 4.45 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
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "tusk-drift-python-sdk"
version = "0.1.23"
description = "Python SDK for Tusk Drift instrumentation and replay"
readme = "README.md"
requires-python = ">=3.9"
license = {text = "Apache-2.0"}
authors = [
{name = "Tusk", email = "support@usetusk.ai"}
]
keywords = ["tusk", "drift", "testing", "instrumentation", "tracing", "replay"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"protobuf>=3.20.0",
"PyYAML>=6.0",
"requests>=2.28.0",
"tusk-drift-schemas>=0.1.24",
"aiohttp>=3.9.0",
"aiofiles>=23.0.0",
"opentelemetry-api>=1.20.0",
"opentelemetry-sdk>=1.20.0",
"time-machine>=2.10.0",
"typing_extensions>=4.4.0",
]
[project.optional-dependencies]
flask = ["Flask>=3.1.2"]
fastapi = ["fastapi>=0.115.6", "uvicorn>=0.34.2", "starlette<0.42.0"]
django = ["Django>=4.2"]
rust = ["drift-core-python>=0.1.9"]
dev = [
"Flask>=3.1.2",
"fastapi>=0.115.6",
"uvicorn>=0.34.2",
"python-jsonpath>=0.10",
"ruff==0.14.13",
"ty==0.0.12",
"pytest>=8.0.0,<9.0.0",
"pytest-mock>=3.15.0",
"pytest-cov>=7.0.0",
]
[project.urls]
Homepage = "https://usetusk.ai"
Documentation = "https://docs.usetusk.ai"
Repository = "https://github.com/Use-Tusk/drift-python-sdk"
Issues = "https://github.com/Use-Tusk/drift-python-sdk/issues"
[tool.setuptools.packages.find]
where = ["."]
include = ["drift*"]
[tool.setuptools.package-data]
drift = ["py.typed"]
[tool.uv]
prerelease = "allow"
[tool.ruff]
target-version = "py39"
line-length = 120
exclude = [
# Ignore all rules for generated protobuf and grpc
"**/greeter_pb2.py",
"**/greeter_pb2_grpc.py",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
]
ignore = [
"E501", # line too long (handled by formatter)
"E402", # module import not at top of file (common for conditional imports)
"B008", # do not perform function calls in argument defaults
"B904", # raise without from inside except
"ARG001", # unused function argument (common in handlers/callbacks)
"ARG002", # unused method argument
"ARG005", # unused lambda argument (common in callbacks)
"SIM105", # use contextlib.suppress (explicit try-except is clearer)
"SIM108", # use ternary operator (readability preference)
"SIM102", # collapsible if (readability preference)
"SIM116", # use dict instead of if-else (readability preference)
"SIM117", # multiple with statements (readability preference)
]
[tool.ruff.lint.per-file-ignores]
"drift/core/drift_sdk.py" = ["F401"] # unused imports for availability checking
"drift/instrumentation/**/e2e-tests/**" = ["F401", "F841", "UP045"] # test files
"drift/stack-tests/**" = ["F401", "F841", "UP045"] # stack test files
[tool.ruff.lint.isort]
known-first-party = ["drift"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ty.environment]
python-version = "3.9"
[tool.ty.src]
# Exclude e2e-tests and stack-tests directories from type checking
exclude = ["**/e2e-tests/**", "**/stack-tests/**"]
[[tool.ty.overrides]]
# Disable unresolved-import errors for instrumentation files with optional dependencies
include = [
"drift/core/**",
"drift/instrumentation/django/**",
"drift/instrumentation/grpc/**",
"drift/instrumentation/psycopg/**",
"drift/instrumentation/psycopg2/**",
"drift/instrumentation/sqlalchemy/**",
"drift/instrumentation/pyjwt/**",
"drift/instrumentation/redis/**",
"drift/instrumentation/kinde/**",
"drift/instrumentation/urllib3/**",
"drift/instrumentation/http/transform_engine.py",
]
[tool.ty.overrides.rules]
"unresolved-import" = "ignore"