Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare Google Sheets, Google Drive, Apify dataset and connector templates for airbyte-lib #33414

Merged
merged 11 commits into from Dec 19, 2023

Conversation

flash1293
Copy link
Contributor

@flash1293 flash1293 commented Dec 13, 2023

This PR prepares some exemplary python connectors for airbyte-lib consumption.

The main changes are:

  • Move the entrypoint logic into a run.py file within the package that will be published
  • Call this logic from the top level main.py file
  • Make the connector available as a console script under the name of the source by using the newly introduced entrypoint logic

To make new connectors compatible with airbyte-lib from the start, the connector templates are updated as well.

Copy link

vercel bot commented Dec 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Dec 18, 2023 5:18pm

@octavia-squidington-iii octavia-squidington-iii added the area/connectors Connector related issues label Dec 13, 2023
Copy link
Contributor

github-actions bot commented Dec 13, 2023

Before Merging a Connector Pull Request

Wow! What a great pull request you have here! 🎉

To merge this PR, ensure the following has been done/considered for each connector added or updated:

  • PR name follows PR naming conventions
  • Breaking changes are considered. If a Breaking Change is being introduced, ensure an Airbyte engineer has created a Breaking Change Plan.
  • Connector version has been incremented in the Dockerfile and metadata.yaml according to our Semantic Versioning for Connectors guidelines
  • You've updated the connector's metadata.yaml file any other relevant changes, including a breakingChanges entry for major version bumps. See metadata.yaml docs
  • Secrets in the connector's spec are annotated with airbyte_secret
  • All documentation files are up to date. (README.md, bootstrap.md, docs.md, etc...)
  • Changelog updated in docs/integrations/<source or destination>/<name>.md with an entry for the new version. See changelog example
  • Migration guide updated in docs/integrations/<source or destination>/<name>-migrations.md with an entry for the new version, if the version is a breaking change. See migration guide example
  • If set, you've ensured the icon is present in the platform-internal repo. (Docs)

If the checklist is complete, but the CI check is failing,

  1. Check for hidden checklists in your PR description

  2. Toggle the github label checklist-action-run on/off to re-run the checklist CI.

@flash1293 flash1293 marked this pull request as ready for review December 13, 2023 13:28
@flash1293 flash1293 requested a review from a team as a code owner December 13, 2023 13:28
@octavia-squidington-iv octavia-squidington-iv requested a review from a team December 13, 2023 13:29
@flash1293 flash1293 changed the title Prepare Google Sheets, Facebook Marketing, Shopify and connector templates for airbyte-lib Prepare Google Sheets, Facebook Marketing, Apify dataset and connector templates for airbyte-lib Dec 15, 2023
@flash1293 flash1293 changed the title Prepare Google Sheets, Facebook Marketing, Apify dataset and connector templates for airbyte-lib Prepare Google Sheets, Google Drive, Apify dataset and connector templates for airbyte-lib Dec 15, 2023
from airbyte_cdk.entrypoint import launch
from .source import Source{{properCase name}}

if __name__ == "__main__":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is the template file different from the connector's implementation?

I'd expect this file to only contain the run method and for the if __name__ == "__main__" to be in the main.py file

@flash1293
Copy link
Contributor Author

Good catch @girarda ! This is exactly how it should look like, fixed!

Copy link
Contributor

@girarda girarda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: !

Copy link
Collaborator

@aaronsteers aaronsteers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the long run, I'd like to further reduce the amount of code needed, but this is already very well tuned. Also in the long run, it would be good to make airbyte-ci depend on the CLI entrypoint or the new run:run pattern, instead of ../main.py which is outside the module folder.

@flash1293 flash1293 merged commit 7fe7258 into master Dec 19, 2023
29 of 30 checks passed
@flash1293 flash1293 deleted the flash1293/prepare-connectors-for-airbyte-lib branch December 19, 2023 10:54
timroes pushed a commit that referenced this pull request Dec 19, 2023
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants