Skip to content

Commit f5f9fc0

Browse files
Source Persistiq: Chenged last records to last record (#37596)
Co-authored-by: Octavia Squidington III <[email protected]>
1 parent a4141f5 commit f5f9fc0

File tree

12 files changed

+1479
-1124
lines changed

12 files changed

+1479
-1124
lines changed

airbyte-integrations/connectors/source-persistiq/Dockerfile

-38
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,59 @@
1-
# Persistiq Source
1+
# Persistiq source connector
22

3-
This is the repository for the Persistiq configuration based source connector.
3+
This is the repository for the Persistiq source connector, written in Python.
44
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/persistiq).
55

66
## Local development
77

8-
#### Create credentials
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
922

1023
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/persistiq)
1124
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_persistiq/spec.yaml` file.
1225
Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
13-
See `integration_tests/sample_config.json` for a sample config file.
26+
See `sample_files/sample_config.json` for a sample config file.
1427

15-
**If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source persistiq test creds`
16-
and place them into `secrets/config.json`.
28+
### Locally running the connector
1729

18-
### Locally running the connector docker image
30+
```
31+
poetry run source-persistiq spec
32+
poetry run source-persistiq check --config secrets/config.json
33+
poetry run source-persistiq discover --config secrets/config.json
34+
poetry run source-persistiq read --config secrets/config.json --catalog sample_files/configured_catalog.json
35+
```
1936

20-
#### Build
37+
### Running unit tests
2138

22-
**Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):**
39+
To run unit tests locally, from the connector directory run:
2340

24-
```bash
25-
airbyte-ci connectors --name=source-persistiq build
41+
```
42+
poetry run pytest unit_tests
2643
```
2744

28-
An image will be built with the tag `airbyte/source-persistiq:dev`.
45+
### Building the docker image
2946

30-
**Via `docker build`:**
47+
1. Install [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md)
48+
2. Run the following command to build the docker image:
3149

3250
```bash
33-
docker build -t airbyte/source-persistiq:dev .
51+
airbyte-ci connectors --name=source-persistiq build
3452
```
3553

36-
#### Run
54+
An image will be available on your host with the tag `airbyte/source-persistiq:dev`.
55+
56+
### Running as a docker container
3757

3858
Then run any of the connector commands as follows:
3959

@@ -44,7 +64,7 @@ docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-persistiq:dev discover
4464
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-persistiq:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
4565
```
4666

47-
## Testing
67+
### Running our CI test suite
4868

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

@@ -54,25 +74,31 @@ airbyte-ci connectors --name=source-persistiq test
5474

5575
### Customizing acceptance Tests
5676

57-
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+
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.
5878
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.
5979

60-
## Dependency Management
80+
### Dependency Management
81+
82+
All of your dependencies should be managed via Poetry.
83+
To add a new dependency, run:
6184

62-
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.
63-
We split dependencies between two groups, dependencies that are:
85+
```bash
86+
poetry add <package-name>
87+
```
6488

65-
- required for your connector to work need to go to `MAIN_REQUIREMENTS` list.
66-
- required for the testing need to go to `TEST_REQUIREMENTS` list
89+
Please commit the changes to `pyproject.toml` and `poetry.lock` files.
6790

68-
### Publishing a new version of the connector
91+
## Publishing a new version of the connector
6992

7093
You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
7194

7295
1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-persistiq test`
73-
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).
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 `metadata.yaml`
98+
- bump the `version` value in `pyproject.toml`
7499
3. Make sure the `metadata.yaml` content is up to date.
75-
4. Make the connector documentation and its changelog is up to date (`docs/integrations/sources/persistiq.md`).
100+
4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/persistiq.md`).
76101
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).
77102
6. Pat yourself on the back for being an awesome contributor.
78103
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.

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ data:
22
allowedHosts:
33
hosts:
44
- api.persistiq.com
5+
connectorBuildOptions:
6+
baseImage: docker.io/airbyte/python-connector-base:1.2.0@sha256:c22a9d97464b69d6ef01898edf3f8612dc11614f05a84984451dde195f337db9
57
remoteRegistries:
68
pypi:
79
enabled: true
@@ -14,7 +16,7 @@ data:
1416
connectorSubtype: api
1517
connectorType: source
1618
definitionId: 3052c77e-8b91-47e2-97a0-a29a22794b4b
17-
dockerImageTag: 0.2.0
19+
dockerImageTag: 0.2.1
1820
dockerRepository: airbyte/source-persistiq
1921
githubIssueLabel: source-persistiq
2022
icon: persistiq.svg

0 commit comments

Comments
 (0)