Skip to content

Commit 5b3f6e6

Browse files
authored
Source insightly: Migrate to manifest-only (#44140)
1 parent 4f57bc3 commit 5b3f6e6

File tree

13 files changed

+11893
-5713
lines changed

13 files changed

+11893
-5713
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,22 @@
11
# Insightly source connector
22

3-
This is the repository for the Insightly 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/insightly).
3+
This directory contains the manifest-only connector for `source-insightly`.
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-
10-
- Python (~=3.9)
11-
- Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation)
12-
13-
### Installing the connector
14-
15-
From this connector directory, run:
16-
17-
```bash
18-
poetry install --with dev
19-
```
20-
21-
### Create credentials
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/insightly).
227

23-
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/insightly)
24-
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_insightly/spec.yaml` file.
25-
Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
26-
See `sample_files/sample_config.json` for a sample config file.
27-
28-
### Locally running the connector
29-
30-
```
31-
poetry run source-insightly spec
32-
poetry run source-insightly check --config secrets/config.json
33-
poetry run source-insightly discover --config secrets/config.json
34-
poetry run source-insightly read --config secrets/config.json --catalog sample_files/configured_catalog.json
35-
```
8+
## Local development
369

37-
### Running unit tests
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!
3813

39-
To run unit tests locally, from the connector directory run:
40-
41-
```
42-
poetry run pytest unit_tests
43-
```
14+
If you prefer to develop locally, you can follow the instructions below.
4415

4516
### Building the docker image
4617

18+
You can build any manifest-only connector with `airbyte-ci`:
19+
4720
1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md)
4821
2. Run the following command to build the docker image:
4922

@@ -53,52 +26,40 @@ airbyte-ci connectors --name=source-insightly build
5326

5427
An image will be available on your host with the tag `airbyte/source-insightly:dev`.
5528

29+
### Creating credentials
30+
31+
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/insightly)
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.
34+
5635
### Running as a docker container
5736

58-
Then run any of the connector commands as follows:
37+
Then run any of the standard source connector commands:
5938

60-
```
39+
```bash
6140
docker run --rm airbyte/source-insightly:dev spec
6241
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-insightly:dev check --config /secrets/config.json
6342
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-insightly:dev discover --config /secrets/config.json
6443
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-insightly:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
6544
```
6645

67-
### Running our CI test suite
46+
### Running the CI test suite
6847

6948
You can run our full test suite locally using [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md):
7049

7150
```bash
7251
airbyte-ci connectors --name=source-insightly test
7352
```
7453

75-
### Customizing acceptance Tests
76-
77-
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.
78-
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.
79-
80-
### Dependency Management
81-
82-
All of your dependencies should be managed via Poetry.
83-
To add a new dependency, run:
84-
85-
```bash
86-
poetry add <package-name>
87-
```
88-
89-
Please commit the changes to `pyproject.toml` and `poetry.lock` files.
90-
9154
## Publishing a new version of the connector
9255

93-
You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
94-
95-
1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-insightly test`
96-
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)):
97-
- bump the `dockerImageTag` value in in `metadata.yaml`
98-
- bump the `version` value in `pyproject.toml`
99-
3. Make sure the `metadata.yaml` content is up to date.
56+
If you want to contribute changes to `source-insightly`, 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-insightly 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)):
60+
- bump the `dockerImageTag` value in in `metadata.yaml`
10061
4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/insightly.md`).
10162
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).
10263
6. Pat yourself on the back for being an awesome contributor.
10364
7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
104-
8. Once your PR is merged, the new version of the connector will be automatically published to Docker Hub and our connector registry.
65+
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-insightly/__init__.py

-3
This file was deleted.

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

+25-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ connector_image: airbyte/source-insightly:dev
44
acceptance_tests:
55
spec:
66
tests:
7-
- spec_path: source_insightly/spec.json
7+
- spec_path: manifest.yaml
88
connection:
99
tests:
1010
- config_path: "secrets/config.json"
@@ -32,17 +32,29 @@ acceptance_tests:
3232
- name: project_categories
3333
bypass_reason: "no data for this stream in our sandbox account"
3434
- name: knowledge_article_categories
35-
bypass_reason: "current sandbox account does not have permissions to access this stream (403 error)"
35+
bypass_reason:
36+
"current sandbox account does not have permissions to access
37+
this stream (403 error)"
3638
- name: knowledge_article_folders
37-
bypass_reason: "current sandbox account does not have permissions to access this stream (403 error)"
39+
bypass_reason:
40+
"current sandbox account does not have permissions to access
41+
this stream (403 error)"
3842
- name: knowledge_articles
39-
bypass_reason: "current sandbox account does not have permissions to access this stream (403 error)"
43+
bypass_reason:
44+
"current sandbox account does not have permissions to access
45+
this stream (403 error)"
4046
- name: lead_sources
41-
bypass_reason: "current sandbox account does not have permissions to access this stream (403 error)"
47+
bypass_reason:
48+
"current sandbox account does not have permissions to access
49+
this stream (403 error)"
4250
- name: lead_statuses
43-
bypass_reason: "current sandbox account does not have permissions to access this stream (403 error)"
51+
bypass_reason:
52+
"current sandbox account does not have permissions to access
53+
this stream (403 error)"
4454
- name: prospects
45-
bypass_reason: "current sandbox account does not have permissions to access this stream (403 error)"
55+
bypass_reason:
56+
"current sandbox account does not have permissions to access
57+
this stream (403 error)"
4658

4759
full_refresh:
4860
tests:
@@ -51,10 +63,14 @@ acceptance_tests:
5163
ignored_fields:
5264
contacts:
5365
- name: "IMAGE_URL"
54-
bypass_reason: "image url is a dynamic s3 url with a changing expiration date in the query parameter"
66+
bypass_reason:
67+
"image url is a dynamic s3 url with a changing expiration
68+
date in the query parameter"
5569
organisations:
5670
- name: "IMAGE_URL"
57-
bypass_reason: "image url is a dynamic s3 url with a changing expiration date in the query parameter"
71+
bypass_reason:
72+
"image url is a dynamic s3 url with a changing expiration
73+
date in the query parameter"
5874
users:
5975
- name: "USER_CURRENCY"
6076
bypass_reason: "this can change between sequential reads"

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

-8
This file was deleted.

0 commit comments

Comments
 (0)