Skip to content

Commit 990e0c1

Browse files
authored
source-younium: ensure inline schemas, updated cdk, poetry (where possible) (#37298)
1 parent f47839f commit 990e0c1

File tree

12 files changed

+3995
-2016
lines changed

12 files changed

+3995
-2016
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,91 @@
1-
# Zapier Supported Storage Source
1+
# Younium source connector
22

3-
This is the repository for the Zapier Supported Storage configuration based source connector.
4-
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.io/integrations/sources/zapier-supported-storage).
3+
4+
This is the repository for the Younium 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/younium).
56

67
## Local development
78

8-
#### Create credentials
9-
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.io/integrations/sources/zapier-supported-storage)
10-
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_zapier_supported_storage/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.
9+
### Prerequisites
10+
* Python (~=3.9)
11+
* Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation)
1312

14-
**If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source zapier-supported-storage test creds`
15-
and place them into `secrets/config.json`.
1613

17-
### Locally running the connector docker image
14+
### Installing the connector
15+
From this connector directory, run:
16+
```bash
17+
poetry install --with dev
18+
```
1819

1920

20-
#### Build
21-
**Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):**
22-
```bash
23-
airbyte-ci connectors --name source-zapier-supported-storage build
21+
### Create credentials
22+
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/younium)
23+
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_younium/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-younium spec
31+
poetry run source-younium check --config secrets/config.json
32+
poetry run source-younium discover --config secrets/config.json
33+
poetry run source-younium read --config secrets/config.json --catalog sample_files/configured_catalog.json
2434
```
2535

26-
An image will be built with the tag `airbyte/source-zapier-supported-storage:dev`.
36+
### Running unit tests
37+
To run unit tests locally, from the connector directory run:
38+
```
39+
poetry run pytest unit_tests
40+
```
2741

28-
**Via `docker build`:**
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:
2945
```bash
30-
docker build -t airbyte/source-zapier-supported-storage:dev .
46+
airbyte-ci connectors --name=source-younium build
3147
```
3248

33-
#### Run
49+
An image will be available on your host with the tag `airbyte/source-younium:dev`.
50+
51+
52+
### Running as a docker container
3453
Then run any of the connector commands as follows:
3554
```
36-
docker run --rm airbyte/source-zapier-supported-storage:dev spec
37-
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-zapier-supported-storage:dev check --config /secrets/config.json
38-
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-zapier-supported-storage:dev discover --config /secrets/config.json
39-
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-zapier-supported-storage:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
55+
docker run --rm airbyte/source-younium:dev spec
56+
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-younium:dev check --config /secrets/config.json
57+
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-younium:dev discover --config /secrets/config.json
58+
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-younium:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
4059
```
4160

42-
## Testing
61+
### Running our CI test suite
4362
You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
4463
```bash
4564
airbyte-ci connectors --name=source-younium test
4665
```
4766

4867
### Customizing acceptance Tests
49-
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.
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.
5069
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.
5170

52-
## Dependency Management
53-
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.
54-
We split dependencies between two groups, dependencies that are:
55-
* required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
56-
* required for the testing need to go to `TEST_REQUIREMENTS` list
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+
```
5777

58-
### Publishing a new version of the connector
78+
Please commit the changes to `pyproject.toml` and `poetry.lock` files.
79+
80+
## Publishing a new version of the connector
5981
You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
6082
1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-younium test`
61-
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).
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`
6286
3. Make sure the `metadata.yaml` content is up to date.
63-
4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/younium.md`).
87+
4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/younium.md`).
6488
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).
6589
6. Pat yourself on the back for being an awesome contributor.
6690
7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
67-
91+
8. Once your PR is merged, the new version of the connector will be automatically published to Docker Hub and our connector registry.

airbyte-integrations/connectors/source-younium/metadata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ data:
1616
connectorSubtype: api
1717
connectorType: source
1818
definitionId: 9c74c2d7-531a-4ebf-b6d8-6181f805ecdc
19-
dockerImageTag: 0.3.0
19+
dockerImageTag: 0.3.2
2020
dockerRepository: airbyte/source-younium
2121
githubIssueLabel: source-younium
2222
icon: younium.svg

0 commit comments

Comments
 (0)