From e2146ea63ddd4d0752c1a9b3c17251483b5c28fa Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Fri, 12 Jan 2024 11:52:29 +0100 Subject: [PATCH] Source Freshdesk: Convert to airbyte-lib (#34101) --- .../connectors/source-freshdesk/main.py | 9 ++------- .../connectors/source-freshdesk/metadata.yaml | 2 +- .../connectors/source-freshdesk/setup.py | 5 +++++ .../source-freshdesk/source_freshdesk/run.py | 14 ++++++++++++++ docs/integrations/sources/freshdesk.md | 1 + 5 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 airbyte-integrations/connectors/source-freshdesk/source_freshdesk/run.py diff --git a/airbyte-integrations/connectors/source-freshdesk/main.py b/airbyte-integrations/connectors/source-freshdesk/main.py index 319505ff4bb5..d32eaa6ca9e5 100644 --- a/airbyte-integrations/connectors/source-freshdesk/main.py +++ b/airbyte-integrations/connectors/source-freshdesk/main.py @@ -2,12 +2,7 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # - -import sys - -from airbyte_cdk.entrypoint import launch -from source_freshdesk import SourceFreshdesk +from source_freshdesk.run import run if __name__ == "__main__": - source = SourceFreshdesk() - launch(source, sys.argv[1:]) + run() diff --git a/airbyte-integrations/connectors/source-freshdesk/metadata.yaml b/airbyte-integrations/connectors/source-freshdesk/metadata.yaml index 4a9cd521ff4a..e532adfce2a5 100644 --- a/airbyte-integrations/connectors/source-freshdesk/metadata.yaml +++ b/airbyte-integrations/connectors/source-freshdesk/metadata.yaml @@ -10,7 +10,7 @@ data: connectorSubtype: api connectorType: source definitionId: ec4b9503-13cb-48ab-a4ab-6ade4be46567 - dockerImageTag: 3.0.5 + dockerImageTag: 3.0.6 dockerRepository: airbyte/source-freshdesk documentationUrl: https://docs.airbyte.com/integrations/sources/freshdesk githubIssueLabel: source-freshdesk diff --git a/airbyte-integrations/connectors/source-freshdesk/setup.py b/airbyte-integrations/connectors/source-freshdesk/setup.py index c0d8b408f781..b9cabbadddfc 100644 --- a/airbyte-integrations/connectors/source-freshdesk/setup.py +++ b/airbyte-integrations/connectors/source-freshdesk/setup.py @@ -15,6 +15,11 @@ ] setup( + entry_points={ + "console_scripts": [ + "source-freshdesk=source_freshdesk.run:run", + ], + }, name="source_freshdesk", description="Source implementation for Freshdesk.", author="Airbyte", diff --git a/airbyte-integrations/connectors/source-freshdesk/source_freshdesk/run.py b/airbyte-integrations/connectors/source-freshdesk/source_freshdesk/run.py new file mode 100644 index 000000000000..5486a3c15061 --- /dev/null +++ b/airbyte-integrations/connectors/source-freshdesk/source_freshdesk/run.py @@ -0,0 +1,14 @@ +# +# Copyright (c) 2023 Airbyte, Inc., all rights reserved. +# + + +import sys + +from airbyte_cdk.entrypoint import launch +from source_freshdesk import SourceFreshdesk + + +def run(): + source = SourceFreshdesk() + launch(source, sys.argv[1:]) diff --git a/docs/integrations/sources/freshdesk.md b/docs/integrations/sources/freshdesk.md index b148533bb801..95b855e3b96d 100644 --- a/docs/integrations/sources/freshdesk.md +++ b/docs/integrations/sources/freshdesk.md @@ -68,6 +68,7 @@ If you don't use the start date Freshdesk will retrieve only the last 30 days. M | Version | Date | Pull Request | Subject | | :------ | :--------- | :------------------------------------------------------- | :------------------------------------------------------------------------------------ | +| 3.0.6 | 2024-01-10 | [34101](https://github.com/airbytehq/airbyte/pull/34101) | Base image migration: remove Dockerfile and use the python-connector-base image | | 3.0.5 | 2023-11-30 | [33000](https://github.com/airbytehq/airbyte/pull/33000) | Base image migration: remove Dockerfile and use the python-connector-base image | | 3.0.4 | 2023-06-24 | [27680](https://github.com/airbytehq/airbyte/pull/27680) | Fix formatting | | 3.0.3 | 2023-06-02 | [26978](https://github.com/airbytehq/airbyte/pull/26978) | Skip the stream if subscription level had changed during sync |