-
Notifications
You must be signed in to change notification settings - Fork 251
Expand file tree
/
Copy pathpyproject.toml
More file actions
249 lines (212 loc) · 7.1 KB
/
Copy pathpyproject.toml
File metadata and controls
249 lines (212 loc) · 7.1 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
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
243
244
245
246
247
248
249
[project]
name = "datacontract-cli"
version = "1.0.13"
description = "The datacontract CLI is an open source command-line tool for working with Data Contracts. It uses data contract YAML files to lint the data contract, connect to data sources and execute schema and quality tests, detect breaking changes, and export to different formats. The tool is written in Python. It can be used as a standalone CLI tool, in a CI/CD pipeline, or directly as a Python library."
license = "MIT"
readme = "README.md"
authors = [
{ name = "Jochen Christ", email = "jochen.christ@innoq.com" },
{ name = "Stefan Negele", email = "stefan.negele@innoq.com" },
{ name = "Simon Harrer", email = "simon.harrer@innoq.com" },
]
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
requires-python = ">=3.10,<3.15"
dependencies = [
"typer>=0.18.0,<0.28",
"click>=8.1.0,<9.0.0",
"pydantic>=2.8.2,<2.14.0",
"pyyaml~=6.0.1",
"ruamel.yaml>=0.17,<0.20",
"requests>=2.31,<2.35",
"truststore>=0.10,<1.0",
"fastjsonschema>=2.19.1,<2.22.0",
"jsonschema>=4.23.0,<5.0.0",
"pytz>=2024.1",
"python-multipart>=0.0.20,<1.0.0",
"rich>=13.7,<16.0",
"sqlglot>=26.6.0,<31.0.0",
"python-dotenv>=1.0.0,<2.0.0",
"boto3>=1.34.41,<2.0.0",
"Jinja2>=3.1.5,<4.0.0",
"jinja_partials>=0.2.1,<1.0.0",
"datacontract-specification>=1.2.3,<2.0.0",
"open-data-contract-standard>=3.1.2,<4.0.0",
"deepdiff>=6.0.0,<10.0.0",
]
[project.optional-dependencies]
avro = [
"avro==1.12.1"
]
bigquery = [
"ibis-framework[bigquery]>=10.0.0,<13.0.0",
]
csv = [
"pandas >= 2.0.0",
]
excel = [
"openpyxl>=3.1.5,<4.0.0",
]
databricks = [
"ibis-framework[databricks,pyspark]>=10.0.0,<13.0.0",
"databricks-sql-connector>=3.7.0,<4.4.0",
"databricks-sdk<0.122.0",
# Not capped to Spark 3.5.x like older builds were: the databricks path uses a
# caller-provided Spark session (or the databricks SQL connector) and never
# loads the Kafka/Avro connector jars, so it isn't tied to a Scala/Spark line.
"pyspark>=3.5.0,<5.0.0",
]
iceberg = [
"pyiceberg==0.11.1"
]
kafka = [
"datacontract-cli[avro]",
"ibis-framework[pyspark]>=10.0.0,<13.0.0",
# kafka.py derives the Kafka/Avro connector jar coordinates (Spark version and
# Scala binary version) from the installed pyspark at runtime, so both 3.5.x
# (Scala 2.12) and 4.x (Scala 2.13) work. ibis-framework[pyspark] currently
# caps pyspark to <4.1, so this resolves to the 4.0.x line.
"pyspark>=3.5.0,<5.0.0",
]
# MySQL is tested through DuckDB's `mysql` extension (ATTACH), not ibis's
# native MySQL backend, which would require `mysqlclient` (a C extension with no
# macOS/Linux wheels). No Python MySQL driver is needed at runtime; the test
# fixtures' seed driver (mysql-connector-python) lives in the `dev` extra.
mysql = [
"datacontract-cli[duckdb]",
]
postgres = [
"ibis-framework[postgres]>=10.0.0,<13.0.0",
# psycopg's binary wheels bundle libpq, so the extra works without
# PostgreSQL client libraries installed on the system.
"psycopg[binary]>=3.1,<4.0",
]
redshift = [
# Redshift speaks the postgres wire protocol; ibis has no dedicated backend.
"ibis-framework[postgres]>=10.0.0,<13.0.0",
# psycopg's binary wheels bundle libpq, so the extra works without
# PostgreSQL client libraries installed on the system.
"psycopg[binary]>=3.1,<4.0",
]
# DuckDB extension wheels are bundled for air-gapped installs. The 1.5.x line
# publishes wheels for all platforms including manylinux2014_aarch64, so no
# platform markers are needed.
s3 = [
"s3fs>=2025.2.0,<2027.0.0",
"duckdb-extension-httpfs>=1.5.0,<1.6.0",
"duckdb-extension-aws>=1.5.0,<1.6.0",
]
gcs = [
"datacontract-cli[duckdb]",
"duckdb-extension-httpfs>=1.5.0,<1.6.0",
]
azure = [
"datacontract-cli[duckdb]",
"duckdb-extension-azure>=1.5.0,<1.6.0",
"azure-identity>=1.17.1,<1.26",
"azure-storage-blob>=12.24,<12.31",
]
snowflake = [
"snowflake-connector-python[pandas]>=3.6,<4.8",
"ibis-framework[snowflake]>=10.0.0,<13.0.0"
]
sqlserver = [
"ibis-framework[mssql]>=10.0.0,<13.0.0"
]
oracle = [
"ibis-framework[oracle]>=10.0.0,<13.0.0"
]
athena = [
"ibis-framework[athena]>=10.0.0,<13.0.0"
]
trino = [
"ibis-framework[trino]>=10.0.0,<13.0.0"
]
impala = [
"ibis-framework[impala]>=10.0.0,<13.0.0"
]
dbml = [
"pydbml>=1.1.1"
]
# duckdb must stay in lockstep with the bundled duckdb-extension-* wheels
# (httpfs/aws/azure) used for air-gapped installs, since those extensions are
# built per duckdb version. Both are pinned to the 1.5.x line.
duckdb = [
"duckdb>=1.5.0,<1.6.0",
"ibis-framework[duckdb]>=10.0.0,<13.0.0",
]
parquet = [
"pyarrow>=18.1.0"
]
rdf = [
"rdflib==7.6.0",
]
api = [
"fastapi>=0.115.0,<0.140.0",
"uvicorn>=0.44.0,<0.52.0",
]
protobuf = [
# Pure-Python .proto parser — no `protoc` system binary or C extension needed.
"proto-schema-parser>=1.0,<3.0",
]
all = [
"datacontract-cli[kafka,bigquery,csv,excel,snowflake,postgres,redshift,mysql,databricks,sqlserver,s3,gcs,azure,athena,trino,impala,dbml,duckdb,iceberg,parquet,rdf,api,protobuf,oracle]"
]
# for development, we pin all libraries to an exact version
dev = [
"datacontract-cli[all]",
"httpx==0.28.1",
"kafka-python",
"minio==7.2.20", # Pin to 7.2.17 - 7.2.18+ has keyword-only params incompatible with testcontainers
"moto==5.2.2",
"pandas>=2.1.0",
"pre-commit>=3.7.1,<4.7.0",
"pytest",
"pytest-xdist",
"pymssql==2.3.13",
# psycopg2 / mysql-connector-python are used directly by the postgres / mysql
# test fixtures to load seed SQL (the engine connects via ibis-postgres'
# psycopg v3 and DuckDB's mysql extension respectively).
"psycopg2-binary>=2.9,<3.0",
"mysql-connector-python>=8.0.30,<9.7.0",
"ruff==0.15.22",
"testcontainers[minio,postgres,kafka,mssql,mysql]==4.14.2",
"trino==0.338.0",
]
[project.urls]
Homepage = "https://cli.datacontract.com"
Issues = "https://github.com/datacontract/datacontract-cli/issues"
[project.scripts]
datacontract = "datacontract.cli:main"
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[tool.uv]
# yarl 1.24.0 and 1.24.1 were published to PyPI with cp310-only wheels and no
# sdist, so `uv sync` fails on Python 3.11/3.12/3.13 ("no wheel for the current
# platform"). The whole 1.24.x line is affected; pin below it (resolves to the
# last good 1.23.0) until a 1.24.x with full wheels is available.
override-dependencies = [
"yarl<1.24",
]
[tool.pytest.ini_options]
# Exclude slow tests by default; run them with `pytest -m slow` (or `-m "slow or not slow"` for everything).
# Append parallel execution with "-n 8" if desired (disable with "-n0").
addopts = "-m 'not slow'"
testpaths = ["tests"]
markers = [
"slow: tests that are slow to run (e.g. pull large containers); deselect with '-m \"not slow\"'",
]
log_level = "INFO"
#log_cli = "true" # activate live logging, do not use with -n 8 xdist option for parallel test execution: https://github.com/pytest-dev/pytest-xdist/issues/402
log_cli_level = "INFO"
[tool.ruff]
line-length = 120
[tool.ruff.lint]
extend-select = [
"I", # re-order imports in alphabetic order
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F403"]