Skip to content

Commit dd537ab

Browse files
authored
Python-CDK(!): Temporarily break CDK builds during migration effort (#48445)
1 parent e4641d3 commit dd537ab

File tree

1 file changed

+127
-0
lines changed

1 file changed

+127
-0
lines changed

airbyte-cdk/python/pyproject.toml-bak

+127
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
[build-system]
2+
requires = ["poetry-core>=1.0.0"]
3+
build-backend = "poetry.core.masonry.api"
4+
5+
[tool.poetry]
6+
name = "airbyte-cdk"
7+
version = "6.5.2"
8+
description = "A framework for writing Airbyte Connectors."
9+
authors = ["Airbyte <contact@airbyte.io>"]
10+
license = "MIT"
11+
readme = "README.md"
12+
homepage = "https://github.com/airbytehq/airbyte"
13+
repository = "https://github.com/airbytehq/airbyte"
14+
documentation = "https://docs.airbyte.io/"
15+
classifiers = [
16+
"Development Status :: 3 - Alpha",
17+
"Intended Audience :: Developers",
18+
"Topic :: Scientific/Engineering",
19+
"Topic :: Software Development :: Libraries :: Python Modules",
20+
"License :: OSI Approved :: MIT License",
21+
"Programming Language :: Python :: 3.10",
22+
]
23+
keywords = ["airbyte", "connector-development-kit", "cdk"]
24+
25+
26+
[tool.poetry.dependencies]
27+
python = "^3.10"
28+
airbyte-protocol-models-dataclasses = "^0.13"
29+
backoff = "*"
30+
cachetools = "*"
31+
Deprecated = "~1.2"
32+
dpath = "^2.1.6"
33+
genson = "1.2.2"
34+
isodate = "~0.6.1"
35+
Jinja2 = "~3.1.2"
36+
jsonref = "~0.2"
37+
jsonschema = "~3.2.0"
38+
pandas = "2.2.2"
39+
pendulum = "<3.0.0"
40+
psutil = "6.1.0"
41+
pydantic = "^2.7"
42+
pyrate-limiter = "~3.1.0"
43+
python-dateutil = "*"
44+
PyYAML = "^6.0.1"
45+
requests = "*"
46+
requests_cache = "*"
47+
wcmatch = "8.4"
48+
# Extras depedencies
49+
avro = { version = "~1.11.2", optional = true }
50+
cohere = { version = "4.21", optional = true }
51+
fastavro = { version = "~1.8.0", optional = true }
52+
langchain = { version = "0.1.16", optional = true }
53+
langchain_core = { version = "0.1.42", optional = true }
54+
markdown = { version = "*", optional = true }
55+
openai = { version = "0.27.9", extras = ["embeddings"], optional = true }
56+
pdf2image = { version = "1.16.3", optional = true }
57+
"pdfminer.six" = { version = "20221105", optional = true }
58+
pyarrow = { version = "~15.0.0", optional = true }
59+
pytesseract = { version = "0.3.10", optional = true }
60+
python-calamine = { version = "0.2.3", optional = true }
61+
python-snappy = { version = "0.7.3", optional = true }
62+
Sphinx = { version = "~4.2", optional = true }
63+
sphinx-rtd-theme = { version = "~1.0", optional = true }
64+
tiktoken = { version = "0.4.0", optional = true }
65+
nltk = { version = "3.8.1", optional = true }
66+
# This will ensure that even when you run poetry install or pip install, the compatible version of numpy will always be chosen.
67+
# airbyte-ci will try to install latest version when --use-local-cdk is used, resulting in the conflict.
68+
numpy = "<2"
69+
unstructured = { version = "0.10.27", extras = ["docx", "pptx"], optional = true }
70+
"unstructured.pytesseract" = { version = ">=0.3.12", optional = true }
71+
pyjwt = "^2.8.0"
72+
cryptography = "^42.0.5"
73+
pytz = "2024.1"
74+
orjson = "^3.10.7"
75+
serpyco-rs = "^1.10.2"
76+
sqlalchemy = {version = "^2.0,!=2.0.36", optional = true }
77+
xmltodict = "^0.13.0"
78+
79+
[tool.poetry.group.dev.dependencies]
80+
freezegun = "*"
81+
mypy = "*"
82+
asyncio = "3.4.3"
83+
poethepoet = "^0.24.2"
84+
pyproject-flake8 = "^6.1.0"
85+
pytest = "^7"
86+
pytest-memray = "^1.6.0"
87+
pytest-cov = "*"
88+
pytest-httpserver = "*"
89+
pytest-mock = "*"
90+
requests-mock = "*"
91+
92+
[tool.poetry.extras]
93+
file-based = ["avro", "fastavro", "pyarrow", "unstructured", "pdf2image", "pdfminer.six", "unstructured.pytesseract", "pytesseract", "markdown", "python-calamine", "python-snappy"]
94+
sphinx-docs = ["Sphinx", "sphinx-rtd-theme"]
95+
vector-db-based = ["langchain", "openai", "cohere", "tiktoken"]
96+
sql = ["sqlalchemy"]
97+
98+
[tool.ruff]
99+
# Setting python version to at least 3.10 avoids `from __future__ import annotations`.
100+
target-version = "py310"
101+
# This is consistent with airbytehq/airbyte root pyproject.toml Black rule defined.
102+
line-length = 140
103+
104+
[tool.poe.tasks]
105+
# Build tasks
106+
assemble = {cmd = "bin/generate-component-manifest-dagger.sh", help = "Generate component manifest files."}
107+
build-package = {cmd = "poetry build", help = "Build the python package: source and wheels archives."}
108+
build = {sequence = ["assemble", "build-package"], help = "Run all tasks to build the package."}
109+
110+
# Check tasks
111+
lint = {cmd = "pflake8 --config ../../pyproject.toml ./", help = "Lint with flake8."}
112+
type-check = {cmd = "bin/run-mypy-on-modified-files.sh", help = "Type check modified files with mypy."}
113+
unit-test-with-cov = {cmd = "pytest -s unit_tests -c pytest.ini --cov=airbyte_cdk --cov-report=term --cov-config ../../pyproject.toml", help = "Run unit tests and create a coverage report."}
114+
# TODO: find a version of the modified mypy check that works both locally and in CI.
115+
check-lockfile = {cmd = "poetry check", help = "Check the poetry lock file."}
116+
check-local = {sequence = ["lint", "type-check", "check-lockfile", "unit-test-with-cov"], help = "Lint all code, type-check modified files, and run unit tests."}
117+
check-ci = {sequence = ["check-lockfile", "build", "lint", "unit-test-with-cov"], help = "Build the package, lint and run unit tests. Does not include type-checking."}
118+
119+
# Build and check
120+
pre-push = {sequence = ["build", "check-local"], help = "Run all build and check tasks."}
121+
122+
[tool.airbyte_ci]
123+
python_versions = ["3.10", "3.11"]
124+
optional_poetry_groups = ["dev"]
125+
poetry_extras = ["file-based", "sphinx-docs", "vector-db-based"]
126+
poe_tasks = ["check-ci"]
127+
mount_docker_socket = true

0 commit comments

Comments
 (0)