-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
175 lines (156 loc) · 4.52 KB
/
pyproject.toml
File metadata and controls
175 lines (156 loc) · 4.52 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
[project]
name = "amp"
version = "0.1.0"
description = "Flight SQL client with comprehensive data loading capabilities"
readme = "README.md"
authors = [
{ name = "Ford", email = "ford@edgeandnode.com" }
]
requires-python = ">=3.12"
dependencies = [
# Core dependencies for all loaders
"pandas>=2.3.1",
"pyarrow>=20.0.0",
"typer>=0.15.2",
# Flight SQL support
"adbc-driver-manager>=1.5.0",
"adbc-driver-postgresql>=1.5.0",
"protobuf>=4.21.0",
# Ethereum/blockchain utilities
"base58>=2.1.1",
"eth-hash[pysha3]>=0.7.1",
"eth-utils>=5.2.0",
# Google Cloud support
"google-cloud-bigquery>=3.30.0",
"google-cloud-storage>=3.1.0",
# Arro3 for enhanced PyArrow operations
"arro3-core>=0.5.1",
"arro3-compute>=0.5.1",
# Admin API client support
"httpx>=0.27.0",
"pydantic>=2.0,<2.12", # Constrained for PyIceberg compatibility
]
[dependency-groups]
dev = [
"altair>=5.5.0", # Data visualization for notebooks
"marimo>=0.11.31", # Interactive notebooks
"ruff>=0.8.0", # Linting and formatting
"datamodel-code-generator>=0.25.0", # OpenAPI to Pydantic model generation
]
# Optional dependency groups for specific loaders
postgresql = [
"psycopg2-binary>=2.9.0",
]
redis = [
"redis>=4.5.0",
]
delta_lake = [
"deltalake>=1.0.2",
]
iceberg = [
"pyiceberg[sql-sqlite]>=0.10.0",
"pydantic>=2.0,<2.12", # PyIceberg 0.10.0 has issues with Pydantic 2.12+
]
snowflake = [
"snowflake-connector-python>=4.0.0",
"snowpipe-streaming>=1.0.0", # Snowpipe Streaming API
]
lmdb = [
"lmdb>=1.4.0",
]
all_loaders = [
"psycopg2-binary>=2.9.0", # PostgreSQL
"redis>=4.5.0", # Redis
"deltalake>=1.0.2", # Delta Lake (consistent version)
"pyiceberg[sql-sqlite]>=0.10.0", # Apache Iceberg
"pydantic>=2.0,<2.12", # PyIceberg 0.10.0 compatibility
"snowflake-connector-python>=4.0.0", # Snowflake
"snowpipe-streaming>=1.0.0", # Snowpipe Streaming API
"lmdb>=1.4.0", # LMDB
]
test = [
"pytest>=8.3.5",
"pytest-asyncio>=0.21.0",
"pytest-mock>=3.10.0",
"pytest-cov>=4.0.0",
"pytest-xdist>=3.0.0", # Parallel test execution
"pytest-benchmark>=4.0.0", # Performance benchmarking
"testcontainers>=4.0.0", # Database containers for integration tests
"docker>=6.0.0", # Required by testcontainers
"psutil>=5.9.0", # Memory usage monitoring
"respx>=0.21.0", # HTTP mocking for Admin API tests
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/amp"]
[tool.pytest.ini_options]
pythonpath = ["."]
testpaths = ["tests"]
asyncio_default_fixture_loop_scope = "function"
addopts = [
"-v",
"--tb=short",
"--strict-markers",
]
filterwarnings = [
# Ignore testcontainers deprecation warnings from the library itself
"ignore:The @wait_container_is_ready decorator is deprecated:DeprecationWarning:testcontainers",
"ignore:The wait_for_logs function with string or callable predicates is deprecated:DeprecationWarning",
]
markers = [
"unit: Unit tests (fast, no external dependencies)",
"integration: Integration tests (require databases)",
"performance: Performance and benchmark tests",
"slow: Slow tests (> 30 seconds)",
"postgresql: Tests requiring PostgreSQL",
"redis: Tests requiring Redis",
"delta_lake: Tests requiring Delta Lake",
"iceberg: Tests requiring Apache Iceberg",
"snowflake: Tests requiring Snowflake",
"cloud: Tests requiring cloud storage access",
]
[tool.ruff]
line-length = 120
target-version = "py312"
exclude = [
"notebooks/",
"*.ipynb",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
]
exclude = [
"src/amp/FlightSql_pb2.py", # Generated protobuf file
"src/amp/registry/models.py", # Generated from OpenAPI spec
"*notebook*"
]
[tool.ruff.lint.per-file-ignores]
"*_nb.py" = ["B018"] # Notebook files
"tests/*" = ["B018", "E712"] # Test files
[tool.ruff.format]
quote-style = "single"
exclude = [
"notebooks/**",
"**/*.ipynb",
]
[tool.coverage.run]
source = ["src/amp"]
omit = [
"src/amp/FlightSql_pb2.py",
"tests/*",
"notebooks/*"
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
]