Skip to content

Commit

Permalink
✨Source Trustpilot: Migrate Python CDK to Low-code CDK (#36955)
Browse files Browse the repository at this point in the history
Co-authored-by: Natik Gadzhi <natik@respawn.io>
  • Loading branch information
btkcodedev and natikgadzhi authored Jul 27, 2024
1 parent 9e8e667 commit 27c7310
Show file tree
Hide file tree
Showing 23 changed files with 836 additions and 850 deletions.

This file was deleted.

5 changes: 3 additions & 2 deletions airbyte-integrations/connectors/source-trustpilot/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Trustpilot source connector


This is the repository for the Trustpilot source connector, written in Python.
This is the repository for the Trustpilot configuration based source connector.
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/trustpilot).

## Local development
Expand All @@ -20,12 +20,13 @@ poetry install --with dev

### Create credentials
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/trustpilot)
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_trustpilot/spec.yaml` file.
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_trustpilot/spec.yaml` file or spec in the `manifest.yaml`.
Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
See `sample_files/sample_config.json` for a sample config file.


### Locally running the connector

```
poetry run source-trustpilot spec
poetry run source-trustpilot check --config secrets/config.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# 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-trustpilot:dev
test_strictness_level: low
acceptance_tests:
spec:
tests:
- spec_path: "source_trustpilot/spec.yaml"
backward_compatibility_tests_config:
disable_for_version: 0.1.0
connection:
tests:
- config_path: "secrets/config.json"
Expand All @@ -14,6 +17,8 @@ acceptance_tests:
discovery:
tests:
- config_path: "secrets/config.json"
backward_compatibility_tests_config:
disable_for_version: 0.1.0
basic_read:
tests:
- config_path: "secrets/config.json"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
{
"private_reviews": {
"5f5e954ec15b2700017c834f_createdAt": "2099-12-31T23:59:59Z"
[
{
"streamDescriptor": {
"name": "private_reviews"
},
"streamState": {
"states": [
{
"cursor": {
"createdAt": "2099-12-18T15:48:56Z"
},
"partition": {
"parent_slice": {
"business_unit": "example.com"
},
"business_unit_id": "657e1a3ca4677d24861a2fd9"
}
}
]
}
}
}
]
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"credentials": {
"auth_type": "oauth2.0",
"client_id": "aoVLPAXHFwryzNepiAY3yR7urlx9hhGr",
"client_secret": "EDLVnp9t11Oa375D",
"access_token": "MB4o9G3MpM5yrdIKo0OcYsOjeaBT",
"client_id": "invalid",
"client_secret": "invalid",
"access_token": "invalid",
"token_expiry_date": "2023-03-15T00:11:00Z",
"refresh_token": "ttfqulk6gPg2TOPL4wS23m6ZBR7wEsqG"
},
"business_units": [],
"start_date": "2023-03-01T00:00:00Z"
"start_date": "2023-10-01T00:00:00Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"token_expiry_date": "2023-03-15T00:11:00Z",
"refresh_token": "ttfqulk6gPg2TOPL4wS23m6ZBR7wEsqG"
},
"business_units": ["my_domain.com"],
"start_date": "2023-03-01T00:00:00Z"
"business_units": [],
"start_date": "2023-10-01T00:00:00Z"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
{
"private_reviews": {
"5f5e954ec15b2700017c834f_createdAt": "2023-03-01T00:00:00Z"
[
{
"streamDescriptor": {
"name": "private_reviews"
},
"streamState": {
"states": [
{
"cursor": {
"createdAt": "2023-12-18T15:48:56Z"
},
"partition": {
"parent_slice": {
"business_unit": "example.com"
},
"business_unit_id": "657e1a3ca4677d24861a2fd9"
}
}
]
}
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: d7e23ea6-d741-4314-9209-a33c91a2e945
dockerImageTag: 0.1.1
dockerImageTag: 0.2.0
dockerRepository: airbyte/source-trustpilot
githubIssueLabel: source-trustpilot
icon: trustpilot.svg
Expand All @@ -21,7 +21,7 @@ data:
documentationUrl: https://docs.airbyte.com/integrations/sources/trustpilot
tags:
- language:python
- cdk:python
- cdk:low-code
ab_internal:
sl: 100
ql: 100
Expand Down
Loading

0 comments on commit 27c7310

Please sign in to comment.