Skip to content

Commit

Permalink
✨Source Plaid: Migrate Python CDK to No-code CDK (#29127)
Browse files Browse the repository at this point in the history
Co-authored-by: Sajarin <sajarindider@gmail.com>
Co-authored-by: sh4sh <6833405+sh4sh@users.noreply.github.com>
  • Loading branch information
3 people committed Aug 17, 2023
1 parent 861abce commit cc43bd7
Show file tree
Hide file tree
Showing 14 changed files with 526 additions and 277 deletions.
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-plaid/Dockerfile
Expand Up @@ -34,5 +34,5 @@ COPY source_plaid ./source_plaid
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.3.2
LABEL io.airbyte.version=0.4.0
LABEL io.airbyte.name=airbyte/source-plaid
@@ -1,24 +1,31 @@
# See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference)
# for more information about how to configure these tests
connector_image: airbyte/source-plaid:dev
tests:
acceptance_tests:
spec:
- spec_path: "source_plaid/spec.json"
tests:
- spec_path: "source_plaid/spec.yaml"
connection:
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
tests:
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
discovery:
- config_path: "secrets/config.json"
tests:
- config_path: "secrets/config.json"
basic_read:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
empty_streams: []
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
empty_streams: []
incremental:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
future_state_path: "integration_tests/abnormal_state.json"
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog_incremental.json"
future_state:
future_state_path: "integration_tests/abnormal_state.json"
full_refresh:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
1 change: 1 addition & 0 deletions airbyte-integrations/connectors/source-plaid/acceptance-test-docker.sh 100644 → 100755
@@ -1,2 +1,3 @@
#!/usr/bin/env sh

source "$(git rev-parse --show-toplevel)/airbyte-integrations/bases/connector-acceptance-test/acceptance-test-docker.sh"
@@ -0,0 +1,107 @@
{
"streams": [
{
"stream": {
"name": "balance",
"supported_sync_modes": ["full_refresh"],
"json_schema": {
"required": ["account_id", "current"],
"type": "object",
"properties": {
"account_id": {
"type": "string"
},
"available": {
"type": ["number", "null"]
},
"current": {
"type": "number"
},
"iso_currency_code": {
"type": ["string", "null"]
},
"limit": {
"type": ["number", "null"]
},
"unofficial_currency_code": {
"type": ["string", "null"]
}
}
}
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "transaction",
"supported_sync_modes": ["full_refresh", "incremental"],
"source_defined_cursor": true,
"json_schema": {
"type": "object",
"required": [
"account_id",
"amount",
"iso_currency_code",
"name",
"transaction_id",
"category",
"date",
"transaction_type"
],
"properties": {
"account_id": { "type": "string" },
"amount": { "type": "number" },
"category": { "type": "array", "items": { "type": "string" } },
"category_id": { "type": ["string", "null"] },
"date": { "type": "string" },
"iso_currency_code": { "type": "string" },
"name": { "type": "string" },
"payment_channel": { "type": ["string", "null"] },
"pending": { "type": ["boolean", "null"] },
"transaction_id": { "type": "string" },
"transaction_type": { "type": "string" },
"location": {
"type": ["object", "null"],
"properties": {
"address": { "type": ["string", "null"] },
"city": { "type": ["string", "null"] },
"country": { "type": ["string", "null"] },
"lat": { "type": ["string", "null"] },
"lon": { "type": ["string", "null"] },
"postal_code": { "type": ["string", "null"] },
"region": { "type": ["string", "null"] },
"store_number": { "type": ["string", "null"] }
}
},
"payment_meta": {
"type": ["object", "null"],
"properties": {
"by_order_of": { "type": ["string", "null"] },
"payee": { "type": ["string", "null"] },
"payer": { "type": ["string", "null"] },
"payment_method": { "type": ["string", "null"] },
"payment_processor": { "type": ["string", "null"] },
"ppd_id": { "type": ["string", "null"] },
"reason": { "type": ["string", "null"] },
"reference_number": { "type": ["string", "null"] }
}
},
"account_owner": { "type": ["string", "null"] },
"authorized_date": { "type": ["string", "null"] },
"authorized_datetime": { "type": ["string", "null"] },
"check_number": { "type": ["string", "null"] },
"datetime": { "type": ["string", "null"] },
"merchant_name": { "type": ["string", "null"] },
"pending_transaction_id": { "type": ["string", "null"] },
"personal_finance_category": { "type": ["string", "null"] },
"transaction_code": { "type": ["string", "null"] },
"unofficial_currency_code": { "type": ["string", "null"] }
}
}
},
"sync_mode": "incremental",
"destination_sync_mode": "append"
}
]
}
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-plaid/metadata.yaml
Expand Up @@ -2,7 +2,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: ed799e2b-2158-4c66-8da4-b40fe63bc72a
dockerImageTag: 0.3.2
dockerImageTag: 0.4.0
dockerRepository: airbyte/source-plaid
githubIssueLabel: source-plaid
icon: plaid.svg
Expand Down
@@ -1,2 +1,2 @@
# This file is autogenerated -- only edit if you know what you are doing. Use setup.py for declaring dependencies.
-e .
-e ../../bases/connector-acceptance-test
11 changes: 7 additions & 4 deletions airbyte-integrations/connectors/source-plaid/setup.py
Expand Up @@ -5,12 +5,15 @@

from setuptools import find_packages, setup

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

TEST_REQUIREMENTS = [
"requests-mock~=1.9.3",
"pytest~=6.2",
"pytest-mock~=3.6.1",
"pytest~=6.1",
"requests-mock~=1.9.3",
"connector-acceptance-test",
]

setup(
Expand All @@ -20,7 +23,7 @@
author_email="contact@airbyte.io",
packages=find_packages(),
install_requires=MAIN_REQUIREMENTS,
package_data={"": ["*.json"]},
package_data={"": ["*.json", "*.yaml", "schemas/*.json", "schemas/shared/*.json"]},
extras_require={
"tests": TEST_REQUIREMENTS,
},
Expand Down
@@ -1,5 +1,5 @@
#
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#


Expand Down

0 comments on commit cc43bd7

Please sign in to comment.