-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathpyproject.toml
More file actions
186 lines (165 loc) · 7.01 KB
/
pyproject.toml
File metadata and controls
186 lines (165 loc) · 7.01 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
[tool.poetry]
name = "airbyte"
description = "PyAirbyte"
authors = ["Airbyte <contact@airbyte.io>"]
readme = "README.md"
packages = [{ include = "airbyte" }]
# This project uses dynamic versioning
# https://github.com/mtkennerly/poetry-dynamic-versioning
# Dummy change to trigger CI for cloud test xfail investigation
version = "0.0.0"
[tool.poetry-dynamic-versioning]
enable = true
[tool.poetry.dependencies]
python = ">=3.10,<3.13"
airbyte-api = "^0.53.0"
airbyte-cdk = ">=7.3.9,<8.0.0"
airbyte-protocol-models-pdv2 = "^0.13.0"
click = "^8.1.7"
cryptography = ">=44.0.0,<45.0.0"
# TODO: Remove duckdb upper bound once duckdb-engine fixes unhashable DuckDBPyType issue
# See: https://github.com/Mause/duckdb_engine/issues/1338
# See: https://github.com/airbytehq/PyAirbyte/issues/809
duckdb = ">=1.1.0,<1.4.0"
duckdb-engine = "^0.13.2"
google-auth = ">=2.27.0,<3.0"
google-cloud-bigquery = ">=3.12.0,<4.0"
google-cloud-bigquery-storage = "^2.25.0"
google-cloud-secret-manager = "^2.17.0"
jsonschema = ">=3.2.0,<5.0"
orjson = "^3.10"
overrides = "^7.4.0"
pandas = { version = ">=1.5.3,<3.0" }
psycopg = {extras = ["binary", "pool"], version = "^3.1.19"}
psycopg2-binary = "^2.9.9"
pyarrow = ">=16.1,<22.0"
pydantic = ">=2.0,<=3.0"
pydantic-core = "*"
python-dotenv = "^1.0.1"
python-ulid = "^3.0.0"
pyyaml = "^6.0.2"
requests = "!=3.32.0" # 3.32.0 breaks docker tests
rich = "^13.7.0"
snowflake-connector-python = "^3.12.2"
snowflake-sqlalchemy = "^1.6.1"
structlog = "^24.4.0"
# TODO: Remove SQLAlchemy version constraint once DuckDB engine bug is fixed (issue #423)
sqlalchemy = ">=1.4.51,!=2.0.36,<3.0"
# TODO: Remove this arbitrary python constraint once `sqlalchemy-bigquery` has done so.
sqlalchemy-bigquery = { version = "1.12.0", python = "<3.13" }
typing-extensions = "*"
uuid7 = "^0.1.0"
fastmcp = ">=2.11.3,<3.0.0"
uv = ">=0.5.0,<0.9.0"
[tool.poetry.group.dev.dependencies]
coverage = "^7.5.1"
deptry = "^0.21.1"
docker = "^7.1.0"
faker = "^21.0.0"
freezegun = "^1.4.0"
pyrefly = ">=0.38.0"
pandas-stubs = "^2.1.4.231218"
pdoc = "^16.0.0"
poethepoet = ">=0.26.1,<0.32.0"
pytest = "^8.2.0"
pytest-docker = "^3.1.1"
pytest-mock = "^3.14.0"
pytest-timeout = "^2.3.1"
responses = "^0.25.0"
ruff = "^0.8.2"
sqlalchemy2-stubs = "^0.0.2a38"
tomli = "^2.0"
types-jsonschema = "^4.20.0.0"
types-pyyaml = "^6.0.12.12"
types-requests = "2.31.0.4"
viztracer = ">=0.16.3,<1.1.0"
pydantic-ai = {extras = ["mcp"], version = "^0.2.16"}
[build-system]
requires = ["poetry-core>=1.0.0,<2.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"
[tool.pytest.ini_options]
# Pytest configuration as follows:
# - No test can take longer than 10 minutes (600 seconds)
# - Markers must be declared explicitly
# - Generate junit test results at a deterministic location
addopts = "-rs --strict-markers --timeout=600 --junit-xml=build/test-results/test-results.xml"
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"super_slow: these super slow tests will not run in CI; they will only ever run on-demand",
"requires_creds: marks a test as requiring credentials (skip when secrets unavailable)",
"linting: marks a test as a linting test",
"flaky: marks a test as flaky",
]
filterwarnings = [ # syntax: "action:message_regex:category:module:line"
# Treat python warnings as errors in pytest
# "error", # TODO: Revert. Currently disabled because `airbyte_cdk.sources.source.ExperimentalClassWarning` ignore is not working
# # Snowflake reregisters its functions, which is fine.
"ignore::sqlalchemy.exc.SAWarning", # "GenericFunction is already registered and is going to be overridden.""
# Ignore these, specifically on Windows because of file cleanup and locking issues:
"ignore:unclosed file:ResourceWarning",
"ignore:Failed to decode:UserWarning", # https://github.com/airbytehq/pyairbyte/issues/320
"ignore::pytest.PytestUnraisableExceptionWarning",
# Order matters here. This must be last because it will fail if we
# hit another warning during the import.
"ignore::airbyte_cdk.sources.source.ExperimentalClassWarning",
"ignore::airbyte.exceptions.AirbyteExperimentalFeatureWarning",
# CDK has these refs:
"ignore::pydantic.warnings.PydanticDeprecatedSince20",
]
# [tool.ruff]
# Ruff moved to dedicated config file: `.ruff.toml`
# [tool.pyrefly]
# Pyrefly moved to dedicated config file: `pyrefly.toml`
[tool.mypy]
# Disable all mypy checks for this project since we use pyrefly instead
ignore_errors = true
[tool.pyright]
pythonVersion = "3.10"
venvPath = "./" # Assuming .venv is at the root of your project
venv = ".venv"
[tool.poetry.scripts]
pyairbyte = "airbyte.cli:cli"
pyab = "airbyte.cli:cli"
airbyte-mcp = "airbyte.mcp.server:main"
[tool.poe.tasks]
test = { shell = "pytest" }
test-fast = { shell = "pytest --durations=5 --exitfirst -m 'not slow'" }
test-unit-tests = { shell = "pytest tests/unit_tests/" }
coverage = { shell = "coverage run -m pytest && coverage report" }
coverage-report = { shell = "coverage report" }
coverage-html = { shell = "coverage html -d htmlcov && open htmlcov/index.html" }
coverage-reset = { shell = "coverage erase" }
check = { shell = "ruff check . && pyrefly check && pytest --collect-only -qq" }
docs-generate = {env = {PDOC_ALLOW_EXEC = "1"}, cmd = "python -m docs.generate run"}
docs-preview = {shell = "poe docs-generate && open docs/generated/index.html"}
fix = { shell = "ruff format . && ruff check --fix -s || ruff format ." }
fix-unsafe = { shell = "ruff format . && ruff check --fix --unsafe-fixes . && ruff format ." }
fix-and-check = { shell = "poe fix && poe check" }
# MCP Server Tasks
mcp-serve-local = { cmd = "poetry run airbyte-mcp", help = "Start the MCP server with STDIO transport" }
mcp-serve-http = { cmd = "poetry run python -c \"from airbyte.mcp.server import app; app.run(transport='http', host='127.0.0.1', port=8000)\"", help = "Start the MCP server with HTTP transport" }
mcp-serve-sse = { cmd = "poetry run python -c \"from airbyte.mcp.server import app; app.run(transport='sse', host='127.0.0.1', port=8000)\"", help = "Start the MCP server with SSE transport" }
mcp-inspect = { cmd = "poetry run fastmcp inspect airbyte/mcp/server.py:app", help = "Inspect MCP tools and resources (supports --tools, --health, etc.)" }
mcp-tool-test = { cmd = "poetry run python bin/test_mcp_tool.py", help = "Test MCP tools directly with JSON arguments: poe mcp-tool-test <tool_name> '<json_args>'" }
[tool.airbyte_ci]
extra_poetry_groups = ["dev"]
poe_tasks = ["test"]
required_environment_variables = ["GCP_GSM_CREDENTIALS"]
side_car_docker_engine = true
[tool.deptry.per_rule_ignores]
# This is a mapping of rules and package names to be ignored for that rule.
DEP001 = [
"IPython" # Optional dependency, used for detecting Notebook environments
]
DEP004 = [
"pdoc" # Only used for generating documentation. Not a runtime dependency.
]
DEP002 = [
# Only used for SQLAlchemy engine. Not imported directly:
"duckdb",
"psycopg",
"psycopg2-binary",
"sqlalchemy-bigquery",
# Used as subprocess tool, not imported directly:
"uv",
]