From dd45537239a5e3485e9f7d5bff0319045f800446 Mon Sep 17 00:00:00 2001 From: "Sherif A. Nada" Date: Mon, 3 May 2021 18:34:18 -0700 Subject: [PATCH] use extras for CDK development and remove python 3.10 support (#3200) --- airbyte-cdk/python/README.md | 12 +++++++ airbyte-cdk/python/requirements.txt | 1 - airbyte-cdk/python/setup.py | 52 ++++++++++++++++------------- 3 files changed, 40 insertions(+), 25 deletions(-) delete mode 100644 airbyte-cdk/python/requirements.txt diff --git a/airbyte-cdk/python/README.md b/airbyte-cdk/python/README.md index 1d894efba514d..cb069a3d3368e 100644 --- a/airbyte-cdk/python/README.md +++ b/airbyte-cdk/python/README.md @@ -41,3 +41,15 @@ Find the reference docs for the Airbyte Specification (the interface for how sou **Simple Python connectors using the barebones `Source` abstraction**: * [Google Sheets](https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connectors/source-google-sheets/google_sheets_source/google_sheets_source.py) * [Mailchimp](https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connectors/source-mailchimp/source_mailchimp/source.py) + +## Contributing + +### First time setup +We assume `python` points to python >=3.7. + +Setup a virtual env: +``` +python -m venv .venv +source .venv/bin/activate +pip install -e ".[dev]" # [dev] installs development-only dependencies +``` diff --git a/airbyte-cdk/python/requirements.txt b/airbyte-cdk/python/requirements.txt deleted file mode 100644 index d6e1198b1ab1f..0000000000000 --- a/airbyte-cdk/python/requirements.txt +++ /dev/null @@ -1 +0,0 @@ --e . diff --git a/airbyte-cdk/python/setup.py b/airbyte-cdk/python/setup.py index 8deb595229808..c0ab40e152b38 100644 --- a/airbyte-cdk/python/setup.py +++ b/airbyte-cdk/python/setup.py @@ -41,42 +41,46 @@ license="MIT", url="https://github.com/airbytehq/airbyte", classifiers=[ - # This information is used when browsing on PyPi. + # This information is used when browsing on PyPi. - # Dev Status - 'Development Status :: 3 - Alpha', + # Dev Status + 'Development Status :: 3 - Alpha', - # Project Audience - 'Intended Audience :: Developers', - 'Topic :: Scientific/Engineering', - 'Topic :: Software Development :: Libraries :: Python Modules', + # Project Audience + 'Intended Audience :: Developers', + 'Topic :: Scientific/Engineering', + 'Topic :: Software Development :: Libraries :: Python Modules', - 'License :: OSI Approved :: MIT License', + 'License :: OSI Approved :: MIT License', + + # Python Version Support + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9' - # Python Version Support - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', ], keywords='airbyte connectors-development-kit cdk', project_urls={ - 'Documentation': 'https://docs.airbyte.io/', - 'Source': 'https://github.com/airbytehq/airbyte', - 'Tracker': 'https://github.com/airbytehq/airbyte/issues', + 'Documentation': 'https://docs.airbyte.io/', + 'Source': 'https://github.com/airbytehq/airbyte', + 'Tracker': 'https://github.com/airbytehq/airbyte/issues', }, packages=find_packages(exclude=("unit_tests",)), install_requires=[ - "backoff", - "jsonschema==2.6.0", - "pendulum", - "pydantic==1.6.1", - "pytest", - "PyYAML==5.4", - "requests", + "backoff", + "jsonschema==2.6.0", + "pendulum", + "pydantic==1.6.1", + "PyYAML==5.4", + "requests", ], python_requires='>=3.7.9', + extras={ + "dev": [ + "pytest", + ] + }, entry_points={ - "console_scripts": ["base-python=base_python.entrypoint:main"], + "console_scripts": ["base-python=base_python.entrypoint:main"], }, )