airbyte-source-adjust 0.1.0__py3-none-any.whl

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.
@@ -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,22 @@
1
+ integration_tests/__init__.py,sha256=4Hw-PX1-VgESLF16cDdvuYCzGJtHntThLF4qIiULWeo,61
2
+ integration_tests/abnormal_state.json,sha256=V245FAjrvmHLtDE4g1s6t3rCMilJPO8oPKmXDADjRUc,60
3
+ integration_tests/acceptance.py,sha256=VpQhkCpkovNSs0uLNh6iAdJ0WY-gYg0FbSBl8te_D0A,314
4
+ integration_tests/catalog.json,sha256=DHxAS7GbKrzhV5LXREFRaaBQ-3Y564lGLp8NWB_Y_pg,1120
5
+ integration_tests/configured_catalog.json,sha256=i2UgX6aWcajWa_y3Ed3L8OmgFKFhNkLHZjiJsGa8npw,1244
6
+ integration_tests/invalid_config.json,sha256=X892CbCrXn0wHKokXFst1uwk_NaEE7TTtHkMR0SGuKQ,168
7
+ integration_tests/sample_config.json,sha256=7CXTVr-m5CpZIqqs5-pYbEdkDWT5TGfRgZ0wNA5Eynw,183
8
+ integration_tests/sample_state.json,sha256=wT1TuP98LI4EnzU8qdpi9Lo0I96jMKtrlIf-oq5lc1g,60
9
+ source_adjust/__init__.py,sha256=LuXaC-rMCCwqhMSwgUMbtSPxV_MmnxPg0qEl6udpgLA,124
10
+ source_adjust/model.py,sha256=-9ytatS7vP-0xAxA-BPfiyg1Mp6wwF6i4QVy9xD4y6U,16117
11
+ source_adjust/run.py,sha256=8uxzbGLJVmGyqBoIll3t0mGHyPAEV4Uo1FwxDwnCJyM,230
12
+ source_adjust/source.py,sha256=bR_6xkHi9PGNtZAdeRww3hh8WGb8brDLkVy6QeoBiwk,7524
13
+ source_adjust/spec.yaml,sha256=42xW5rxlGRlZnNG7im0h5o-WS_sHmNlg6_lh139mzqk,4109
14
+ unit_tests/__init__.py,sha256=4Hw-PX1-VgESLF16cDdvuYCzGJtHntThLF4qIiULWeo,61
15
+ unit_tests/test_incremental_streams.py,sha256=-8hubFbXXG8rOmahh8SqAjJVp5KChBlEvXazgSvSwGs,1344
16
+ unit_tests/test_source.py,sha256=P4PhUNXtmeOgScw4KritgeVal9g0wEs5h9RQMC5I2Ms,594
17
+ unit_tests/test_streams.py,sha256=pFt3jNa38MvRRd5khgxkFUDKncHUhmSsRh08AtJdj5c,2333
18
+ airbyte_source_adjust-0.1.0.dist-info/METADATA,sha256=C07fECu3idbR5SueO-K5Rva3hH0hV2fXhLaZq8JExmg,4385
19
+ airbyte_source_adjust-0.1.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
20
+ airbyte_source_adjust-0.1.0.dist-info/entry_points.txt,sha256=4XXTNe8ZqB3IvEVtyc5oDTqe64vuR7FVMTL2OBQ2VGw,56
21
+ airbyte_source_adjust-0.1.0.dist-info/top_level.txt,sha256=YokJ47jax7mOVfc588DAST2eUCYRAmWN3orrGCaq16o,43
22
+ airbyte_source_adjust-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.42.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ source-adjust = source_adjust.run:run
@@ -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,8 @@
1
+ #
2
+ # Copyright (c) 2023 Airbyte, Inc., all rights reserved.
3
+ #
4
+
5
+
6
+ from .source import SourceAdjust
7
+
8
+ __all__ = ["SourceAdjust"]