Skip to content

Commit

Permalink
Source Prestashop: Migrate connector from Alpha (Python) to Beta (YAM…
Browse files Browse the repository at this point in the history
…L) (#18927)

Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
  • Loading branch information
grubberr committed Nov 15, 2022
1 parent 33575df commit a3e83c3
Show file tree
Hide file tree
Showing 18 changed files with 1,050 additions and 425 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1182,14 +1182,14 @@
documentationUrl: https://docs.airbyte.com/integrations/sources/postmarkapp
sourceType: api
releaseStage: alpha
- name: Prestashop
- name: PrestaShop
sourceDefinitionId: d60a46d4-709f-4092-a6b7-2457f7d455f5
dockerRepository: airbyte/source-prestashop
dockerImageTag: 0.2.0
dockerImageTag: 0.3.0
documentationUrl: https://docs.airbyte.com/integrations/sources/presta-shop
icon: prestashop.svg
sourceType: api
releaseStage: alpha
releaseStage: beta
- name: Primetric
sourceDefinitionId: f636c3c6-4077-45ac-b109-19fc62a283c1
dockerRepository: airbyte/source-primetric
Expand Down
25 changes: 19 additions & 6 deletions airbyte-config/init/src/main/resources/seed/source_specs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11273,25 +11273,38 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-prestashop:0.2.0"
- dockerImage: "airbyte/source-prestashop:0.3.0"
spec:
documentationUrl: "https://docsurl.com"
documentationUrl: "https://docs.airbyte.com/integrations/sources/presta-shop"
connectionSpecification:
$schema: "http://json-schema.org/draft-07/schema#"
title: "PrestaShop Spec"
type: "object"
required:
- "url"
- "access_key"
- "url"
- "start_date"
properties:
url:
type: "string"
description: "Shop URL without trailing slash (domain name or IP address)"
access_key:
type: "string"
title: "Access Key"
description: "Your PrestaShop access key. See <a href=\"https://devdocs.prestashop.com/1.7/webservice/tutorials/creating-access/#create-an-access-key\"\
> the docs </a> for info on how to obtain this."
order: 0
airbyte_secret: true
url:
type: "string"
title: "Shop URL"
description: "Shop URL without trailing slash."
order: 1
start_date:
type: "string"
title: "Start date"
description: "The Start date in the format YYYY-MM-DD."
pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
examples:
- "2022-01-01"
order: 2
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ RUN pip install .
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.2.0
LABEL io.airbyte.version=0.3.0
LABEL io.airbyte.name=airbyte/source-prestashop
Original file line number Diff line number Diff line change
@@ -1,25 +1,39 @@
# See [Source Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/source-acceptance-tests-reference)
# for more information about how to configure these tests
connector_image: airbyte/source-prestashop:dev
tests:
acceptance_tests:
spec:
- spec_path: "source_prestashop/spec.json"
# unfortunately timeout plugin takes into account setup code as well (docker setup)
timeout_seconds: 300
tests:
- spec_path: "source_prestashop/spec.yaml"
# unfortunately timeout plugin takes into account setup code as well (docker setup)
timeout_seconds: 300
backward_compatibility_tests_config:
disable_for_version: "0.2.0"
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"
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
expect_records:
path: "integration_tests/expected_records.txt"
extra_fields: no
exact_order: no
extra_records: yes
incremental:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
future_state_path: "integration_tests/future_state.json"
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.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"
Original file line number Diff line number Diff line change
@@ -0,0 +1,255 @@
[
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "addresses"
},
"stream_state": {
"date_upd": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "cart_rules"
},
"stream_state": {
"date_upd": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "carts"
},
"stream_state": {
"date_upd": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "categories"
},
"stream_state": {
"date_upd": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "configurations"
},
"stream_state": {
"date_upd": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "customer_messages"
},
"stream_state": {
"date_upd": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "customers"
},
"stream_state": {
"date_upd": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "customer_threads"
},
"stream_state": {
"date_upd": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "groups"
},
"stream_state": {
"date_upd": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "manufacturers"
},
"stream_state": {
"date_upd": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "messages"
},
"stream_state": {
"date_add": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "order_carriers"
},
"stream_state": {
"date_add": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "order_histories"
},
"stream_state": {
"date_add": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "order_invoices"
},
"stream_state": {
"date_add": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "order_payments"
},
"stream_state": {
"date_add": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "orders"
},
"stream_state": {
"date_upd": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "order_slip"
},
"stream_state": {
"date_upd": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "products"
},
"stream_state": {
"date_upd": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "stock_movement_reasons"
},
"stream_state": {
"date_upd": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "stock_movements"
},
"stream_state": {
"date_add": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "stores"
},
"stream_state": {
"date_upd": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "suppliers"
},
"stream_state": {
"date_upd": "2121-06-16 14:13:26"
}
}
},
{
"type": "STREAM",
"stream": {
"stream_descriptor": {
"name": "tax_rule_groups"
},
"stream_state": {
"date_upd": "2121-06-16 14:13:26"
}
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ def create_config_fixture():
secrets_path.mkdir(exist_ok=True)
config_filename = str(secrets_path / "config.json")

config = {"url": "http://localhost:8080", "access_key": "59662QEPFNCJ3KFL3VCT5VNQ4NHVUF4Y", "_allow_http": True}
config = {
"url": "http://localhost:8080",
"_allow_http": True,
"access_key": "59662QEPFNCJ3KFL3VCT5VNQ4NHVUF4Y",
"start_date": "2021-05-25",
}

with open(config_filename, "w+") as fp:
json.dump(obj=config, fp=fp)
Expand Down
Loading

0 comments on commit a3e83c3

Please sign in to comment.