airbyte-source-google-directory 0.2.1__tar.gz → 0.2.2__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 (30) hide show
  1. airbyte_source_google_directory-0.2.2/PKG-INFO +114 -0
  2. airbyte_source_google_directory-0.2.2/README.md +91 -0
  3. airbyte_source_google_directory-0.2.2/pyproject.toml +37 -0
  4. airbyte-source-google-directory-0.2.1/PKG-INFO +0 -103
  5. airbyte-source-google-directory-0.2.1/README.md +0 -100
  6. airbyte-source-google-directory-0.2.1/airbyte_source_google_directory.egg-info/PKG-INFO +0 -103
  7. airbyte-source-google-directory-0.2.1/airbyte_source_google_directory.egg-info/SOURCES.txt +0 -26
  8. airbyte-source-google-directory-0.2.1/airbyte_source_google_directory.egg-info/dependency_links.txt +0 -1
  9. airbyte-source-google-directory-0.2.1/airbyte_source_google_directory.egg-info/entry_points.txt +0 -2
  10. airbyte-source-google-directory-0.2.1/airbyte_source_google_directory.egg-info/requires.txt +0 -10
  11. airbyte-source-google-directory-0.2.1/airbyte_source_google_directory.egg-info/top_level.txt +0 -2
  12. airbyte-source-google-directory-0.2.1/integration_tests/__init__.py +0 -3
  13. airbyte-source-google-directory-0.2.1/integration_tests/acceptance.py +0 -14
  14. airbyte-source-google-directory-0.2.1/integration_tests/configured_catalog.json +0 -40
  15. airbyte-source-google-directory-0.2.1/integration_tests/invalid_config.json +0 -4
  16. airbyte-source-google-directory-0.2.1/integration_tests/invalid_config_oauth.json +0 -7
  17. airbyte-source-google-directory-0.2.1/integration_tests/sample_config.json +0 -6
  18. airbyte-source-google-directory-0.2.1/integration_tests/sample_config_oauth.json +0 -7
  19. airbyte-source-google-directory-0.2.1/setup.cfg +0 -97
  20. airbyte-source-google-directory-0.2.1/setup.py +0 -47
  21. {airbyte-source-google-directory-0.2.1 → airbyte_source_google_directory-0.2.2}/source_google_directory/__init__.py +0 -0
  22. {airbyte-source-google-directory-0.2.1 → airbyte_source_google_directory-0.2.2}/source_google_directory/api.py +0 -0
  23. {airbyte-source-google-directory-0.2.1 → airbyte_source_google_directory-0.2.2}/source_google_directory/client.py +0 -0
  24. {airbyte-source-google-directory-0.2.1 → airbyte_source_google_directory-0.2.2}/source_google_directory/run.py +0 -0
  25. {airbyte-source-google-directory-0.2.1 → airbyte_source_google_directory-0.2.2}/source_google_directory/schemas/group_members.json +0 -0
  26. {airbyte-source-google-directory-0.2.1 → airbyte_source_google_directory-0.2.2}/source_google_directory/schemas/groups.json +0 -0
  27. {airbyte-source-google-directory-0.2.1 → airbyte_source_google_directory-0.2.2}/source_google_directory/schemas/users.json +0 -0
  28. {airbyte-source-google-directory-0.2.1 → airbyte_source_google_directory-0.2.2}/source_google_directory/source.py +0 -0
  29. {airbyte-source-google-directory-0.2.1 → airbyte_source_google_directory-0.2.2}/source_google_directory/spec.json +0 -0
  30. {airbyte-source-google-directory-0.2.1 → airbyte_source_google_directory-0.2.2}/source_google_directory/utils.py +0 -0
