airbyte-source-adjust 0.1.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 (27) hide show
  1. airbyte-source-adjust-0.1.0/PKG-INFO +90 -0
  2. airbyte-source-adjust-0.1.0/README.md +89 -0
  3. airbyte-source-adjust-0.1.0/airbyte_source_adjust.egg-info/PKG-INFO +90 -0
  4. airbyte-source-adjust-0.1.0/airbyte_source_adjust.egg-info/SOURCES.txt +26 -0
  5. airbyte-source-adjust-0.1.0/airbyte_source_adjust.egg-info/dependency_links.txt +1 -0
  6. airbyte-source-adjust-0.1.0/airbyte_source_adjust.egg-info/entry_points.txt +2 -0
  7. airbyte-source-adjust-0.1.0/airbyte_source_adjust.egg-info/requires.txt +6 -0
  8. airbyte-source-adjust-0.1.0/airbyte_source_adjust.egg-info/top_level.txt +3 -0
  9. airbyte-source-adjust-0.1.0/integration_tests/__init__.py +3 -0
  10. airbyte-source-adjust-0.1.0/integration_tests/abnormal_state.json +5 -0
  11. airbyte-source-adjust-0.1.0/integration_tests/acceptance.py +14 -0
  12. airbyte-source-adjust-0.1.0/integration_tests/catalog.json +43 -0
  13. airbyte-source-adjust-0.1.0/integration_tests/configured_catalog.json +46 -0
  14. airbyte-source-adjust-0.1.0/integration_tests/invalid_config.json +7 -0
  15. airbyte-source-adjust-0.1.0/integration_tests/sample_config.json +8 -0
  16. airbyte-source-adjust-0.1.0/integration_tests/sample_state.json +5 -0
  17. airbyte-source-adjust-0.1.0/setup.cfg +88 -0
  18. airbyte-source-adjust-0.1.0/setup.py +43 -0
  19. airbyte-source-adjust-0.1.0/source_adjust/__init__.py +8 -0
  20. airbyte-source-adjust-0.1.0/source_adjust/model.py +632 -0
  21. airbyte-source-adjust-0.1.0/source_adjust/run.py +14 -0
  22. airbyte-source-adjust-0.1.0/source_adjust/source.py +214 -0
  23. airbyte-source-adjust-0.1.0/source_adjust/spec.yaml +153 -0
  24. airbyte-source-adjust-0.1.0/unit_tests/__init__.py +3 -0
  25. airbyte-source-adjust-0.1.0/unit_tests/test_incremental_streams.py +43 -0
  26. airbyte-source-adjust-0.1.0/unit_tests/test_source.py +26 -0
  27. airbyte-source-adjust-0.1.0/unit_tests/test_streams.py +96 -0
@@ -0,0 +1,90 @@
1
+ Metadata-Version: 2.1
2
+ Name: airbyte-source-adjust
3
+ Version: 0.1.0
4
+ Summary: Source implementation for Adjust.
5
+ Author: Airbyte
6
+ Author-email: contact@airbyte.io
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: airbyte-cdk~=0.1
9
+ Provides-Extra: tests
10
+ Requires-Dist: requests-mock~=1.9.3; extra == "tests"
11
+ Requires-Dist: pytest~=6.1; extra == "tests"
12
+ Requires-Dist: pytest-mock~=3.6.1; extra == "tests"
13
+
14
+ # Adjust Source
15
+
16
+ This is the repository for the Adjust source connector, written in Python.
17
+ For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/adjust).
18
+
19
+
20
+ **To iterate on this connector, make sure to complete this prerequisites section.**
21
+
22
+
23
+ From this connector directory, create a virtual environment:
24
+ ```
25
+ python -m venv .venv
26
+ ```
27
+
28
+ This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your
29
+ development environment of choice. To activate it from the terminal, run:
30
+ ```
31
+ source .venv/bin/activate
32
+ pip install -r requirements.txt
33
+ pip install '.[tests]'
34
+ ```
35
+ If you are in an IDE, follow your IDE's instructions to activate the virtualenv.
36
+
37
+ Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is
38
+ used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`.
39
+ If this is mumbo jumbo to you, don't worry about it, just put your deps in `setup.py` but install using `pip install -r requirements.txt` and everything
40
+ should work as you expect.
41
+
42
+ **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/adjust)
43
+ to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_adjust/spec.yaml` file.
44
+ Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
45
+ See `integration_tests/sample_config.json` for a sample config file.
46
+
47
+ **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source adjust test creds`
48
+ and place them into `secrets/config.json`.
49
+
50
+ ```
51
+ python main.py spec
52
+ python main.py check --config secrets/config.json
53
+ python main.py discover --config secrets/config.json
54
+ python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
55
+ ```
56
+
57
+
58
+
59
+ **Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):**
60
+ ```bash
61
+ airbyte-ci connectors --name source-adjust build
62
+ ```
63
+
64
+ An image will be built with the tag `airbyte/source-adjust:dev`.
65
+
66
+ **Via `docker build`:**
67
+ ```bash
68
+ docker build -t airbyte/source-adjust:dev .
69
+ ```
70
+
71
+ Then run any of the connector commands as follows:
72
+ ```
73
+ docker run --rm airbyte/source-adjust:dev spec
74
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-adjust:dev check --config /secrets/config.json
75
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-adjust:dev discover --config /secrets/config.json
76
+ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-adjust:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
77
+ ```
78
+
79
+ You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
80
+ ```bash
81
+ airbyte-ci connectors --name=source-adjust test
82
+ ```
83
+
84
+ 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.
85
+ 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.
86
+
87
+ 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.
88
+ We split dependencies between two groups, dependencies that are:
89
+ * required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
90
+ * required for the testing need to go to `TEST_REQUIREMENTS` list
@@ -0,0 +1,89 @@
1
+ # Adjust Source
2
+
3
+ This is the repository for the Adjust source connector, written in Python.
4
+ For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/adjust).
5
+
6
+ ## Local development
7
+
8
+ ### Prerequisites
9
+ **To iterate on this connector, make sure to complete this prerequisites section.**
10
+
11
+ #### Minimum Python version required `= 3.9.0`
12
+
13
+ #### Build & Activate Virtual Environment and install dependencies
14
+ From this connector directory, create a virtual environment:
15
+ ```
16
+ python -m venv .venv
17
+ ```
18
+
19
+ This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your
20
+ development environment of choice. To activate it from the terminal, run:
21
+ ```
22
+ source .venv/bin/activate
23
+ pip install -r requirements.txt
24
+ pip install '.[tests]'
25
+ ```
26
+ If you are in an IDE, follow your IDE's instructions to activate the virtualenv.
27
+
28
+ Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is
29
+ used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`.
30
+ If this is mumbo jumbo to you, don't worry about it, just put your deps in `setup.py` but install using `pip install -r requirements.txt` and everything
31
+ should work as you expect.
32
+
33
+ #### Create credentials
34
+ **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/adjust)
35
+ to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_adjust/spec.yaml` file.
36
+ Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
37
+ See `integration_tests/sample_config.json` for a sample config file.
38
+
39
+ **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source adjust test creds`
40
+ and place them into `secrets/config.json`.
41
+
42
+ ### Locally running the connector
43
+ ```
44
+ python main.py spec
45
+ python main.py check --config secrets/config.json
46
+ python main.py discover --config secrets/config.json
47
+ python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
48
+ ```
49
+
50
+ ### Locally running the connector docker image
51
+
52
+
53
+ #### Build
54
+ **Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):**
55
+ ```bash
56
+ airbyte-ci connectors --name source-adjust build
57
+ ```
58
+
59
+ An image will be built with the tag `airbyte/source-adjust:dev`.
60
+
61
+ **Via `docker build`:**
62
+ ```bash
63
+ docker build -t airbyte/source-adjust:dev .
64
+ ```
65
+
66
+ #### Run
67
+ Then run any of the connector commands as follows:
68
+ ```
69
+ docker run --rm airbyte/source-adjust:dev spec
70
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-adjust:dev check --config /secrets/config.json
71
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-adjust:dev discover --config /secrets/config.json
72
+ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-adjust:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
73
+ ```
74
+
75
+ ## Testing
76
+ You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
77
+ ```bash
78
+ airbyte-ci connectors --name=source-adjust test
79
+ ```
80
+
81
+ ### Customizing acceptance Tests
82
+ 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.
83
+ 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.
84
+
85
+ ## Dependency Management
86
+ 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.
87
+ We split dependencies between two groups, dependencies that are:
88
+ * required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
89
+ * required for the testing need to go to `TEST_REQUIREMENTS` list
@@ -0,0 +1,90 @@
1
+ Metadata-Version: 2.1
2
+ Name: airbyte-source-adjust
3
+ Version: 0.1.0
4
+ Summary: Source implementation for Adjust.
5
+ Author: Airbyte
6
+ Author-email: contact@airbyte.io
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: airbyte-cdk~=0.1
9
+ Provides-Extra: tests
10
+ Requires-Dist: requests-mock~=1.9.3; extra == "tests"
11
+ Requires-Dist: pytest~=6.1; extra == "tests"
12
+ Requires-Dist: pytest-mock~=3.6.1; extra == "tests"
13
+
14
+ # Adjust Source
15
+
16
+ This is the repository for the Adjust source connector, written in Python.
17
+ For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/adjust).
18
+
19
+
20
+ **To iterate on this connector, make sure to complete this prerequisites section.**
21
+
22
+
23
+ From this connector directory, create a virtual environment:
24
+ ```
25
+ python -m venv .venv
26
+ ```
27
+
28
+ This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your
29
+ development environment of choice. To activate it from the terminal, run:
30
+ ```
31
+ source .venv/bin/activate
32
+ pip install -r requirements.txt
33
+ pip install '.[tests]'
34
+ ```
35
+ If you are in an IDE, follow your IDE's instructions to activate the virtualenv.
36
+
37
+ Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is
38
+ used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`.
39
+ If this is mumbo jumbo to you, don't worry about it, just put your deps in `setup.py` but install using `pip install -r requirements.txt` and everything
40
+ should work as you expect.
41
+
42
+ **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/adjust)
43
+ to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_adjust/spec.yaml` file.
44
+ Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
45
+ See `integration_tests/sample_config.json` for a sample config file.
46
+
47
+ **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source adjust test creds`
48
+ and place them into `secrets/config.json`.
49
+
50
+ ```
51
+ python main.py spec
52
+ python main.py check --config secrets/config.json
53
+ python main.py discover --config secrets/config.json
54
+ python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
55
+ ```
56
+
57
+
58
+
59
+ **Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):**
60
+ ```bash
61
+ airbyte-ci connectors --name source-adjust build
62
+ ```
63
+
64
+ An image will be built with the tag `airbyte/source-adjust:dev`.
65
+
66
+ **Via `docker build`:**
67
+ ```bash
68
+ docker build -t airbyte/source-adjust:dev .
69
+ ```
70
+
71
+ Then run any of the connector commands as follows:
72
+ ```
73
+ docker run --rm airbyte/source-adjust:dev spec
74
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-adjust:dev check --config /secrets/config.json
75
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-adjust:dev discover --config /secrets/config.json
76
+ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-adjust:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
77
+ ```
78
+
79
+ You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
80
+ ```bash
81
+ airbyte-ci connectors --name=source-adjust test
82
+ ```
83
+
84
+ 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.
85
+ 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.
86
+
87
+ 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.
88
+ We split dependencies between two groups, dependencies that are:
89
+ * required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
90
+ * required for the testing need to go to `TEST_REQUIREMENTS` list
@@ -0,0 +1,26 @@
1
+ README.md
2
+ setup.cfg
3
+ setup.py
4
+ airbyte_source_adjust.egg-info/PKG-INFO
5
+ airbyte_source_adjust.egg-info/SOURCES.txt
6
+ airbyte_source_adjust.egg-info/dependency_links.txt
7
+ airbyte_source_adjust.egg-info/entry_points.txt
8
+ airbyte_source_adjust.egg-info/requires.txt
9
+ airbyte_source_adjust.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/invalid_config.json
16
+ integration_tests/sample_config.json
17
+ integration_tests/sample_state.json
18
+ source_adjust/__init__.py
19
+ source_adjust/model.py
20
+ source_adjust/run.py
21
+ source_adjust/source.py
22
+ source_adjust/spec.yaml
23
+ unit_tests/__init__.py
24
+ unit_tests/test_incremental_streams.py
25
+ unit_tests/test_source.py
26
+ unit_tests/test_streams.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ source-adjust = source_adjust.run:run
@@ -0,0 +1,6 @@
1
+ airbyte-cdk~=0.1
2
+
3
+ [tests]
4
+ requests-mock~=1.9.3
5
+ pytest~=6.1
6
+ pytest-mock~=3.6.1
@@ -0,0 +1,3 @@
1
+ integration_tests
2
+ source_adjust
3
+ unit_tests
@@ -0,0 +1,3 @@
1
+ #
2
+ # Copyright (c) 2023 Airbyte, Inc., all rights reserved.
3
+ #
@@ -0,0 +1,5 @@
1
+ {
2
+ "adjust_report_stream": {
3
+ "day": "2050-01-01"
4
+ }
5
+ }
@@ -0,0 +1,14 @@
1
+ #
2
+ # Copyright (c) 2023 Airbyte, Inc., all rights reserved.
3
+ #
4
+
5
+
6
+ import pytest
7
+
8
+ pytest_plugins = ("connector_acceptance_test.plugin",)
9
+
10
+
11
+ @pytest.fixture(scope="session", autouse=True)
12
+ def connector_setup():
13
+ """This fixture is a placeholder for external resources that acceptance test might require."""
14
+ yield
@@ -0,0 +1,43 @@
1
+ {
2
+ "streams": [
3
+ {
4
+ "name": "adjust_report_stream",
5
+ "supported_sync_modes": ["full_refresh", "incremental"],
6
+ "source_defined_cursor": true,
7
+ "default_cursor_field": "day",
8
+ "json_schema": {
9
+ "$schema": "http://json-schema.org/draft-07/schema#",
10
+ "type": "object",
11
+ "properties": {
12
+ "clicks": {
13
+ "title": "Clicks",
14
+ "description": "Clicks.",
15
+ "type": "integer"
16
+ },
17
+ "installs": {
18
+ "title": "Installs",
19
+ "description": "Installs.",
20
+ "type": "integer"
21
+ },
22
+ "day": {
23
+ "title": "Day",
24
+ "description": "Date.",
25
+ "type": "string",
26
+ "format": "date"
27
+ },
28
+ "app": {
29
+ "title": "App",
30
+ "description": "Name of the app.",
31
+ "type": "string"
32
+ },
33
+ "network": {
34
+ "title": "Network",
35
+ "description": "The name of the advertising network.",
36
+ "type": "string"
37
+ }
38
+ },
39
+ "required": ["day"]
40
+ }
41
+ }
42
+ ]
43
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "streams": [
3
+ {
4
+ "sync_mode": "incremental",
5
+ "destination_sync_mode": "append",
6
+ "stream": {
7
+ "name": "adjust_report_stream",
8
+ "json_schema": {
9
+ "title": "Report",
10
+ "type": "object",
11
+ "properties": {
12
+ "clicks": {
13
+ "title": "Clicks",
14
+ "description": "Clicks",
15
+ "type": "integer"
16
+ },
17
+ "installs": {
18
+ "title": "Installs",
19
+ "description": "Installs",
20
+ "type": "integer"
21
+ },
22
+ "day": {
23
+ "title": "Day",
24
+ "description": "Date.",
25
+ "type": "string",
26
+ "format": "date"
27
+ },
28
+ "app": {
29
+ "title": "App",
30
+ "description": "Name of the app.",
31
+ "type": "string"
32
+ },
33
+ "network": {
34
+ "title": "Network",
35
+ "description": "The name of the advertising network.",
36
+ "type": "string"
37
+ }
38
+ },
39
+ "required": ["day"],
40
+ "$schema": "http://json-schema.org/draft-07/schema#"
41
+ },
42
+ "supported_sync_modes": ["full_refresh", "incremental"]
43
+ }
44
+ }
45
+ ]
46
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "api_token": "invalid_token",
3
+ "ingest_start": "2022-07-07",
4
+ "metrics": ["installs", "clicks"],
5
+ "dimensions": ["app", "network"],
6
+ "additional_metrics": []
7
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "ingest_start": "2022-07-07",
3
+ "api_token": "token",
4
+ "metrics": ["installs", "clicks"],
5
+ "dimensions": ["app", "network"],
6
+ "additional_metrics": [],
7
+ "until_today": true
8
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "adjust_report_stream": {
3
+ "day": "2022-07-07"
4
+ }
5
+ }
@@ -0,0 +1,88 @@
1
+ [metadata]
2
+ name = airbyte-source-adjust
3
+ version = 0.1.0
4
+ author = Airbyte
5
+ author_email = contact@airbyte.io
6
+ long_description = # Adjust Source
7
+
8
+ This is the repository for the Adjust source connector, written in Python.
9
+ For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/adjust).
10
+
11
+
12
+ **To iterate on this connector, make sure to complete this prerequisites section.**
13
+
14
+
15
+ From this connector directory, create a virtual environment:
16
+ ```
17
+ python -m venv .venv
18
+ ```
19
+
20
+ This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your
21
+ development environment of choice. To activate it from the terminal, run:
22
+ ```
23
+ source .venv/bin/activate
24
+ pip install -r requirements.txt
25
+ pip install '.[tests]'
26
+ ```
27
+ If you are in an IDE, follow your IDE's instructions to activate the virtualenv.
28
+
29
+ Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is
30
+ used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`.
31
+ If this is mumbo jumbo to you, don't worry about it, just put your deps in `setup.py` but install using `pip install -r requirements.txt` and everything
32
+ should work as you expect.
33
+
34
+ **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/adjust)
35
+ to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_adjust/spec.yaml` file.
36
+ Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
37
+ See `integration_tests/sample_config.json` for a sample config file.
38
+
39
+ **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source adjust test creds`
40
+ and place them into `secrets/config.json`.
41
+
42
+ ```
43
+ python main.py spec
44
+ python main.py check --config secrets/config.json
45
+ python main.py discover --config secrets/config.json
46
+ python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
47
+ ```
48
+
49
+
50
+
51
+ **Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):**
52
+ ```bash
53
+ airbyte-ci connectors --name source-adjust build
54
+ ```
55
+
56
+ An image will be built with the tag `airbyte/source-adjust:dev`.
57
+
58
+ **Via `docker build`:**
59
+ ```bash
60
+ docker build -t airbyte/source-adjust:dev .
61
+ ```
62
+
63
+ Then run any of the connector commands as follows:
64
+ ```
65
+ docker run --rm airbyte/source-adjust:dev spec
66
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-adjust:dev check --config /secrets/config.json
67
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-adjust:dev discover --config /secrets/config.json
68
+ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-adjust:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
69
+ ```
70
+
71
+ You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
72
+ ```bash
73
+ airbyte-ci connectors --name=source-adjust test
74
+ ```
75
+
76
+ 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.
77
+ 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.
78
+
79
+ 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.
80
+ We split dependencies between two groups, dependencies that are:
81
+ * required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
82
+ * required for the testing need to go to `TEST_REQUIREMENTS` list
83
+ long_description_content_type = text/markdown
84
+
85
+ [egg_info]
86
+ tag_build =
87
+ tag_date = 0
88
+
@@ -0,0 +1,43 @@
1
+ #
2
+ # Copyright (c) 2023 Airbyte, Inc., all rights reserved.
3
+ #
4
+
5
+
6
+ from setuptools import find_packages, setup
7
+
8
+ MAIN_REQUIREMENTS = [
9
+ "airbyte-cdk~=0.1",
10
+ ]
11
+
12
+ TEST_REQUIREMENTS = [
13
+ "requests-mock~=1.9.3",
14
+ "pytest~=6.1",
15
+ "pytest-mock~=3.6.1",
16
+ ]
17
+
18
+ setup(
19
+ entry_points={
20
+ "console_scripts": [
21
+ "source-adjust=source_adjust.run:run",
22
+ ],
23
+ },
24
+ description="Source implementation for Adjust.",
25
+ packages=find_packages(),
26
+ install_requires=MAIN_REQUIREMENTS,
27
+ package_data={
28
+ "": [
29
+ # Include yaml files in the package (if any)
30
+ "*.yml",
31
+ "*.yaml",
32
+ # Include all json files in the package, up to 4 levels deep
33
+ "*.json",
34
+ "*/*.json",
35
+ "*/*/*.json",
36
+ "*/*/*/*.json",
37
+ "*/*/*/*/*.json",
38
+ ]
39
+ },
40
+ extras_require={
41
+ "tests": TEST_REQUIREMENTS,
42
+ },
43
+ )
@@ -0,0 +1,8 @@
1
+ #
2
+ # Copyright (c) 2023 Airbyte, Inc., all rights reserved.
3
+ #
4
+
5
+
6
+ from .source import SourceAdjust
7
+
8
+ __all__ = ["SourceAdjust"]