airbyte-source-iterable 0.2.1__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. airbyte_source_iterable-0.3.0/PKG-INFO +113 -0
  2. airbyte_source_iterable-0.3.0/README.md +91 -0
  3. airbyte_source_iterable-0.3.0/pyproject.toml +38 -0
  4. airbyte-source-iterable-0.2.1/PKG-INFO +0 -118
  5. airbyte-source-iterable-0.2.1/README.md +0 -117
  6. airbyte-source-iterable-0.2.1/airbyte_source_iterable.egg-info/PKG-INFO +0 -118
  7. airbyte-source-iterable-0.2.1/airbyte_source_iterable.egg-info/SOURCES.txt +0 -50
  8. airbyte-source-iterable-0.2.1/airbyte_source_iterable.egg-info/dependency_links.txt +0 -1
  9. airbyte-source-iterable-0.2.1/airbyte_source_iterable.egg-info/entry_points.txt +0 -2
  10. airbyte-source-iterable-0.2.1/airbyte_source_iterable.egg-info/requires.txt +0 -11
  11. airbyte-source-iterable-0.2.1/airbyte_source_iterable.egg-info/top_level.txt +0 -3
  12. airbyte-source-iterable-0.2.1/integration_tests/__init__.py +0 -0
  13. airbyte-source-iterable-0.2.1/integration_tests/abnormal_state.json +0 -74
  14. airbyte-source-iterable-0.2.1/integration_tests/acceptance.py +0 -13
  15. airbyte-source-iterable-0.2.1/integration_tests/catalog.json +0 -186
  16. airbyte-source-iterable-0.2.1/integration_tests/configured_catalog.json +0 -186
  17. airbyte-source-iterable-0.2.1/integration_tests/configured_catalog_additional_events.json +0 -291
  18. airbyte-source-iterable-0.2.1/integration_tests/invalid_config.json +0 -4
  19. airbyte-source-iterable-0.2.1/setup.cfg +0 -111
  20. airbyte-source-iterable-0.2.1/setup.py +0 -43
  21. airbyte-source-iterable-0.2.1/unit_tests/__init__.py +0 -3
  22. airbyte-source-iterable-0.2.1/unit_tests/conftest.py +0 -49
  23. airbyte-source-iterable-0.2.1/unit_tests/test_export_adjustable_range.py +0 -117
  24. airbyte-source-iterable-0.2.1/unit_tests/test_exports_stream.py +0 -35
  25. airbyte-source-iterable-0.2.1/unit_tests/test_slice_generator.py +0 -94
  26. airbyte-source-iterable-0.2.1/unit_tests/test_source.py +0 -28
  27. airbyte-source-iterable-0.2.1/unit_tests/test_stream_events.py +0 -202
  28. airbyte-source-iterable-0.2.1/unit_tests/test_streams.py +0 -270
  29. airbyte-source-iterable-0.2.1/unit_tests/test_utils.py +0 -12
  30. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/__init__.py +0 -0
  31. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/run.py +0 -0
  32. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/campaigns.json +0 -0
  33. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/campaigns_metrics.json +0 -0
  34. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/channels.json +0 -0
  35. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/email_bounce.json +0 -0
  36. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/email_click.json +0 -0
  37. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/email_complaint.json +0 -0
  38. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/email_open.json +0 -0
  39. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/email_send.json +0 -0
  40. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/email_send_skip.json +0 -0
  41. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/email_subscribe.json +0 -0
  42. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/email_unsubscribe.json +0 -0
  43. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/events.json +0 -0
  44. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/list_users.json +0 -0
  45. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/lists.json +0 -0
  46. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/message_types.json +0 -0
  47. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/metadata.json +0 -0
  48. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/templates.json +0 -0
  49. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/schemas/users.json +0 -0
  50. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/slice_generators.py +0 -0
  51. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/source.py +0 -0
  52. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/spec.json +0 -0
  53. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/streams.py +0 -0
  54. {airbyte-source-iterable-0.2.1 → airbyte_source_iterable-0.3.0}/source_iterable/utils.py +0 -0
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.1
2
+ Name: airbyte-source-iterable
3
+ Version: 0.3.0
4
+ Summary: Source implementation for Iterable.
5
+ Home-page: https://airbyte.com
6
+ License: MIT
7
+ Author: Airbyte
8
+ Author-email: contact@airbyte.io
9
+ Requires-Python: >=3.9,<3.12
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Requires-Dist: airbyte-cdk (==0.63.2)
16
+ Requires-Dist: pendulum (==2.1.2)
17
+ Requires-Dist: python-dateutil (==2.8.2)
18
+ Requires-Dist: requests (==2.31.0)
19
+ Project-URL: Documentation, https://docs.airbyte.com/integrations/sources/iterable
20
+ Project-URL: Repository, https://github.com/airbytehq/airbyte
21
+ Description-Content-Type: text/markdown
22
+
23
+ # Iterable source connector
24
+
25
+
26
+ This is the repository for the Iterable source connector, written in Python.
27
+ For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/iterable).
28
+
29
+ ## Local development
30
+
31
+ ### Prerequisites
32
+ * Python (~=3.9)
33
+ * Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation)
34
+
35
+
36
+ ### Installing the connector
37
+ From this connector directory, run:
38
+ ```bash
39
+ poetry install --with dev
40
+ ```
41
+
42
+
43
+ ### Create credentials
44
+ **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/iterable)
45
+ to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_iterable/spec.yaml` file.
46
+ Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
47
+ See `sample_files/sample_config.json` for a sample config file.
48
+
49
+
50
+ ### Locally running the connector
51
+ ```
52
+ poetry run source-iterable spec
53
+ poetry run source-iterable check --config secrets/config.json
54
+ poetry run source-iterable discover --config secrets/config.json
55
+ poetry run source-iterable read --config secrets/config.json --catalog sample_files/configured_catalog.json
56
+ ```
57
+
58
+ ### Running unit tests
59
+ To run unit tests locally, from the connector directory run:
60
+ ```
61
+ poetry run pytest unit_tests
62
+ ```
63
+
64
+ ### Building the docker image
65
+ 1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md)
66
+ 2. Run the following command to build the docker image:
67
+ ```bash
68
+ airbyte-ci connectors --name=source-iterable build
69
+ ```
70
+
71
+ An image will be available on your host with the tag `airbyte/source-iterable:dev`.
72
+
73
+
74
+ ### Running as a docker container
75
+ Then run any of the connector commands as follows:
76
+ ```
77
+ docker run --rm airbyte/source-iterable:dev spec
78
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-iterable:dev check --config /secrets/config.json
79
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-iterable:dev discover --config /secrets/config.json
80
+ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-iterable:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
81
+ ```
82
+
83
+ ### Running our CI test suite
84
+ You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
85
+ ```bash
86
+ airbyte-ci connectors --name=source-iterable test
87
+ ```
88
+
89
+ ### Customizing acceptance Tests
90
+ Customize `acceptance-test-config.yml` file to configure acceptance tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
91
+ If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py.
92
+
93
+ ### Dependency Management
94
+ All of your dependencies should be managed via Poetry.
95
+ To add a new dependency, run:
96
+ ```bash
97
+ poetry add <package-name>
98
+ ```
99
+
100
+ Please commit the changes to `pyproject.toml` and `poetry.lock` files.
101
+
102
+ ## Publishing a new version of the connector
103
+ You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
104
+ 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-iterable test`
105
+ 2. Bump the connector version (please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors)):
106
+ - bump the `dockerImageTag` value in in `metadata.yaml`
107
+ - bump the `version` value in `pyproject.toml`
108
+ 3. Make sure the `metadata.yaml` content is up to date.
109
+ 4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/iterable.md`).
110
+ 5. Create a Pull Request: use [our PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#pull-request-title-convention).
111
+ 6. Pat yourself on the back for being an awesome contributor.
112
+ 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
113
+ 8. Once your PR is merged, the new version of the connector will be automatically published to Docker Hub and our connector registry.
@@ -0,0 +1,91 @@
1
+ # Iterable source connector
2
+
3
+
4
+ This is the repository for the Iterable source connector, written in Python.
5
+ For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/iterable).
6
+
7
+ ## Local development
8
+
9
+ ### Prerequisites
10
+ * Python (~=3.9)
11
+ * Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation)
12
+
13
+
14
+ ### Installing the connector
15
+ From this connector directory, run:
16
+ ```bash
17
+ poetry install --with dev
18
+ ```
19
+
20
+
21
+ ### Create credentials
22
+ **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/iterable)
23
+ to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_iterable/spec.yaml` file.
24
+ Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
25
+ See `sample_files/sample_config.json` for a sample config file.
26
+
27
+
28
+ ### Locally running the connector
29
+ ```
30
+ poetry run source-iterable spec
31
+ poetry run source-iterable check --config secrets/config.json
32
+ poetry run source-iterable discover --config secrets/config.json
33
+ poetry run source-iterable read --config secrets/config.json --catalog sample_files/configured_catalog.json
34
+ ```
35
+
36
+ ### Running unit tests
37
+ To run unit tests locally, from the connector directory run:
38
+ ```
39
+ poetry run pytest unit_tests
40
+ ```
41
+
42
+ ### Building the docker image
43
+ 1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md)
44
+ 2. Run the following command to build the docker image:
45
+ ```bash
46
+ airbyte-ci connectors --name=source-iterable build
47
+ ```
48
+
49
+ An image will be available on your host with the tag `airbyte/source-iterable:dev`.
50
+
51
+
52
+ ### Running as a docker container
53
+ Then run any of the connector commands as follows:
54
+ ```
55
+ docker run --rm airbyte/source-iterable:dev spec
56
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-iterable:dev check --config /secrets/config.json
57
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-iterable:dev discover --config /secrets/config.json
58
+ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-iterable:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
59
+ ```
60
+
61
+ ### Running our CI test suite
62
+ You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
63
+ ```bash
64
+ airbyte-ci connectors --name=source-iterable test
65
+ ```
66
+
67
+ ### Customizing acceptance Tests
68
+ Customize `acceptance-test-config.yml` file to configure acceptance tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
69
+ If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py.
70
+
71
+ ### Dependency Management
72
+ All of your dependencies should be managed via Poetry.
73
+ To add a new dependency, run:
74
+ ```bash
75
+ poetry add <package-name>
76
+ ```
77
+
78
+ Please commit the changes to `pyproject.toml` and `poetry.lock` files.
79
+
80
+ ## Publishing a new version of the connector
81
+ You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
82
+ 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-iterable test`
83
+ 2. Bump the connector version (please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors)):
84
+ - bump the `dockerImageTag` value in in `metadata.yaml`
85
+ - bump the `version` value in `pyproject.toml`
86
+ 3. Make sure the `metadata.yaml` content is up to date.
87
+ 4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/iterable.md`).
88
+ 5. Create a Pull Request: use [our PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#pull-request-title-convention).
89
+ 6. Pat yourself on the back for being an awesome contributor.
90
+ 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
91
+ 8. Once your PR is merged, the new version of the connector will be automatically published to Docker Hub and our connector registry.
@@ -0,0 +1,38 @@
1
+ [build-system]
2
+ requires = [
3
+ "poetry-core>=1.0.0",
4
+ ]
5
+ build-backend = "poetry.core.masonry.api"
6
+
7
+ [tool.poetry]
8
+ version = "0.3.0"
9
+ name = "airbyte-source-iterable"
10
+ description = "Source implementation for Iterable."
11
+ authors = [
12
+ "Airbyte <contact@airbyte.io>",
13
+ ]
14
+ license = "MIT"
15
+ readme = "README.md"
16
+ documentation = "https://docs.airbyte.com/integrations/sources/iterable"
17
+ homepage = "https://airbyte.com"
18
+ repository = "https://github.com/airbytehq/airbyte"
19
+ packages = [
20
+ { include = "source_iterable" },
21
+ ]
22
+
23
+ [tool.poetry.dependencies]
24
+ python = "^3.9,<3.12"
25
+ pendulum = "==2.1.2"
26
+ airbyte-cdk = "==0.63.2"
27
+ requests = "==2.31.0"
28
+ python-dateutil = "==2.8.2"
29
+
30
+ [tool.poetry.scripts]
31
+ source-iterable = "source_iterable.run:run"
32
+
33
+ [tool.poetry.group.dev.dependencies]
34
+ pytest = "^6.1"
35
+ pytest-mock = "^3.6.1"
36
+ freezegun = "==1.1.0"
37
+ requests-mock = "^1.9.3"
38
+ responses = "==0.23.1"
@@ -1,118 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: airbyte-source-iterable
3
- Version: 0.2.1
4
- Summary: Source implementation for Iterable.
5
- Author: Airbyte
6
- Author-email: contact@airbyte.io
7
- Description-Content-Type: text/markdown
8
- Requires-Dist: airbyte-cdk
9
- Requires-Dist: pendulum~=2.1.2
10
- Requires-Dist: python-dateutil~=2.8.2
11
- Requires-Dist: requests~=2.25
12
- Provides-Extra: tests
13
- Requires-Dist: requests-mock~=1.9.3; extra == "tests"
14
- Requires-Dist: pytest-mock~=3.6.1; extra == "tests"
15
- Requires-Dist: pytest~=6.1; extra == "tests"
16
- Requires-Dist: responses==0.23.1; extra == "tests"
17
- Requires-Dist: freezegun==1.1.0; extra == "tests"
18
-
19
- # Coinmarketcap Source
20
-
21
- This is the repository for the Coinmarketcap configuration based source connector.
22
- For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/coinmarketcap).
23
-
24
-
25
- **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/coinmarketcap)
26
- to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_coinmarketcap/spec.yaml` file.
27
- Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
28
- See `integration_tests/sample_config.json` for a sample config file.
29
-
30
- **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source coinmarketcap test creds`
31
- and place them into `secrets/config.json`.
32
-
33
-
34
-
35
-
36
-
37
- The Airbyte way of building this connector is to use our `airbyte-ci` tool.
38
- You can follow install instructions [here](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md#L1).
39
- Then running the following command will build your connector:
40
-
41
- ```bash
42
- airbyte-ci connectors --name source-iterable build
43
- ```
44
- Once the command is done, you will find your connector image in your local docker registry: `airbyte/source-iterable:dev`.
45
-
46
- When contributing on our connector you might need to customize the build process to add a system dependency or set an env var.
47
- You can customize our build process by adding a `build_customization.py` module to your connector.
48
- This module should contain a `pre_connector_install` and `post_connector_install` async function that will mutate the base image and the connector container respectively.
49
- It will be imported at runtime by our build process and the functions will be called if they exist.
50
-
51
- Here is an example of a `build_customization.py` module:
52
- ```python
53
- from __future__ import annotations
54
-
55
- from typing import TYPE_CHECKING
56
-
57
- if TYPE_CHECKING:
58
- from dagger import Container
59
-
60
-
61
- async def pre_connector_install(base_image_container: Container) -> Container:
62
- return await base_image_container.with_env_variable("MY_PRE_BUILD_ENV_VAR", "my_pre_build_env_var_value")
63
-
64
- async def post_connector_install(connector_container: Container) -> Container:
65
- return await connector_container.with_env_variable("MY_POST_BUILD_ENV_VAR", "my_post_build_env_var_value")
66
- ```
67
-
68
- This connector is built using our dynamic built process in `airbyte-ci`.
69
- The base image used to build it is defined within the metadata.yaml file under the `connectorBuildOptions`.
70
- The build logic is defined using [Dagger](https://dagger.io/) [here](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/pipelines/builds/python_connectors.py).
71
- It does not rely on a Dockerfile.
72
-
73
- If you would like to patch our connector and build your own a simple approach would be to:
74
-
75
- 1. Create your own Dockerfile based on the latest version of the connector image.
76
- ```Dockerfile
77
- FROM airbyte/source-iterable:latest
78
-
79
- COPY . ./airbyte/integration_code
80
- RUN pip install ./airbyte/integration_code
81
-
82
- ```
83
- Please use this as an example. This is not optimized.
84
-
85
- 2. Build your image:
86
- ```bash
87
- docker build -t airbyte/source-iterable:dev .
88
- docker run airbyte/source-iterable:dev spec
89
- ```
90
- Then run any of the connector commands as follows:
91
- ```
92
- docker run --rm airbyte/source-coinmarketcap:dev spec
93
- docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-coinmarketcap:dev check --config /secrets/config.json
94
- docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-coinmarketcap:dev discover --config /secrets/config.json
95
- docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-coinmarketcap:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
96
- ```
97
-
98
- You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
99
- ```bash
100
- airbyte-ci connectors --name=source-iterable test
101
- ```
102
-
103
- Customize `acceptance-test-config.yml` file to configure tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
104
- If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py.
105
-
106
- All of your dependencies should go in `setup.py`, NOT `requirements.txt`. The requirements file is only used to connect internal Airbyte dependencies in the monorepo for local development.
107
- We split dependencies between two groups, dependencies that are:
108
- * required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
109
- * required for the testing need to go to `TEST_REQUIREMENTS` list
110
-
111
- You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
112
- 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-iterable test`
113
- 2. Bump the connector version in `metadata.yaml`: increment the `dockerImageTag` value. Please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors).
114
- 3. Make sure the `metadata.yaml` content is up to date.
115
- 4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/iterable.md`).
116
- 5. Create a Pull Request: use [our PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#pull-request-title-convention).
117
- 6. Pat yourself on the back for being an awesome contributor.
118
- 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
@@ -1,117 +0,0 @@
1
- # Coinmarketcap Source
2
-
3
- This is the repository for the Coinmarketcap configuration based source connector.
4
- For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/coinmarketcap).
5
-
6
- ## Local development
7
-
8
- #### Create credentials
9
- **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/coinmarketcap)
10
- to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_coinmarketcap/spec.yaml` file.
11
- Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
12
- See `integration_tests/sample_config.json` for a sample config file.
13
-
14
- **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source coinmarketcap test creds`
15
- and place them into `secrets/config.json`.
16
-
17
- ### Locally running the connector docker image
18
-
19
-
20
-
21
-
22
- #### Use `airbyte-ci` to build your connector
23
- The Airbyte way of building this connector is to use our `airbyte-ci` tool.
24
- You can follow install instructions [here](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md#L1).
25
- Then running the following command will build your connector:
26
-
27
- ```bash
28
- airbyte-ci connectors --name source-iterable build
29
- ```
30
- Once the command is done, you will find your connector image in your local docker registry: `airbyte/source-iterable:dev`.
31
-
32
- ##### Customizing our build process
33
- When contributing on our connector you might need to customize the build process to add a system dependency or set an env var.
34
- You can customize our build process by adding a `build_customization.py` module to your connector.
35
- This module should contain a `pre_connector_install` and `post_connector_install` async function that will mutate the base image and the connector container respectively.
36
- It will be imported at runtime by our build process and the functions will be called if they exist.
37
-
38
- Here is an example of a `build_customization.py` module:
39
- ```python
40
- from __future__ import annotations
41
-
42
- from typing import TYPE_CHECKING
43
-
44
- if TYPE_CHECKING:
45
- # Feel free to check the dagger documentation for more information on the Container object and its methods.
46
- # https://dagger-io.readthedocs.io/en/sdk-python-v0.6.4/
47
- from dagger import Container
48
-
49
-
50
- async def pre_connector_install(base_image_container: Container) -> Container:
51
- return await base_image_container.with_env_variable("MY_PRE_BUILD_ENV_VAR", "my_pre_build_env_var_value")
52
-
53
- async def post_connector_install(connector_container: Container) -> Container:
54
- return await connector_container.with_env_variable("MY_POST_BUILD_ENV_VAR", "my_post_build_env_var_value")
55
- ```
56
-
57
- #### Build your own connector image
58
- This connector is built using our dynamic built process in `airbyte-ci`.
59
- The base image used to build it is defined within the metadata.yaml file under the `connectorBuildOptions`.
60
- The build logic is defined using [Dagger](https://dagger.io/) [here](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/pipelines/builds/python_connectors.py).
61
- It does not rely on a Dockerfile.
62
-
63
- If you would like to patch our connector and build your own a simple approach would be to:
64
-
65
- 1. Create your own Dockerfile based on the latest version of the connector image.
66
- ```Dockerfile
67
- FROM airbyte/source-iterable:latest
68
-
69
- COPY . ./airbyte/integration_code
70
- RUN pip install ./airbyte/integration_code
71
-
72
- # The entrypoint and default env vars are already set in the base image
73
- # ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
74
- # ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
75
- ```
76
- Please use this as an example. This is not optimized.
77
-
78
- 2. Build your image:
79
- ```bash
80
- docker build -t airbyte/source-iterable:dev .
81
- # Running the spec command against your patched connector
82
- docker run airbyte/source-iterable:dev spec
83
- ```
84
- #### Run
85
- Then run any of the connector commands as follows:
86
- ```
87
- docker run --rm airbyte/source-coinmarketcap:dev spec
88
- docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-coinmarketcap:dev check --config /secrets/config.json
89
- docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-coinmarketcap:dev discover --config /secrets/config.json
90
- docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-coinmarketcap:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
91
- ```
92
-
93
- ## Testing
94
- You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
95
- ```bash
96
- airbyte-ci connectors --name=source-iterable test
97
- ```
98
-
99
- ### Customizing acceptance Tests
100
- Customize `acceptance-test-config.yml` file to configure tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
101
- If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py.
102
-
103
- ## Dependency Management
104
- All of your dependencies should go in `setup.py`, NOT `requirements.txt`. The requirements file is only used to connect internal Airbyte dependencies in the monorepo for local development.
105
- We split dependencies between two groups, dependencies that are:
106
- * required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
107
- * required for the testing need to go to `TEST_REQUIREMENTS` list
108
-
109
- ### Publishing a new version of the connector
110
- You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
111
- 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-iterable test`
112
- 2. Bump the connector version in `metadata.yaml`: increment the `dockerImageTag` value. Please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors).
113
- 3. Make sure the `metadata.yaml` content is up to date.
114
- 4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/iterable.md`).
115
- 5. Create a Pull Request: use [our PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#pull-request-title-convention).
116
- 6. Pat yourself on the back for being an awesome contributor.
117
- 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
@@ -1,118 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: airbyte-source-iterable
3
- Version: 0.2.1
4
- Summary: Source implementation for Iterable.
5
- Author: Airbyte
6
- Author-email: contact@airbyte.io
7
- Description-Content-Type: text/markdown
8
- Requires-Dist: airbyte-cdk
9
- Requires-Dist: pendulum~=2.1.2
10
- Requires-Dist: python-dateutil~=2.8.2
11
- Requires-Dist: requests~=2.25
12
- Provides-Extra: tests
13
- Requires-Dist: requests-mock~=1.9.3; extra == "tests"
14
- Requires-Dist: pytest-mock~=3.6.1; extra == "tests"
15
- Requires-Dist: pytest~=6.1; extra == "tests"
16
- Requires-Dist: responses==0.23.1; extra == "tests"
17
- Requires-Dist: freezegun==1.1.0; extra == "tests"
18
-
19
- # Coinmarketcap Source
20
-
21
- This is the repository for the Coinmarketcap configuration based source connector.
22
- For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/coinmarketcap).
23
-
24
-
25
- **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/coinmarketcap)
26
- to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_coinmarketcap/spec.yaml` file.
27
- Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
28
- See `integration_tests/sample_config.json` for a sample config file.
29
-
30
- **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source coinmarketcap test creds`
31
- and place them into `secrets/config.json`.
32
-
33
-
34
-
35
-
36
-
37
- The Airbyte way of building this connector is to use our `airbyte-ci` tool.
38
- You can follow install instructions [here](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md#L1).
39
- Then running the following command will build your connector:
40
-
41
- ```bash
42
- airbyte-ci connectors --name source-iterable build
43
- ```
44
- Once the command is done, you will find your connector image in your local docker registry: `airbyte/source-iterable:dev`.
45
-
46
- When contributing on our connector you might need to customize the build process to add a system dependency or set an env var.
47
- You can customize our build process by adding a `build_customization.py` module to your connector.
48
- This module should contain a `pre_connector_install` and `post_connector_install` async function that will mutate the base image and the connector container respectively.
49
- It will be imported at runtime by our build process and the functions will be called if they exist.
50
-
51
- Here is an example of a `build_customization.py` module:
52
- ```python
53
- from __future__ import annotations
54
-
55
- from typing import TYPE_CHECKING
56
-
57
- if TYPE_CHECKING:
58
- from dagger import Container
59
-
60
-
61
- async def pre_connector_install(base_image_container: Container) -> Container:
62
- return await base_image_container.with_env_variable("MY_PRE_BUILD_ENV_VAR", "my_pre_build_env_var_value")
63
-
64
- async def post_connector_install(connector_container: Container) -> Container:
65
- return await connector_container.with_env_variable("MY_POST_BUILD_ENV_VAR", "my_post_build_env_var_value")
66
- ```
67
-
68
- This connector is built using our dynamic built process in `airbyte-ci`.
69
- The base image used to build it is defined within the metadata.yaml file under the `connectorBuildOptions`.
70
- The build logic is defined using [Dagger](https://dagger.io/) [here](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/pipelines/builds/python_connectors.py).
71
- It does not rely on a Dockerfile.
72
-
73
- If you would like to patch our connector and build your own a simple approach would be to:
74
-
75
- 1. Create your own Dockerfile based on the latest version of the connector image.
76
- ```Dockerfile
77
- FROM airbyte/source-iterable:latest
78
-
79
- COPY . ./airbyte/integration_code
80
- RUN pip install ./airbyte/integration_code
81
-
82
- ```
83
- Please use this as an example. This is not optimized.
84
-
85
- 2. Build your image:
86
- ```bash
87
- docker build -t airbyte/source-iterable:dev .
88
- docker run airbyte/source-iterable:dev spec
89
- ```
90
- Then run any of the connector commands as follows:
91
- ```
92
- docker run --rm airbyte/source-coinmarketcap:dev spec
93
- docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-coinmarketcap:dev check --config /secrets/config.json
94
- docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-coinmarketcap:dev discover --config /secrets/config.json
95
- docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-coinmarketcap:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
96
- ```
97
-
98
- You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
99
- ```bash
100
- airbyte-ci connectors --name=source-iterable test
101
- ```
102
-
103
- Customize `acceptance-test-config.yml` file to configure tests. See [Connector Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
104
- If your connector requires to create or destroy resources for use during acceptance tests create fixtures for it and place them inside integration_tests/acceptance.py.
105
-
106
- All of your dependencies should go in `setup.py`, NOT `requirements.txt`. The requirements file is only used to connect internal Airbyte dependencies in the monorepo for local development.
107
- We split dependencies between two groups, dependencies that are:
108
- * required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
109
- * required for the testing need to go to `TEST_REQUIREMENTS` list
110
-
111
- You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
112
- 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-iterable test`
113
- 2. Bump the connector version in `metadata.yaml`: increment the `dockerImageTag` value. Please follow [semantic versioning for connectors](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#semantic-versioning-for-connectors).
114
- 3. Make sure the `metadata.yaml` content is up to date.
115
- 4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/iterable.md`).
116
- 5. Create a Pull Request: use [our PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#pull-request-title-convention).
117
- 6. Pat yourself on the back for being an awesome contributor.
118
- 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
@@ -1,50 +0,0 @@
1
- README.md
2
- setup.cfg
3
- setup.py
4
- airbyte_source_iterable.egg-info/PKG-INFO
5
- airbyte_source_iterable.egg-info/SOURCES.txt
6
- airbyte_source_iterable.egg-info/dependency_links.txt
7
- airbyte_source_iterable.egg-info/entry_points.txt
8
- airbyte_source_iterable.egg-info/requires.txt
9
- airbyte_source_iterable.egg-info/top_level.txt
10
- integration_tests/__init__.py
11
- integration_tests/abnormal_state.json
12
- integration_tests/acceptance.py
13
- integration_tests/catalog.json
14
- integration_tests/configured_catalog.json
15
- integration_tests/configured_catalog_additional_events.json
16
- integration_tests/invalid_config.json
17
- source_iterable/__init__.py
18
- source_iterable/run.py
19
- source_iterable/slice_generators.py
20
- source_iterable/source.py
21
- source_iterable/spec.json
22
- source_iterable/streams.py
23
- source_iterable/utils.py
24
- source_iterable/schemas/campaigns.json
25
- source_iterable/schemas/campaigns_metrics.json
26
- source_iterable/schemas/channels.json
27
- source_iterable/schemas/email_bounce.json
28
- source_iterable/schemas/email_click.json
29
- source_iterable/schemas/email_complaint.json
30
- source_iterable/schemas/email_open.json
31
- source_iterable/schemas/email_send.json
32
- source_iterable/schemas/email_send_skip.json
33
- source_iterable/schemas/email_subscribe.json
34
- source_iterable/schemas/email_unsubscribe.json
35
- source_iterable/schemas/events.json
36
- source_iterable/schemas/list_users.json
37
- source_iterable/schemas/lists.json
38
- source_iterable/schemas/message_types.json
39
- source_iterable/schemas/metadata.json
40
- source_iterable/schemas/templates.json
41
- source_iterable/schemas/users.json
42
- unit_tests/__init__.py
43
- unit_tests/conftest.py
44
- unit_tests/test_export_adjustable_range.py
45
- unit_tests/test_exports_stream.py
46
- unit_tests/test_slice_generator.py
47
- unit_tests/test_source.py
48
- unit_tests/test_stream_events.py
49
- unit_tests/test_streams.py
50
- unit_tests/test_utils.py
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- source-iterable = source_iterable.run:run