Skip to content

Commit

Permalink
source-airtable: upgrade to estuary-cdk
Browse files Browse the repository at this point in the history
  • Loading branch information
jgraettinger committed Mar 5, 2024
1 parent cdcdf50 commit d279f17
Show file tree
Hide file tree
Showing 41 changed files with 1,008 additions and 832 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ jobs:
- connector: source-shopify
connector_type: capture
python: true
- connector: source-airtable
connector_type: capture
python: true
- connector: source-facebook-marketing
connector_type: capture
python: true
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [main]
paths:
- "estuary-cdk/**"
- "source-airtable/**"
- "source-asana/**"
- "source-gladly/**"
- "source-google-ads/**"
Expand All @@ -14,6 +15,7 @@ on:
branches: [main]
paths:
- "estuary-cdk/**"
- "source-airtable/**"
- "source-asana/**"
- "source-gladly/**"
- "source-google-ads/**"
Expand All @@ -31,6 +33,9 @@ jobs:
fail-fast: false
matrix:
connector:
- name: source-airtable
type: capture
version: v1
- name: source-asana
type: capture
version: v1
Expand Down
20 changes: 0 additions & 20 deletions source-airtable/__main__.py

This file was deleted.

1,199 changes: 929 additions & 270 deletions source-airtable/poetry.lock

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions source-airtable/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
[tool.poetry]
name = "source-airtable-estuary"
name = "source_airtable"
version = "0.1.0"
description = ""
authors = ["Joseph Shearer <joseph@estuary.dev>"]

[tool.poetry.dependencies]
airbyte-cdk = "0.51.14"
mypy = "^1.5"
python = ">=3.11,<3.12"
debugpy = "^1.8.0"
source_airtable = { path = "source_airtable", develop=true }
flow-sdk = {path="../python", develop=true}
airbyte-cdk = "^0.52"
estuary-cdk = {path="../estuary-cdk", develop = true}
python = "^3.11"
types-requests = "^2.31"

[tool.poetry.group.dev.dependencies]
debugpy = "^1.8.0"
mypy = "^1.8.0"
pytest = "^7.4.3"
pytest-insta = "^0.2.0"
pytest-insta = "^0.3.0"
requests-mock = "^1.11.0"

[build-system]
requires = ["poetry-core"]
Expand Down
38 changes: 0 additions & 38 deletions source-airtable/source_airtable/Dockerfile

This file was deleted.

134 changes: 0 additions & 134 deletions source-airtable/source_airtable/README.md

This file was deleted.

File renamed without changes.
27 changes: 27 additions & 0 deletions source-airtable/source_airtable/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import estuary_cdk.pydantic_polyfill # Must be first.

import asyncio
from estuary_cdk import shim_airbyte_cdk, flow
from source_airtable import SourceAirtable

asyncio.run(
shim_airbyte_cdk.CaptureShim(
delegate=SourceAirtable(),
oauth2=flow.OAuth2Spec(
provider="airtable",
accessTokenBody=r"grant_type=authorization_code&client_id={{#urlencode}}{{{ client_id }}}{{/urlencode}}&client_secret={{#urlencode}}{{{ client_secret }}}{{/urlencode}}&redirect_uri={{#urlencode}}{{{ redirect_uri }}}{{/urlencode}}&code={{#urlencode}}{{{ code }}}{{/urlencode}}&code_verifier={{#urlencode}}{{{ code_verifier }}}{{/urlencode}}",
authUrlTemplate="https://airtable.com/oauth2/v1/authorize?client_id={{#urlencode}}{{{ client_id }}}{{/urlencode}}&redirect_uri={{#urlencode}}{{{ redirect_uri }}}{{/urlencode}}&response_type=code&state={{#urlencode}}{{{ state }}}{{/urlencode}}&scope=data.records:read%20data.recordComments:read%20schema.bases:read&code_challenge={{#urlencode}}{{{ code_challenge }}}{{/urlencode}}&code_challenge_method={{{ code_challenge_method }}}",
accessTokenHeaders={
"content-type": "application/x-www-form-urlencoded",
"authorization": "Basic {{#basicauth}}{{{ client_id }}}:{{{client_secret }}}{{/basicauth}}",
},
accessTokenResponseMap={
"access_token": "/access_token",
"refresh_token": "/refresh_token",
"token_expiry_date": r"{{#now_plus}}{{ expires_in }}{{/now_plus}}",
},
accessTokenUrlTemplate="https://airtable.com/oauth2/v1/token",
),
schema_inference=True,
).serve()
)
66 changes: 0 additions & 66 deletions source-airtable/source_airtable/acceptance-test-config.yml

This file was deleted.

2 changes: 0 additions & 2 deletions source-airtable/source_airtable/acceptance-test-docker.sh

This file was deleted.

File renamed without changes.
1 change: 0 additions & 1 deletion source-airtable/source_airtable/icon.svg

This file was deleted.

3 changes: 0 additions & 3 deletions source-airtable/source_airtable/integration_tests/__init__.py

This file was deleted.

14 changes: 0 additions & 14 deletions source-airtable/source_airtable/integration_tests/acceptance.py

This file was deleted.

Loading

0 comments on commit d279f17

Please sign in to comment.