Skip to content

Commit

Permalink
馃悰 Source Quickbooks: use number data type for decimal fields
Browse files Browse the repository at this point in the history
* Source Quickbooks #4292 - migrate to Airbyte CDK

* Source Quickbooks #4292 - use singer tap fork

* Source Quickbooks #4292 - remove requirements.txt

* Source Quickbooks #4292 - enable SAT except incremental test

* Source Quickbooks #4292 - remove unnecessary files

* Source Quickbooks #4292 - update cursor_field

* Source Quickbooks #4292 - commented out incremental test

* Source Quickbooks #4292 - enable incremental test

* Source Quickbooks #4292 - fix build.gradle and acceptance-test-docker.sh

* Source Quickbooks #4292 - update fork repo

* Source Quickbooks #4292 - bump version
  • Loading branch information
vitaliizazmic committed Aug 10, 2021
1 parent 634aa3d commit 6bcf811
Show file tree
Hide file tree
Showing 19 changed files with 589 additions and 4,643 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"sourceDefinitionId": "29b409d9-30a5-4cc8-ad50-886eb846fea3",
"name": "Quickbooks",
"dockerRepository": "airbyte/source-quickbooks-singer",
"dockerImageTag": "0.1.2",
"dockerImageTag": "0.1.3",
"documentationUrl": "https://docs.airbyte.io/integrations/sources/quickbooks"
}
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
- sourceDefinitionId: 29b409d9-30a5-4cc8-ad50-886eb846fea3
name: Quickbooks
dockerRepository: airbyte/source-quickbooks-singer
dockerImageTag: 0.1.2
dockerImageTag: 0.1.3
documentationUrl: https://docs.airbyte.io/integrations/sources/quickbooks
- sourceDefinitionId: 2e875208-0c0b-4ee4-9e92-1cb3156ea799
name: Iterable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*
!Dockerfile
!Dockerfile.test
!main.py
!source_quickbooks_singer
!setup.py
!secrets
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
FROM airbyte/integration-base-singer:0.1.1
FROM python:3.7-slim

# Bash is installed for more convenient debugging.
RUN apt-get update && apt-get install -y bash -y gcc && rm -rf /var/lib/apt/lists/*

ENV CODE_PATH="source_quickbooks_singer"
ENV AIRBYTE_IMPL_MODULE="source_quickbooks_singer"
ENV AIRBYTE_IMPL_PATH="SourceQuickbooksSinger"
ENV AIRBYTE_ENTRYPOINT "/airbyte/base.sh"
RUN apt-get update && apt-get install -y bash && apt-get install -y gcc && rm -rf /var/lib/apt/lists/*

WORKDIR /airbyte/integration_code
COPY $CODE_PATH ./$CODE_PATH
COPY source_quickbooks_singer ./source_quickbooks_singer
COPY main.py ./
COPY setup.py ./
RUN pip install .

LABEL io.airbyte.version=0.1.2
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.3
LABEL io.airbyte.name=airbyte/source-quickbooks-singer
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# See [Source Acceptance Tests](https://docs.airbyte.io/contributing-to-airbyte/building-new-connector/source-acceptance-tests.md)
# for more information about how to configure these tests
connector_image: airbyte/source-quickbooks-singer:dev
tests:
spec:
- spec_path: "source_quickbooks_singer/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"
empty_streams: ["budgets", "classes", "departments", "payment_methods", "transfers", "vendor_credits"]
incremental:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
future_state_path: "integration_tests/abnormal_state.json"
cursor_paths:
accounts: [ "bookmarks", "accounts", "LastUpdatedTime"]
bill_payments: [ "bookmarks", "bill_payments", "LastUpdatedTime"]
bills: [ "bookmarks", "bills", "LastUpdatedTime"]
budgets: [ "bookmarks", "budgets", "LastUpdatedTime"]
classes: [ "bookmarks", "classes", "LastUpdatedTime"]
credit_memos: [ "bookmarks", "credit_memos", "LastUpdatedTime"]
customers: [ "bookmarks", "customers", "LastUpdatedTime"]
departments: [ "bookmarks", "departments", "LastUpdatedTime"]
deposits: [ "bookmarks", "deposits", "LastUpdatedTime"]
employees: [ "bookmarks", "employees", "LastUpdatedTime"]
estimates: [ "bookmarks", "estimates", "LastUpdatedTime"]
invoices: [ "bookmarks", "invoices", "LastUpdatedTime"]
items: [ "bookmarks", "items", "LastUpdatedTime"]
journal_entries: [ "bookmarks", "journal_entries", "LastUpdatedTime"]
payment_methods: [ "bookmarks", "payment_methods", "LastUpdatedTime"]
payments: [ "bookmarks", "payments", "LastUpdatedTime"]
purchase_orders: [ "bookmarks", "purchase_orders", "LastUpdatedTime"]
purchases: [ "bookmarks", "purchases", "LastUpdatedTime"]
refund_receipts: [ "bookmarks", "refund_receipts", "LastUpdatedTime"]
sales_receipts: [ "bookmarks", "sales_receipts", "LastUpdatedTime"]
tax_agencies: [ "bookmarks", "tax_agencies", "LastUpdatedTime"]
tax_codes: [ "bookmarks", "tax_codes", "LastUpdatedTime"]
tax_rates: [ "bookmarks", "tax_rates", "LastUpdatedTime"]
terms: [ "bookmarks", "terms", "LastUpdatedTime"]
time_activities: [ "bookmarks", "time_activities", "LastUpdatedTime"]
transfers: [ "bookmarks", "transfers", "LastUpdatedTime"]
vendor_credits: [ "bookmarks", "vendor_credits", "LastUpdatedTime"]
vendors: [ "bookmarks", "vendors", "LastUpdatedTime"]
full_refresh:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env sh

# Build latest connector image
docker build . -t $(cat acceptance-test-config.yml | grep "connector_image" | head -n 1 | cut -d: -f2)

# Pull latest acctest image
docker pull airbyte/source-acceptance-test:latest

# Run
docker run --rm -it \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /tmp:/tmp \
-v $(pwd):/test_input \
airbyte/source-acceptance-test \
--acceptance-test-config /test_input
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
plugins {
id 'airbyte-python'
id 'airbyte-docker'
id 'airbyte-standard-source-test-file'
id 'airbyte-source-acceptance-test'
}

airbytePython {
moduleDirectory 'source_quickbooks_singer'
}

airbyteStandardSourceTestFile {
specPath = "source_quickbooks_singer/spec.json"
configPath = "secrets/config.json"
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-singer').airbyteDocker.outputs)
implementation files(project(':airbyte-integrations:bases:source-acceptance-test').airbyteDocker.outputs)
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"bookmarks": {
"accounts": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"bill_payments": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"bills": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"budgets": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"classes": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"credit_memos": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"customers": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"departments": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"deposits": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"employees": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"estimates": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"invoices": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"items": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"journal_entries": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"payment_methods": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"payments": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"purchase_orders": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"purchases": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"refund_receipts": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"sales_receipts": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"tax_agencies": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"tax_codes": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"tax_rates": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"terms": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"time_activities": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"transfers": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"vendor_credits": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
},
"vendors": {
"LastUpdatedTime": "2121-04-16T22:59:57-07:00"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# 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 pytest

pytest_plugins = ("source_acceptance_test.plugin",)


@pytest.fixture(scope="session", autouse=True)
def connector_setup():
""" This fixture is a placeholder for external resources that acceptance test might require."""
yield
Loading

0 comments on commit 6bcf811

Please sign in to comment.