Skip to content

Commit ca95e64

Browse files
authored
Source oura: Migrate to manifest-only (#44409)
1 parent 99d3f80 commit ca95e64

File tree

13 files changed

+2258
-2385
lines changed

13 files changed

+2258
-2385
lines changed

airbyte-integrations/connectors/source-oura/README.md

+28-53
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,63 @@
11
# Oura source connector
22

3-
This is the repository for the Oura source connector, written in Python.
4-
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/oura).
3+
This directory contains the manifest-only connector for `source-oura`.
4+
This _manifest-only_ connector is not a Python package on its own, as it runs inside of the base `source-declarative-manifest` image.
55

6-
## Local development
7-
8-
### Prerequisites
9-
* Python (~=3.9)
10-
* Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation)
11-
12-
13-
### Installing the connector
14-
From this connector directory, run:
15-
```bash
16-
poetry install --with dev
17-
```
6+
For information about how to configure and use this connector within Airbyte, see [the connector's full documentation](https://docs.airbyte.com/integrations/sources/oura).
187

8+
## Local development
199

20-
### Create credentials
21-
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/oura)
22-
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_oura/spec.yaml` file.
23-
Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
24-
See `sample_files/sample_config.json` for a sample config file.
10+
We recommend using the Connector Builder to edit this connector.
11+
Using either Airbyte Cloud or your local Airbyte OSS instance, navigate to the **Builder** tab and select **Import a YAML**.
12+
Then select the connector's `manifest.yaml` file to load the connector into the Builder. You're now ready to make changes to the connector!
2513

14+
If you prefer to develop locally, you can follow the instructions below.
2615

27-
### Locally running the connector
28-
```
29-
poetry run source-oura spec
30-
poetry run source-oura check --config secrets/config.json
31-
poetry run source-oura discover --config secrets/config.json
32-
poetry run source-oura read --config secrets/config.json --catalog sample_files/configured_catalog.json
33-
```
16+
### Building the docker image
3417

35-
### Running unit tests
36-
To run unit tests locally, from the connector directory run:
37-
```
38-
poetry run pytest unit_tests
39-
```
18+
You can build any manifest-only connector with `airbyte-ci`:
4019

41-
### Building the docker image
4220
1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md)
4321
2. Run the following command to build the docker image:
22+
4423
```bash
4524
airbyte-ci connectors --name=source-oura build
4625
```
4726

4827
An image will be available on your host with the tag `airbyte/source-oura:dev`.
4928

29+
### Creating credentials
30+
31+
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/oura)
32+
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `spec` object in the connector's `manifest.yaml` file.
33+
Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
5034

5135
### Running as a docker container
52-
Then run any of the connector commands as follows:
53-
```
36+
37+
Then run any of the standard source connector commands:
38+
39+
```bash
5440
docker run --rm airbyte/source-oura:dev spec
5541
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-oura:dev check --config /secrets/config.json
5642
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-oura:dev discover --config /secrets/config.json
5743
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-oura:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
5844
```
5945

60-
### Running our CI test suite
61-
You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
62-
```bash
63-
airbyte-ci connectors --name=source-oura test
64-
```
46+
### Running the CI test suite
6547

66-
### Customizing acceptance Tests
67-
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.
68-
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.
48+
You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
6949

70-
### Dependency Management
71-
All of your dependencies should be managed via Poetry.
72-
To add a new dependency, run:
7350
```bash
74-
poetry add <package-name>
51+
airbyte-ci connectors --name=source-oura test
7552
```
7653

77-
Please commit the changes to `pyproject.toml` and `poetry.lock` files.
78-
7954
## Publishing a new version of the connector
80-
You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
81-
1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-oura test`
82-
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)):
55+
56+
If you want to contribute changes to `source-oura`, here's how you can do that:
57+
1. Make your changes locally, or load the connector's manifest into Connector Builder and make changes there.
58+
2. Make sure your changes are passing our test suite with `airbyte-ci connectors --name=source-oura test`
59+
3. 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)):
8360
- bump the `dockerImageTag` value in in `metadata.yaml`
84-
- bump the `version` value in `pyproject.toml`
85-
3. Make sure the `metadata.yaml` content is up to date.
8661
4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/oura.md`).
8762
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).
8863
6. Pat yourself on the back for being an awesome contributor.

airbyte-integrations/connectors/source-oura/__init__.py

-3
This file was deleted.

airbyte-integrations/connectors/source-oura/acceptance-test-config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
connector_image: airbyte/source-oura:dev
44
tests:
55
spec:
6-
- spec_path: "source_oura/spec.yaml"
6+
- spec_path: "manifest.yaml"
77
connection:
88
- config_path: "secrets/config.json"
99
status: "succeed"

airbyte-integrations/connectors/source-oura/main.py

-8
This file was deleted.

0 commit comments

Comments
 (0)