Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove base-python gradle dependencies in connectors where base-python is not used #7499

Merged
merged 29 commits into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
468df3f
Remeve base-python references.
htrueman Oct 27, 2021
55e77d2
Remove base-python references
htrueman Oct 27, 2021
89382f1
Add requirements.txt
htrueman Oct 27, 2021
d9c5aeb
Add requirements.txt
htrueman Oct 27, 2021
ae93470
Remove base-python references
htrueman Oct 28, 2021
351a94c
Remove base-python references
htrueman Oct 28, 2021
5accbce
Remove base-python references
htrueman Oct 28, 2021
c534c97
Merge remote-tracking branch 'origin/htrueman/source-s3-refactor-to-c…
htrueman Oct 29, 2021
a190b3b
Merge remote-tracking branch 'origin/htrueman/source-apify-dataset-re…
htrueman Oct 29, 2021
89bcbdd
Merge remote-tracking branch 'origin/htrueman/source-bigcommerce-refa…
htrueman Oct 29, 2021
ae231ab
Merge remote-tracking branch 'origin/htrueman/source-dixa-refactor-to…
htrueman Oct 29, 2021
475cb4e
Merge remote-tracking branch 'origin/htrueman/source-exchange-rates-r…
htrueman Oct 29, 2021
e7ac7b0
Remove base-python references.
htrueman Oct 29, 2021
ba5af00
Get back requirements.txt files
htrueman Nov 1, 2021
b1728de
Delete s.sh
htrueman Nov 1, 2021
16907ca
Merge remote-tracking branch 'origin/master' into htrueman/remove-bas…
htrueman Nov 1, 2021
5172b2c
Fix requirements.txt blank line
htrueman Nov 1, 2021
df5f0c8
Fix source-exchange rates to common CDK approach
htrueman Nov 1, 2021
6409a9c
Fix source-smartsheets SAT.
htrueman Nov 4, 2021
80ecbc9
Bump docker version
htrueman Nov 8, 2021
71d1a3b
Merge remote-tracking branch 'origin/master' into htrueman/remove-bas…
htrueman Nov 8, 2021
2d736ec
Update source-dixa SAT config
htrueman Nov 9, 2021
26d7f7c
Fix source-exchange-rates SAT config
htrueman Nov 9, 2021
3d65504
Revert bump scaffod sources version
htrueman Nov 9, 2021
aac77b7
Fix source-shortion SAT config
htrueman Nov 9, 2021
65a78cd
Fix source-square invalid_config.json
htrueman Nov 9, 2021
57b52d5
Fix source-us-census invalid_config.json
htrueman Nov 9, 2021
b01b631
Merge remote-tracking branch 'origin/master' into htrueman/remove-bas…
htrueman Nov 10, 2021
2ed2f36
Fix source-intercom versioning
htrueman Nov 10, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ plugins {
airbytePython {
moduleDirectory 'source_apify_dataset'
}

dependencies {
implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs)
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from setuptools import find_packages, setup

MAIN_REQUIREMENTS = ["airbyte-cdk", "apify-client~=0.0.1"]
MAIN_REQUIREMENTS = ["airbyte-cdk~=0.1", "apify-client~=0.0.1"]

TEST_REQUIREMENTS = [
"pytest~=6.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ plugins {
airbytePython {
moduleDirectory 'source_bigcommerce'
}

dependencies {
implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs)
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from setuptools import find_packages, setup

MAIN_REQUIREMENTS = [
"airbyte-cdk",
"airbyte-cdk~=0.1",
]

TEST_REQUIREMENTS = [
Expand Down
5 changes: 0 additions & 5 deletions airbyte-integrations/connectors/source-dixa/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ plugins {
airbytePython {
moduleDirectory 'source_dixa'
}

dependencies {
implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs)
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-dixa/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from setuptools import find_packages, setup

MAIN_REQUIREMENTS = [
"airbyte-cdk",
"airbyte-cdk~=0.1",
]

TEST_REQUIREMENTS = [
Expand Down

This file was deleted.

14 changes: 7 additions & 7 deletions airbyte-integrations/connectors/source-exchange-rates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ The exchangerates API does not require authentication.

### Locally running the connector
```
python main_dev.py spec
python main_dev.py check --config sample_files/config.json
python main_dev.py discover --config sample_files/config.json
python main_dev.py read --config sample_files/config.json --catalog sample_files/configured_catalog.json
python main.py spec
python main.py check --config integration_tests/config.json
python main.py discover --config integration_tests/config.json
python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
```

### Unit Tests
Expand Down Expand Up @@ -73,9 +73,9 @@ the Dockerfile.
Then run any of the connector commands as follows:
```
docker run --rm airbyte/source-exchange-rates:dev spec
docker run --rm -v $(pwd)/sample_files:/sample_files airbyte/source-exchange-rates:dev check --config /sample_files/config.json
docker run --rm -v $(pwd)/sample_files:/sample_files airbyte/source-exchange-rates:dev discover --config /sample_files/config.json
docker run --rm -v $(pwd)/sample_files:/sample_files airbyte/source-exchange-rates:dev read --config /sample_files/config.json --catalog /sample_files/configured_catalog.json
docker run --rm -v $(pwd)/integration_tests:/integration_tests airbyte/source-exchange-rates:dev check --config /integration_tests/config.json
docker run --rm -v $(pwd)/integration_tests:/integration_tests airbyte/source-exchange-rates:dev discover --config /integration_tests/config.json
docker run --rm -v $(pwd)/integration_tests:/integration_tests airbyte/source-exchange-rates:dev read --config /integration_tests/config.json --catalog /integration_tests/configured_catalog.json
```

### Integration Tests
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# See [Source Acceptance Tests](https://docs.airbyte.io/connector-development/testing-connectors/source-acceptance-tests-reference)
# for more information about how to configure these tests
connector_image: airbyte/source-exchange-rates:dev
tests:
spec:
- spec_path: "source_exchange_rates/spec.json"
connection:
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
discovery:
- config_path: "secrets/config.json"
basic_read:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
# exchange_rates stream records are different on each read
# full_refresh:
# - config_path: "secrets/config.json"
# configured_catalog_path: "integration_tests/configured_catalog.json"
incremental:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
future_state_path: "integration_tests/abnormal_state.json"
cursor_paths:
exchange_rates: ["date"]
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,3 @@ plugins {
airbytePython {
htrueman marked this conversation as resolved.
Show resolved Hide resolved
moduleDirectory 'source_exchange_rates'
}

airbyteStandardSourceTestFile {
// For more information on standard source tests, see https://docs.airbyte.io/connector-development/testing-connectors

// All these input paths must live inside this connector's directory (or subdirectories)
specPath = "source_exchange_rates/spec.json"

// configPath points to a config file which matches the spec.json supplied above. secrets/ is gitignored by default, so place your config file
// there (in case it contains any credentials)
configPath = "secrets/config.json"
// Note: If your source supports incremental syncing, then make sure that the catalog that is returned in the get_catalog method is configured
// for incremental syncing (e.g. include cursor fields, etc).
configuredCatalogPath = "sample_files/configured_catalog.json"
}


dependencies {
implementation files(project(':airbyte-integrations:bases:base-standard-source-test-file').airbyteDocker.outputs)
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exchange_rates": {
"date": "2121-05-18"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#


import pytest

pytest_plugins = ("source_acceptance_test.plugin",)


@pytest.fixture(scope="session", autouse=True)
def connector_setup():
yield
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"start_date": "2021-05-16",
"base": "USD",
"access_key": "wrong-access-key"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
htrueman marked this conversation as resolved.
Show resolved Hide resolved
"exchange_rates": {
"date": "2021-05-18"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-e ../../bases/source-acceptance-test
-e .

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
author_email="contact@airbyte.io",
packages=find_packages(),
package_data={"": ["*.json", "schemas/*.json"]},
install_requires=["airbyte-cdk==0.1.2", "pendulum>=2,<3"],
install_requires=["airbyte-cdk~=0.1", "pendulum>=2,<3"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import pendulum
import requests
from airbyte_cdk import AirbyteLogger
from airbyte_cdk.sources import AbstractSource
from airbyte_cdk.sources.streams import Stream
from airbyte_cdk.sources.streams.http import HttpStream
Expand Down Expand Up @@ -48,7 +49,7 @@ def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapp
response_json = response.json()
yield response_json

def stream_slices(self, stream_state: Mapping[str, Any] = None, **kwargs) -> Iterable[Optional[Mapping[str, any]]]:
def stream_slices(self, stream_state: Mapping[str, Any] = None, **kwargs) -> Iterable[Optional[Mapping[str, Any]]]:
stream_state = stream_state or {}
start_date = pendulum.parse(stream_state.get(self.date_field_name, self._start_date))
return chunk_date_range(start_date)
Expand All @@ -61,7 +62,7 @@ def get_updated_state(self, current_stream_state: MutableMapping[str, Any], late
return current_stream_state


def chunk_date_range(start_date: DateTime) -> Iterable[Mapping[str, any]]:
def chunk_date_range(start_date: DateTime) -> Iterable[Mapping[str, Any]]:
"""
Returns a list of each day between the start date and now. Ignore weekends since exchanges don't run on weekends.
The return value is a list of dicts {'date': date_string}.
Expand All @@ -78,7 +79,7 @@ def chunk_date_range(start_date: DateTime) -> Iterable[Mapping[str, any]]:


class SourceExchangeRates(AbstractSource):
def check_connection(self, logger, config) -> Tuple[bool, any]:
def check_connection(self, logger: AirbyteLogger, config: Mapping[str, Any]) -> Tuple[bool, Any]:
try:
params = {"access_key": config["access_key"]}
base = config.get("base")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ plugins {
airbytePython {
moduleDirectory 'source_intercom'
}

dependencies {
implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs)
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-intercom/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from setuptools import find_packages, setup

MAIN_REQUIREMENTS = [
"airbyte-cdk",
"airbyte-cdk~=0.1",
]

TEST_REQUIREMENTS = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ plugins {
airbytePython {
moduleDirectory 'source_linkedin_ads'
}

dependencies {
implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs)
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}
4 changes: 2 additions & 2 deletions airbyte-integrations/connectors/source-linkedin-ads/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from setuptools import find_packages, setup

MAIN_REQUIREMENTS = [
"airbyte-cdk",
"pendulum",
"airbyte-cdk~=0.1",
"pendulum~=2.1",
]

TEST_REQUIREMENTS = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ plugins {
airbytePython {
moduleDirectory 'source_mixpanel'
}

dependencies {
implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs)
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-mixpanel/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from setuptools import find_packages, setup

MAIN_REQUIREMENTS = [
"airbyte-cdk",
"airbyte-cdk~=0.1",
]

TEST_REQUIREMENTS = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ plugins {
airbytePython {
moduleDirectory 'source_paypal_transaction'
}

dependencies {
implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs)
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}
3 changes: 0 additions & 3 deletions airbyte-integrations/connectors/source-s3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,3 @@ ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.6
LABEL io.airbyte.name=airbyte/source-s3



5 changes: 0 additions & 5 deletions airbyte-integrations/connectors/source-s3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ plugins {
airbytePython {
moduleDirectory 'source_s3'
}

dependencies {
implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs)
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ plugins {
airbytePython {
moduleDirectory 'source_scaffold_source_http'
}

dependencies {
implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs)
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from setuptools import find_packages, setup

MAIN_REQUIREMENTS = [
"airbyte-cdk",
"airbyte-cdk~=0.1",
]

TEST_REQUIREMENTS = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ plugins {
airbytePython {
moduleDirectory 'source_scaffold_source_python_singer'
}

dependencies {
implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs)
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from setuptools import find_packages, setup

MAIN_REQUIREMENTS = [
"airbyte-cdk",
"airbyte-cdk~=0.1",
]

TEST_REQUIREMENTS = [
Expand Down
5 changes: 0 additions & 5 deletions airbyte-integrations/connectors/source-shortio/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ plugins {
airbytePython {
moduleDirectory 'source_shortio'
}

dependencies {
implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs)
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-shortio/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from setuptools import find_packages, setup

MAIN_REQUIREMENTS = [
"airbyte-cdk",
"airbyte-cdk~=0.1",
]

TEST_REQUIREMENTS = [
Expand Down
6 changes: 0 additions & 6 deletions airbyte-integrations/connectors/source-slack/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,3 @@ plugins {
airbytePython {
moduleDirectory 'source_slack'
}


dependencies {
implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs)
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,3 @@ airbyteStandardSourceTestFile {
// for incremental syncing (e.g. include cursor fields, etc).
configuredCatalogPath = "sample_files/configured_catalog.json"
htrueman marked this conversation as resolved.
Show resolved Hide resolved
}


dependencies {
implementation files(project(':airbyte-integrations:bases:base-standard-source-test-file').airbyteDocker.outputs)
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
author="Nate Nowack",
author_email="contact@airbyte.io",
packages=find_packages(),
install_requires=["airbyte-cdk-test", "pytest==6.1.2", "smartsheet-python-sdk"],
install_requires=["airbyte-cdk~=0.1", "pytest==6.1.2", "smartsheet-python-sdk===2.105.1"],
package_data={"": ["*.json"]},
)
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ plugins {
airbytePython {
moduleDirectory 'source_snapchat_marketing'
}

dependencies {
implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs)
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}
Loading