Skip to content

Commit

Permalink
Publish PR 6966: new source retently (#7552)
Browse files Browse the repository at this point in the history
* retently

* PR comments

* PR comments

* mask api keys

* README

* keep gradle happy

* add github creds

* run format

Co-authored-by: Subhash <subhash@kloud.io>
  • Loading branch information
marcosmarxm and subhash-kloudio committed Nov 2, 2021
1 parent 63d6301 commit c846188
Show file tree
Hide file tree
Showing 14 changed files with 70 additions and 130 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ jobs:
SOURCE_STRAVA_TEST_CREDS: ${{ secrets.SOURCE_STRAVA_TEST_CREDS }}
SOURCE_PAYSTACK_TEST_CREDS: ${{ secrets.SOURCE_PAYSTACK_TEST_CREDS }}
SOURCE_DELIGHTED_TEST_CREDS: ${{ secrets.SOURCE_DELIGHTED_TEST_CREDS }}
SOURCE_RETENTLY_TEST_CREDS: ${{ secrets.SOURCE_RETENTLY_TEST_CREDS }}
- run: |
echo "$SPEC_CACHE_SERVICE_ACCOUNT_KEY" > spec_cache_key_file.json && docker login -u airbytebot -p ${DOCKER_PASSWORD}
./tools/integrations/manage.sh publish airbyte-integrations/${{ github.event.inputs.connector }} ${{ github.event.inputs.run-tests }} --publish_spec_to_cache
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ jobs:
SOURCE_STRAVA_TEST_CREDS: ${{ secrets.SOURCE_STRAVA_TEST_CREDS }}
SOURCE_PAYSTACK_TEST_CREDS: ${{ secrets.SOURCE_PAYSTACK_TEST_CREDS }}
SOURCE_DELIGHTED_TEST_CREDS: ${{ secrets.SOURCE_DELIGHTED_TEST_CREDS }}
SOURCE_RETENTLY_TEST_CREDS: ${{ secrets.SOURCE_RETENTLY_TEST_CREDS }}
- run: |
./tools/bin/ci_integration_test.sh ${{ github.event.inputs.connector }}
name: test ${{ github.event.inputs.connector }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"sourceDefinitionId": "db04ecd1-42e7-4115-9cec-95812905c626",
"name": "Retently",
"dockerRepository": "airbyte/source-retently",
"dockerImageTag": "0.1.0",
"documentationUrl": "https://docs.airbyte.io/integrations/sources/retently"
}
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,12 @@
documentationUrl: https://docs.airbyte.io/integrations/sources/redshift
icon: redshift.svg
sourceType: database
- name: Retently
sourceDefinitionId: db04ecd1-42e7-4115-9cec-95812905c626
dockerRepository: airbyte/source-retently
dockerImageTag: 0.1.0
documentationUrl: https://docs.airbyte.io/integrations/sources/retently
sourceType: api
- name: S3
sourceDefinitionId: 69589781-7828-43c5-9f63-8925b1c1ccc2
dockerRepository: airbyte/source-s3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tests:
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "exception"
status: "failed"
discovery:
- config_path: "secrets/config.json"
basic_read:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
#
# 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.
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#


Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"api_key": "invalid-key"
}
}
22 changes: 1 addition & 21 deletions airbyte-integrations/connectors/source-retently/main.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
#
# 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.
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#


Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"api_key": "invalid-key"
}
"api_key": "invalid-key"
}
22 changes: 1 addition & 21 deletions airbyte-integrations/connectors/source-retently/setup.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
#
# 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.
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#


Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"type": "object",
"properties": {
"id": { "type": "string" },
"email": { "type": "string" },
"firstName": { "type": "string" },
"lastName": { "type": "string" },
"companyName": { "type": "string" },
"companyId": { "type": "string" },
"tags": {
"type": "array",
"items": { "type": "string" }
},
"createdDate": { "type": "string" },
"properties": {
"id": { "type": "string" },
"email": { "type": "string" },
"firstName": { "type": "string" },
"lastName": { "type": "string" },
"companyName": { "type": "string" },
"companyId": { "type": "string" },
"tags": {
"type": "array",
"items": {
"items": { "type": "string" }
},
"createdDate": { "type": "string" },
"properties": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": { "type": "string" },
"name": { "type": "string" },
"type": { "type": "string" },
"label": { "type": "string" },
"name": { "type": "string" },
"type": { "type": "string" },
"value": { "type": "string" }
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
{
"type": "object",
"properties": {
"campaignId": { "type": "string" },
"trend": {
"campaignId": { "type": "string" },
"trend": {
"type": "array",
"items": {
"items": {
"type": "object",
"properties": {
"day": { "type": "string" },
"promoters": { "type": "number" },
"passives": { "type": "number" },
"detractors": { "type": "number" },
"total": { "type": "number" },
"day": { "type": "string" },
"promoters": { "type": "number" },
"passives": { "type": "number" },
"detractors": { "type": "number" },
"total": { "type": "number" },
"score": { "type": "number" }
}
}
}
},
"last": {
},
"last": {
"type": "object",
"properties": {
"promoters": { "type": "number" },
"passives": { "type": "number" },
"detractors": { "type": "number" },
"total": { "type": "number" },
"promoters": { "type": "number" },
"passives": { "type": "number" },
"detractors": { "type": "number" },
"total": { "type": "number" },
"score": { "type": "number" }
}
},
"deliveryStats": {
}
},
"deliveryStats": {
"type": "object",
"properties": {
"totalCount": { "type": "number" },
"opened": { "type": "number" },
"responded": { "type": "number" },
"optedOut": { "type": "number" },
"totalCount": { "type": "number" },
"opened": { "type": "number" },
"responded": { "type": "number" },
"optedOut": { "type": "number" },
"isBounced": { "type": "number" }
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,30 +1,12 @@
#
# 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.
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#

from source_retently.source import SourceRetently
from unittest.mock import MagicMock

import responses
from source_retently.source import SourceRetently


def setup_responses():
responses.add(
Expand All @@ -33,13 +15,15 @@ def setup_responses():
json={"data": {"companies": [{}]}},
)


@responses.activate
def test_check_connection(mocker):
setup_responses()
source = SourceRetently()
logger_mock, config_mock = MagicMock(), MagicMock()
assert source.check_connection(logger_mock, config_mock) == (True, None)


def test_streams(mocker):
source = SourceRetently()
config_mock = MagicMock()
Expand Down
1 change: 1 addition & 0 deletions tools/bin/ci_credentials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ write_standard_creds source-quickbooks-singer "$QUICKBOOKS_TEST_CREDS"
write_standard_creds source-recharge "$RECHARGE_INTEGRATION_TEST_CREDS"
write_standard_creds source-recurly "$SOURCE_RECURLY_INTEGRATION_TEST_CREDS"
write_standard_creds source-redshift "$AWS_REDSHIFT_INTEGRATION_TEST_CREDS"
write_standard_creds source-retently "$SOURCE_RETENTLY_TEST_CREDS"
write_standard_creds source-s3 "$SOURCE_S3_TEST_CREDS"
write_standard_creds source-s3 "$SOURCE_S3_PARQUET_CREDS" "parquet_config.json"
write_standard_creds source-salesforce "$SALESFORCE_BULK_INTEGRATION_TESTS_CREDS" "config_bulk.json"
Expand Down

0 comments on commit c846188

Please sign in to comment.