Completely test the OAuth module and streams/core.py file. Add pytest-mock as well as a convenience wrapper to run the type checker and the test together when developing. Also configure pytest to pick up loggers at the INFO level and above, and pick up standard out for easier debugging. Some of the script bits are unpolished - will improve them as we go along.
86 lines
2.9 KiB
Python
86 lines
2.9 KiB
Python
# MIT License
|
|
#
|
|
# Copyright (c) 2020 Airbyte
|
|
#
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
# in the Software without restriction, including without limitation the rights
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
# furnished to do so, subject to the following conditions:
|
|
#
|
|
# The above copyright notice and this permission notice shall be included in all
|
|
# copies or substantial portions of the Software.
|
|
#
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
# SOFTWARE.
|
|
|
|
|
|
import pathlib
|
|
|
|
from setuptools import find_packages, setup
|
|
|
|
# The directory containing this file
|
|
HERE = pathlib.Path(__file__).parent
|
|
|
|
# The text of the README file
|
|
README = (HERE / "README.md").read_text()
|
|
|
|
setup(
|
|
name="airbyte-cdk",
|
|
version="0.0.1",
|
|
description="Contains machinery to make it easy to write an Airbyte Connector in Python.",
|
|
long_description=README,
|
|
long_description_content_type="text/markdown",
|
|
author="Airbyte",
|
|
author_email="contact@airbyte.io",
|
|
license="MIT",
|
|
url="https://github.com/airbytehq/airbyte",
|
|
classifiers=[
|
|
# This information is used when browsing on PyPi.
|
|
# Dev Status
|
|
"Development Status :: 3 - Alpha",
|
|
# Project Audience
|
|
"Intended Audience :: Developers",
|
|
"Topic :: Scientific/Engineering",
|
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
"License :: OSI Approved :: MIT License",
|
|
# Python Version Support
|
|
"Programming Language :: Python :: 3.7",
|
|
"Programming Language :: Python :: 3.8",
|
|
"Programming Language :: Python :: 3.9",
|
|
],
|
|
keywords="airbyte connector-development-kit cdk",
|
|
project_urls={
|
|
"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",
|
|
"PyYAML==5.4",
|
|
"requests",
|
|
],
|
|
python_requires=">=3.7.9",
|
|
extras_require={
|
|
"dev": [
|
|
"MyPy",
|
|
"pytest",
|
|
"pytest-cov",
|
|
"pytest-mock",
|
|
]
|
|
},
|
|
entry_points={
|
|
"console_scripts": ["base-python=base_python.entrypoint:main"],
|
|
},
|
|
)
|