-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
135 lines (119 loc) · 3.89 KB
/
pyproject.toml
File metadata and controls
135 lines (119 loc) · 3.89 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
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "tusk-drift-python-sdk"
version = "0.1.9"
description = "Python SDK for Tusk Drift instrumentation and replay"
readme = "README.md"
requires-python = ">=3.9"
license = {text = "MIT"}
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 :: MIT 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>=6.0",
"PyYAML>=6.0",
"requests>=2.32.5",
"tusk-drift-schemas>=0.1.9.dev1",
"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"]
dev = [
"Flask>=3.1.2",
"fastapi>=0.115.6",
"uvicorn>=0.34.2",
"python-jsonpath>=0.10",
"ruff>=0.8.0",
"ty>=0.0.1a7",
"pytest>=8.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
[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"] # 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 directories from type checking
exclude = ["**/e2e-tests/**"]
[[tool.ty.overrides]]
# Disable unresolved-import errors for instrumentation files with optional dependencies
include = [
"drift/instrumentation/django/**",
"drift/instrumentation/psycopg/**",
"drift/instrumentation/psycopg2/**",
"drift/instrumentation/redis/**",
"drift/instrumentation/http/transform_engine.py",
]
[tool.ty.overrides.rules]
"unresolved-import" = "ignore"