@@ -0,0 +1,114 @@
1
+ Metadata-Version: 2.1
2
+ Name: airbyte-source-google-directory
3
+ Version: 0.2.2
4
+ Summary: Source implementation for Google Directory.
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.80.0)
16
+ Requires-Dist: backoff (==1.10.0)
17
+ Requires-Dist: google-api-python-client (==1.12.8)
18
+ Requires-Dist: google-auth-httplib2 (==0.0.4)
19
+ Requires-Dist: google-auth-oauthlib (==0.4.2)
20
+ Project-URL: Documentation, https://docs.airbyte.com/integrations/sources/google-directory
21
+ Project-URL: Repository, https://github.com/airbytehq/airbyte
22
+ Description-Content-Type: text/markdown
23
+
24
+ # Google-Directory source connector
25
+
26
+
27
+ This is the repository for the Google-Directory source connector, written in Python.
28
+ For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/google-directory).
29
+
30
+ ## Local development
31
+
32
+ ### Prerequisites
33
+ * Python (~=3.9)
34
+ * Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation)
35
+
36
+
37
+ ### Installing the connector
38
+ From this connector directory, run:
39
+ ```bash
40
+ poetry install --with dev
41
+ ```
42
+
43
+
44
+ ### Create credentials
45
+ **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/google-directory)
46
+ to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_google_directory/spec.yaml` file.
47
+ Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
48
+ See `sample_files/sample_config.json` for a sample config file.
49
+
50
+
51
+ ### Locally running the connector
52
+ ```
53
+ poetry run source-google-directory spec
54
+ poetry run source-google-directory check --config secrets/config.json
55
+ poetry run source-google-directory discover --config secrets/config.json
56
+ poetry run source-google-directory read --config secrets/config.json --catalog sample_files/configured_catalog.json
57
+ ```
58
+
59
+ ### Running unit tests
60
+ To run unit tests locally, from the connector directory run:
61
+ ```
62
+ poetry run pytest unit_tests
63
+ ```
64
+
65
+ ### Building the docker image
66
+ 1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md)
67
+ 2. Run the following command to build the docker image:
68
+ ```bash
69
+ airbyte-ci connectors --name=source-google-directory build
70
+ ```
71
+
72
+ An image will be available on your host with the tag `airbyte/source-google-directory:dev`.
73
+
74
+
75
+ ### Running as a docker container
76
+ Then run any of the connector commands as follows:
77
+ ```
78
+ docker run --rm airbyte/source-google-directory:dev spec
79
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-google-directory:dev check --config /secrets/config.json
80
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-google-directory:dev discover --config /secrets/config.json
81
+ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-google-directory:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
82
+ ```
83
+
84
+ ### Running our CI test suite
85
+ You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
86
+ ```bash
87
+ airbyte-ci connectors --name=source-google-directory test
88
+ ```
89
+
90
+ ### Customizing acceptance Tests
91
+ 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.
92
+ 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.
93
+
94
+ ### Dependency Management
95
+ All of your dependencies should be managed via Poetry.
96
+ To add a new dependency, run:
97
+ ```bash
98
+ poetry add <package-name>
99
+ ```
100
+
101
+ Please commit the changes to `pyproject.toml` and `poetry.lock` files.
102
+
103
+ ## Publishing a new version of the connector
104
+ You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
105
+ 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-google-directory test`
106
+ 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)):
107
+ - bump the `dockerImageTag` value in in `metadata.yaml`
108
+ - bump the `version` value in `pyproject.toml`
109
+ 3. Make sure the `metadata.yaml` content is up to date.
110
+ 4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/google-directory.md`).
111
+ 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).
112
+ 6. Pat yourself on the back for being an awesome contributor.
113
+ 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
114
+ 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
+ # Google-Directory source connector
2
+
3
+
4
+ This is the repository for the Google-Directory 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/google-directory).
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/google-directory)
23
+ to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_google_directory/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-google-directory spec
31
+ poetry run source-google-directory check --config secrets/config.json
32
+ poetry run source-google-directory discover --config secrets/config.json
33
+ poetry run source-google-directory 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-google-directory build
47
+ ```
48
+
49
+ An image will be available on your host with the tag `airbyte/source-google-directory: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-google-directory:dev spec
56
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-google-directory:dev check --config /secrets/config.json
57
+ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-google-directory:dev discover --config /secrets/config.json
58
+ docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-google-directory: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-google-directory 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-google-directory 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/google-directory.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,37 @@
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.2.2"
9
+ name = "airbyte-source-google-directory"
10
+ description = "Source implementation for Google Directory."
11
+ authors = [
12
+ "Airbyte <contact@airbyte.io>",
13
+ ]
14
+ license = "MIT"
15
+ readme = "README.md"
16
+ documentation = "https://docs.airbyte.com/integrations/sources/google-directory"
17
+ homepage = "https://airbyte.com"
18
+ repository = "https://github.com/airbytehq/airbyte"
19
+ packages = [
20
+ { include = "source_google_directory" },
21
+ ]
22
+
23
+ [tool.poetry.dependencies]
24
+ python = "^3.9,<3.12"
25
+ google-auth-oauthlib = "==0.4.2"
26
+ google-auth-httplib2 = "==0.0.4"
27
+ google-api-python-client = "==1.12.8"
28
+ airbyte-cdk = "0.80.0"
29
+ backoff = "==1.10.0"
30
+
31
+ [tool.poetry.scripts]
32
+ source-google-directory = "source_google_directory.run:run"
33
+
34
+ [tool.poetry.group.dev.dependencies]
35
+ pytest-mock = "^3.6.1"
36
+ requests-mock = "^1.9.3"
37
+ pytest = "^6.1"
@@ -1,103 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: airbyte-source-google-directory
3
- Version: 0.2.1
4
- Summary: Source implementation for Google Directory.
5
- Author: Airbyte
6
- Author-email: contact@airbyte.io
7
- Description-Content-Type: text/markdown
8
- Requires-Dist: airbyte-cdk~=0.1
9
- Requires-Dist: google-api-python-client==1.12.8
10
- Requires-Dist: google-auth-httplib2==0.0.4
11
- Requires-Dist: google-auth-oauthlib==0.4.2
12
- Requires-Dist: backoff==1.10.0
13
- Provides-Extra: tests
14
- Requires-Dist: requests-mock~=1.9.3; extra == "tests"
15
- Requires-Dist: pytest~=6.1; extra == "tests"
16
- Requires-Dist: pytest-mock~=3.6.1; extra == "tests"
17
-
18
- # Freshsales Source
19
-
20
- This is the repository for the Freshsales source connector, written in Python.
21
- For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/freshsales).
22
-
23
-
24
- **To iterate on this connector, make sure to complete this prerequisites section.**
25
-
26
-
27
- From this connector directory, create a virtual environment:
28
- ```
29
- python -m venv .venv
30
- ```
31
-
32
- This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your
33
- development environment of choice. To activate it from the terminal, run:
34
- ```
35
- source .venv/bin/activate
36
- pip install -r requirements.txt
37
- pip install '.[tests]'
38
- ```
39
- If you are in an IDE, follow your IDE's instructions to activate the virtualenv.
40
-
41
- Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is
42
- used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`.
43
- 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
44
- should work as you expect.
45
-
46
- **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/freshsales)
47
- to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_freshsales/spec.json` file.
48
- Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
49
- See `integration_tests/sample_config.json` for a sample config file.
50
-
51
- **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source freshsales test creds`
52
- and place them into `secrets/config.json`.
53
-
54
- ```
55
- python main.py spec
56
- python main.py check --config secrets/config.json
57
- python main.py discover --config secrets/config.json
58
- python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
59
- ```
60
-
61
-
62
-
63
- **Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):**
64
- ```bash
65
- airbyte-ci connectors --name source-freshsales build
66
- ```
67
-
68
- An image will be built with the tag `airbyte/source-freshsales:dev`.
69
-
70
- **Via `docker build`:**
71
- ```bash
72
- docker build -t airbyte/source-freshsales:dev .
73
- ```
74
-
75
- Then run any of the connector commands as follows:
76
- ```
77
- docker run --rm airbyte/source-freshsales:dev spec
78
- docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-freshsales:dev check --config /secrets/config.json
79
- docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-freshsales:dev discover --config /secrets/config.json
80
- docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-freshsales:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
81
- ```
82
-
83
- You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
84
- ```bash
85
- airbyte-ci connectors --name=source-google-directory test
86
- ```
87
-
88
- 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.
89
- 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.
90
-
91
- 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.
92
- We split dependencies between two groups, dependencies that are:
93
- * required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
94
- * required for the testing need to go to `TEST_REQUIREMENTS` list
95
-
96
- You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
97
- 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-google-directory test`
98
- 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).
99
- 3. Make sure the `metadata.yaml` content is up to date.
100
- 4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/google-directory.md`).
101
- 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).
102
- 6. Pat yourself on the back for being an awesome contributor.
103
- 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
@@ -1,100 +0,0 @@
1
- # Freshsales Source
2
-
3
- This is the repository for the Freshsales 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/freshsales).
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.7.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/freshsales)
35
- to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_freshsales/spec.json` 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 freshsales 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-freshsales build
57
- ```
58
-
59
- An image will be built with the tag `airbyte/source-freshsales:dev`.
60
-
61
- **Via `docker build`:**
62
- ```bash
63
- docker build -t airbyte/source-freshsales:dev .
64
- ```
65
-
66
- #### Run
67
- Then run any of the connector commands as follows:
68
- ```
69
- docker run --rm airbyte/source-freshsales:dev spec
70
- docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-freshsales:dev check --config /secrets/config.json
71
- docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-freshsales:dev discover --config /secrets/config.json
72
- docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-freshsales: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-google-directory 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
90
-
91
- ### Publishing a new version of the connector
92
- You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
93
- 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-google-directory test`
94
- 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).
95
- 3. Make sure the `metadata.yaml` content is up to date.
96
- 4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/google-directory.md`).
97
- 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).
98
- 6. Pat yourself on the back for being an awesome contributor.
99
- 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
100
-
@@ -1,103 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: airbyte-source-google-directory
3
- Version: 0.2.1
4
- Summary: Source implementation for Google Directory.
5
- Author: Airbyte
6
- Author-email: contact@airbyte.io
7
- Description-Content-Type: text/markdown
8
- Requires-Dist: airbyte-cdk~=0.1
9
- Requires-Dist: google-api-python-client==1.12.8
10
- Requires-Dist: google-auth-httplib2==0.0.4
11
- Requires-Dist: google-auth-oauthlib==0.4.2
12
- Requires-Dist: backoff==1.10.0
13
- Provides-Extra: tests
14
- Requires-Dist: requests-mock~=1.9.3; extra == "tests"
15
- Requires-Dist: pytest~=6.1; extra == "tests"
16
- Requires-Dist: pytest-mock~=3.6.1; extra == "tests"
17
-
18
- # Freshsales Source
19
-
20
- This is the repository for the Freshsales source connector, written in Python.
21
- For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/freshsales).
22
-
23
-
24
- **To iterate on this connector, make sure to complete this prerequisites section.**
25
-
26
-
27
- From this connector directory, create a virtual environment:
28
- ```
29
- python -m venv .venv
30
- ```
31
-
32
- This will generate a virtualenv for this module in `.venv/`. Make sure this venv is active in your
33
- development environment of choice. To activate it from the terminal, run:
34
- ```
35
- source .venv/bin/activate
36
- pip install -r requirements.txt
37
- pip install '.[tests]'
38
- ```
39
- If you are in an IDE, follow your IDE's instructions to activate the virtualenv.
40
-
41
- Note that while we are installing dependencies from `requirements.txt`, you should only edit `setup.py` for your dependencies. `requirements.txt` is
42
- used for editable installs (`pip install -e`) to pull in Python dependencies from the monorepo and will call `setup.py`.
43
- 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
44
- should work as you expect.
45
-
46
- **If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/freshsales)
47
- to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_freshsales/spec.json` file.
48
- Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
49
- See `integration_tests/sample_config.json` for a sample config file.
50
-
51
- **If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source freshsales test creds`
52
- and place them into `secrets/config.json`.
53
-
54
- ```
55
- python main.py spec
56
- python main.py check --config secrets/config.json
57
- python main.py discover --config secrets/config.json
58
- python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
59
- ```
60
-
61
-
62
-
63
- **Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):**
64
- ```bash
65
- airbyte-ci connectors --name source-freshsales build
66
- ```
67
-
68
- An image will be built with the tag `airbyte/source-freshsales:dev`.
69
-
70
- **Via `docker build`:**
71
- ```bash
72
- docker build -t airbyte/source-freshsales:dev .
73
- ```
74
-
75
- Then run any of the connector commands as follows:
76
- ```
77
- docker run --rm airbyte/source-freshsales:dev spec
78
- docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-freshsales:dev check --config /secrets/config.json
79
- docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-freshsales:dev discover --config /secrets/config.json
80
- docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-freshsales:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
81
- ```
82
-
83
- You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
84
- ```bash
85
- airbyte-ci connectors --name=source-google-directory test
86
- ```
87
-
88
- 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.
89
- 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.
90
-
91
- 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.
92
- We split dependencies between two groups, dependencies that are:
93
- * required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
94
- * required for the testing need to go to `TEST_REQUIREMENTS` list
95
-
96
- You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
97
- 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-google-directory test`
98
- 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).
99
- 3. Make sure the `metadata.yaml` content is up to date.
100
- 4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/google-directory.md`).
101
- 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).
102
- 6. Pat yourself on the back for being an awesome contributor.
103
- 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
@@ -1,26 +0,0 @@
1
- README.md
2
- setup.cfg
3
- setup.py
4
- airbyte_source_google_directory.egg-info/PKG-INFO
5
- airbyte_source_google_directory.egg-info/SOURCES.txt
6
- airbyte_source_google_directory.egg-info/dependency_links.txt
7
- airbyte_source_google_directory.egg-info/entry_points.txt
8
- airbyte_source_google_directory.egg-info/requires.txt
9
- airbyte_source_google_directory.egg-info/top_level.txt
10
- integration_tests/__init__.py
11
- integration_tests/acceptance.py
12
- integration_tests/configured_catalog.json
13
- integration_tests/invalid_config.json
14
- integration_tests/invalid_config_oauth.json
15
- integration_tests/sample_config.json
16
- integration_tests/sample_config_oauth.json
17
- source_google_directory/__init__.py
18
- source_google_directory/api.py
19
- source_google_directory/client.py
20
- source_google_directory/run.py
21
- source_google_directory/source.py
22
- source_google_directory/spec.json
23
- source_google_directory/utils.py
24
- source_google_directory/schemas/group_members.json
25
- source_google_directory/schemas/groups.json
26
- source_google_directory/schemas/users.json
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- source-google-directory = source_google_directory.run:run
@@ -1,10 +0,0 @@
1
- airbyte-cdk~=0.1
2
- google-api-python-client==1.12.8
3
- google-auth-httplib2==0.0.4
4
- google-auth-oauthlib==0.4.2
5
- backoff==1.10.0
6
-
7
- [tests]
8
- requests-mock~=1.9.3
9
- pytest~=6.1
10
- pytest-mock~=3.6.1
@@ -1,2 +0,0 @@
1
- integration_tests
2
- source_google_directory
@@ -1,3 +0,0 @@
1
- #
2
- # Copyright (c) 2023 Airbyte, Inc., all rights reserved.
3
- #
@@ -1,14 +0,0 @@
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
@@ -1,40 +0,0 @@
1
- {
2
- "streams": [
3
- {
4
- "stream": {
5
- "name": "users",
6
- "json_schema": {},
7
- "supported_sync_modes": ["full_refresh"],
8
- "source_defined_cursor": false,
9
- "source_defined_primary_key": [["id"]]
10
- },
11
- "sync_mode": "full_refresh",
12
- "destination_sync_mode": "overwrite",
13
- "primary_key": [["id"]]
14
- },
15
- {
16
- "stream": {
17
- "name": "groups",
18
- "json_schema": {},
19
- "supported_sync_modes": ["full_refresh"],
20
- "source_defined_cursor": false,
21
- "source_defined_primary_key": [["id"]]
22
- },
23
- "sync_mode": "full_refresh",
24
- "destination_sync_mode": "overwrite",
25
- "primary_key": [["id"]]
26
- },
27
- {
28
- "stream": {
29
- "name": "group_members",
30
- "json_schema": {},
31
- "supported_sync_modes": ["full_refresh"],
32
- "source_defined_cursor": false,
33
- "source_defined_primary_key": [["id"]]
34
- },
35
- "sync_mode": "full_refresh",
36
- "destination_sync_mode": "overwrite",
37
- "primary_key": [["id"]]
38
- }
39
- ]
40
- }
@@ -1,4 +0,0 @@
1
- {
2
- "credentials_json": "{}",
3
- "email": "test@test.test"
4
- }
@@ -1,7 +0,0 @@
1
- {
2
- "credentials": {
3
- "client_id": "<invalid_client_id>",
4
- "client_secret": "<invalid_client_secret>",
5
- "refresh_token": "<invalid_refresh_token>"
6
- }
7
- }
@@ -1,6 +0,0 @@
1
- {
2
- "credentials": {
3
- "credentials_json": "<The contents of the JSON service account key>",
4
- "email": "test@test.test"
5
- }
6
- }
@@ -1,7 +0,0 @@
1
- {
2
- "credentials": {
3
- "client_id": "<Client ID>",
4
- "client_secret": "<Client secret>",
5
- "refresh_token": "<Refresh token>"
6
- }
7
- }
@@ -1,97 +0,0 @@
1
- [metadata]
2
- name = airbyte-source-google-directory
3
- version = 0.2.1
4
- author = Airbyte
5
- author_email = contact@airbyte.io
6
- long_description = # Freshsales Source
7
-
8
- This is the repository for the Freshsales 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/freshsales).
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/freshsales)
35
- to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_freshsales/spec.json` 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 freshsales 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-freshsales build
54
- ```
55
-
56
- An image will be built with the tag `airbyte/source-freshsales:dev`.
57
-
58
- **Via `docker build`:**
59
- ```bash
60
- docker build -t airbyte/source-freshsales:dev .
61
- ```
62
-
63
- Then run any of the connector commands as follows:
64
- ```
65
- docker run --rm airbyte/source-freshsales:dev spec
66
- docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-freshsales:dev check --config /secrets/config.json
67
- docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-freshsales:dev discover --config /secrets/config.json
68
- docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-freshsales: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-google-directory 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
-
84
- You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
85
- 1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-google-directory test`
86
- 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).
87
- 3. Make sure the `metadata.yaml` content is up to date.
88
- 4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/google-directory.md`).
89
- 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).
90
- 6. Pat yourself on the back for being an awesome contributor.
91
- 7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
92
- long_description_content_type = text/markdown
93
-
94
- [egg_info]
95
- tag_build =
96
- tag_date = 0
97
-
@@ -1,47 +0,0 @@
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
- "google-api-python-client==1.12.8",
11
- "google-auth-httplib2==0.0.4",
12
- "google-auth-oauthlib==0.4.2",
13
- "backoff==1.10.0",
14
- ]
15
-
16
- TEST_REQUIREMENTS = [
17
- "requests-mock~=1.9.3",
18
- "pytest~=6.1",
19
- "pytest-mock~=3.6.1",
20
- ]
21
-
22
- setup(
23
- entry_points={
24
- "console_scripts": [
25
- "source-google-directory=source_google_directory.run:run",
26
- ],
27
- },
28
- description="Source implementation for Google Directory.",
29
- packages=find_packages(),
30
- install_requires=MAIN_REQUIREMENTS,
31
- package_data={
32
- "": [
33
- # Include yaml files in the package (if any)
34
- "*.yml",
35
- "*.yaml",
36
- # Include all json files in the package, up to 4 levels deep
37
- "*.json",
38
- "*/*.json",
39
- "*/*/*.json",
40
- "*/*/*/*.json",
41
- "*/*/*/*/*.json",
42
- ]
43
- },
44
- extras_require={
45
- "tests": TEST_REQUIREMENTS,
46
- },
47
- )