Skip to content

🎉 New Source: Railz #20960

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 149 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from 126 commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
a3d3be8
railz pre tests
Allexik Dec 19, 2022
95e146d
test are set (except dicrovery none object error)
Allexik Jan 2, 2023
3fd2389
Merge branch 'master' into oleksandr/new-connector-railz-ai
Allexik Jan 2, 2023
8f7ecf4
added docs. updated spec
Allexik Jan 3, 2023
1f93138
added to builds.md
Allexik Jan 3, 2023
5b3228b
removed additional configs, basic report step set to 1 month. removed…
Allexik Jan 3, 2023
3e5a20b
returned removed streams. increased timeout_seconds. added square/sho…
Allexik Jan 4, 2023
cf00d53
removed bank_reconcilation
Allexik Jan 5, 2023
096e1ba
removed mistakenly added secrets
Allexik Jan 5, 2023
3689da2
added bootstrap.md. some edits in components.py by gradle builder
Allexik Jan 5, 2023
0a7662f
bank_transaction abnormal state replaced to monthly
Allexik Jan 5, 2023
8dcf1fd
Merge branch 'master' into oleksandr/new-connector-railz-ai
Allexik Jan 5, 2023
130c4fe
fixed schema totalAmount field (may be string)
Allexik Jan 5, 2023
021f782
updated docs/specs, added to source_specs.yaml
Allexik Jan 5, 2023
751a2f2
removed duplicate test for same endpoint with different parameters
Allexik Jan 6, 2023
bad73e5
Merge branch 'master' into oleksandr/new-connector-railz-ai
Allexik Jan 7, 2023
4ea1a65
upgraded to last changed in DatetimeStreamSlicer. Changed state from …
Allexik Jan 7, 2023
bb34368
extended timeout time for incremental tests
Allexik Jan 7, 2023
cfe5d18
only one complete configured_catalog
Allexik Jan 10, 2023
1ee2c4d
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Jan 18, 2023
6df21e9
AccessTokenAuthenticator added
grubberr Jan 18, 2023
50475ae
fix defaults
grubberr Jan 18, 2023
3d7b47c
Merge branch 'master' into grubberr/cdk-declarative-access-token-auth…
grubberr Jan 18, 2023
3f813b0
bump 0.21.1
grubberr Jan 18, 2023
11c1532
Merge branch 'master' into grubberr/cdk-declarative-access-token-auth…
grubberr Jan 19, 2023
77a9e62
test_get_tokens added
grubberr Jan 19, 2023
6fdd3b8
Merge branch 'master' into grubberr/cdk-declarative-access-token-auth…
grubberr Jan 19, 2023
9c20bf8
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Jan 19, 2023
7dd1902
Merge branch 'master' into grubberr/cdk-declarative-access-token-auth…
grubberr Jan 19, 2023
34c8810
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Jan 19, 2023
745775c
Merge branch 'grubberr/cdk-declarative-access-token-authenticator-2' …
grubberr Jan 19, 2023
749a57d
lint BOOTSTRAP.md
grubberr Jan 19, 2023
8e6537f
components.AccessTokenAuthenticator - removed
grubberr Jan 19, 2023
26b34d1
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Jan 19, 2023
68092d6
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Jan 20, 2023
11ab010
Merge branch 'master' into grubberr/cdk-declarative-access-token-auth…
grubberr Jan 20, 2023
f0cb66a
AccessTokenAuthenticator -> ShortLivedTokenAuthenticator
grubberr Jan 20, 2023
38b9a4b
lifetime ISO 8601 durations
grubberr Jan 21, 2023
a4f855a
Merge branch 'master' into grubberr/cdk-declarative-access-token-auth…
grubberr Jan 21, 2023
7d5c033
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Jan 21, 2023
72eefd6
Merge branch 'grubberr/cdk-declarative-access-token-authenticator-2' …
grubberr Jan 21, 2023
8c62e05
AccessTokenAuthenticator -> ShortLivedTokenAuthenticator
grubberr Jan 21, 2023
e3d939b
3600 -> PT3600S
grubberr Jan 21, 2023
1229138
revert ShortLivedTokenAuthenticator from CDK change
grubberr Jan 21, 2023
ded0a29
add ShortLivedTokenAuthenticator Custom component
grubberr Jan 21, 2023
bf59d06
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Jan 21, 2023
845c077
RailzNestedExtractor added
grubberr Jan 21, 2023
a9fe4c0
backup railz_ai_extended.yaml, components_extended.py
grubberr Jan 21, 2023
1ada279
minimum of railz_ai.yaml added
grubberr Jan 22, 2023
5e3ba95
serviceNames added
grubberr Jan 22, 2023
4f020d3
accounting_transactions stream added
grubberr Jan 23, 2023
7a2bf74
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Jan 23, 2023
b7fa5ca
bank_transfers_stream added
grubberr Jan 23, 2023
c4ec6f6
bills_stream added
grubberr Jan 23, 2023
4de180a
bills_credit_notes_stream added
grubberr Jan 23, 2023
02a1236
bills_payments_stream added
grubberr Jan 23, 2023
bef28a8
deposits_stream added
grubberr Jan 23, 2023
5183376
estimates, invoices, invoices_credit_notes - added
grubberr Jan 23, 2023
0c102b1
invoices_payments, journal_entries, purchase_orders
grubberr Jan 23, 2023
098ad91
refunds, commerce_disputes, commerce_orders, commerce_products, comme…
grubberr Jan 23, 2023
2227bd5
source-railz-ai -> source-railz
grubberr Jan 23, 2023
cba26bf
railz-ai -> railz
grubberr Jan 23, 2023
ccb39d0
source_railz_ai -> source_railz
grubberr Jan 23, 2023
92408f5
Railz Ai -> Railz
grubberr Jan 23, 2023
439f8a2
railz-ai -> railz
grubberr Jan 23, 2023
3aac9df
Railz.ai -> Railz
grubberr Jan 23, 2023
1616e8b
RailzNestedExtractor - removed
grubberr Jan 23, 2023
ab6df64
test_get_tokens added
grubberr Jan 23, 2023
e949694
remove streams, I will add them in next release
grubberr Jan 23, 2023
13a96ab
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Jan 23, 2023
16eee95
railz.md updated
grubberr Jan 23, 2023
9a8d9af
change base of base_incremental_service_stream
grubberr Jan 23, 2023
98160de
primary_key added, configured_catalog added
grubberr Jan 23, 2023
ace0d60
abnormal_state.json added
grubberr Jan 24, 2023
e0e264d
timeout_seconds removed
grubberr Jan 24, 2023
2a13675
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Jan 24, 2023
cc2b5f5
source_specs.yaml updated
grubberr Jan 24, 2023
9aa7c96
newline added
grubberr Jan 24, 2023
a9d0cf8
BOOTSTRAP.md - removed
grubberr Jan 24, 2023
513ef35
pendulum - removed from setup.py
grubberr Jan 24, 2023
9e43265
requests - added to setup.py
grubberr Jan 24, 2023
0f4a1fc
fix newline
grubberr Jan 24, 2023
ae6bf4a
bugfix Recharge -> Railz
grubberr Jan 24, 2023
d91fd7a
railz.md updated
grubberr Jan 24, 2023
5b23047
expected_records.jsonl added
grubberr Jan 24, 2023
2dd1410
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Jan 24, 2023
580c05b
use default schema_loader
grubberr Jan 24, 2023
f4c2fcd
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Jan 24, 2023
cee72d5
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Jan 27, 2023
9a99644
expected_records.jsonl fixed
grubberr Jan 29, 2023
95f78ad
update RailzCartesianProductStreamSlicer component
grubberr Jan 29, 2023
c631049
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Jan 30, 2023
10ada30
railz.svg added
grubberr Jan 30, 2023
f8ac485
builds.md updated
grubberr Jan 31, 2023
5a2c665
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Jan 31, 2023
0a74b36
builds.md fixed
grubberr Jan 31, 2023
4e1892a
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Jan 31, 2023
8578ddf
revert to master
grubberr Jan 31, 2023
e5fa20e
slice_key -> connection
grubberr Jan 31, 2023
ed129c8
expected_records.jsonl fixed
grubberr Jan 31, 2023
b76f850
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Feb 2, 2023
616fb2d
source-acceptance-test -> connector-acceptance-test
grubberr Feb 2, 2023
495f320
source-acceptance-test -> connector-acceptance-test
grubberr Feb 2, 2023
fd86a79
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Feb 12, 2023
f5cbf54
railz.yaml -> manifest.yaml
grubberr Feb 12, 2023
cf460c1
2022 -> 2023
grubberr Feb 12, 2023
89c7389
remove negative secrets from .dockerignore
grubberr Feb 12, 2023
42ebb33
ShortLivedTokenAuthenticator - issue for low-code component added
grubberr Feb 12, 2023
c45d607
RailzCartesianProductStreamSlicer -> NestedStateCartesianProductStrea…
grubberr Feb 12, 2023
0251dfb
link to issue #22873 added
grubberr Feb 12, 2023
67e25e8
remove businesses records from expected_records.jsonl
grubberr Feb 12, 2023
33a1f33
fix signature of _parse_records_and_emit_request_and_responses
grubberr Feb 13, 2023
db16612
Merge branch 'grubberr/cdk-declarative-fix-emit_request_and_responses…
grubberr Feb 13, 2023
6100198
record_selector added for incremental streams
grubberr Feb 13, 2023
ce42deb
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Feb 13, 2023
de51a6a
threshold_days, cursor_paths - added
grubberr Feb 13, 2023
e260582
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Feb 13, 2023
76d8084
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Feb 14, 2023
47df453
configured_catalog_skip_accounting_transactions.json added
grubberr Feb 14, 2023
6f01739
record_filter updated
grubberr Feb 14, 2023
960ee21
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Feb 14, 2023
2e65eda
icon: railz.svg - added
grubberr Feb 14, 2023
bf9d922
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Feb 15, 2023
80f9903
Merge branch 'master' into oleksandr/new-connector-railz-ai
lazebnyi Feb 15, 2023
1111101
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Feb 15, 2023
31b2063
auto-bump connector version
octavia-squidington-iii Feb 15, 2023
e598baa
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Feb 16, 2023
ab95381
switch on CDK 0.29.0
grubberr Feb 16, 2023
19cbb14
bump 0.1.1
grubberr Feb 16, 2023
cb3c7cd
bump 0.1.1
grubberr Feb 16, 2023
249c02a
options -> parameters
grubberr Feb 16, 2023
3b7119c
bump 0.1.1
grubberr Feb 16, 2023
eb94273
JsonSchemaMixin removed
grubberr Feb 16, 2023
ada02bf
Merge branch 'master' into oleksandr/new-connector-railz-ai
lazebnyi Feb 22, 2023
1e5d8d6
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Feb 22, 2023
cf11b17
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Feb 22, 2023
d663588
2022 -> 2023
grubberr Feb 22, 2023
d5e79bc
source-railz:0.1.0
grubberr Feb 22, 2023
122dbe4
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Feb 22, 2023
a3dcb29
0.1.0 added
grubberr Feb 22, 2023
26751b1
Merge branch 'oleksandr/new-connector-railz-ai' of github.com:airbyte…
grubberr Feb 22, 2023
bcd906f
Merge branch 'master' into oleksandr/new-connector-railz-ai
lazebnyi Feb 22, 2023
f8c3162
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Feb 23, 2023
86ea803
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Feb 23, 2023
27cc4bf
connectors.md updated
grubberr Feb 23, 2023
7b8b1e8
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Feb 23, 2023
cba8267
auto-bump connector version
octavia-squidington-iii Feb 23, 2023
728c16b
Merge branch 'master' into oleksandr/new-connector-railz-ai
grubberr Feb 23, 2023
1cd8ecb
connectors.md updated
grubberr Feb 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions airbyte-config/init/src/main/resources/icons/railz.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -1466,6 +1466,14 @@
icon: qb.svg
sourceType: api
releaseStage: alpha
- name: Railz
sourceDefinitionId: 9b6cc0c0-da81-4103-bbfd-5279e18a849a
dockerRepository: airbyte/source-railz
dockerImageTag: 0.1.0
documentationUrl: https://docs.airbyte.com/integrations/sources/railz
icon: railz.svg
sourceType: api
releaseStage: alpha
- name: Recharge
sourceDefinitionId: 45d2e135-2ede-49e1-939f-3e3ec357a65e
dockerRepository: airbyte/source-recharge
Expand Down
32 changes: 32 additions & 0 deletions airbyte-config/init/src/main/resources/seed/source_specs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12338,6 +12338,38 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-railz:0.1.0"
spec:
documentationUrl: "https://docsurl.com"
connectionSpecification:
$schema: "http://json-schema.org/draft-07/schema#"
title: "Railz Spec"
type: "object"
required:
- "client_id"
- "secret_key"
- "start_date"
properties:
client_id:
type: "string"
title: "Client ID"
description: "Client ID (client_id)"
order: 0
secret_key:
type: "string"
title: "Secret key"
description: "Secret key (secret_key)"
order: 1
airbyte_secret: true
start_date:
type: "string"
title: "Start date"
description: "Start date"
pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
order: 2
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-recharge:0.2.5"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/recharge"
Expand Down
3 changes: 2 additions & 1 deletion airbyte-integrations/builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
| Qualaroo | [![source-qualaroo](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fsource-qualaroo%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/connectors/source-qualaroo) |
| QuickBooks | [![source-quickbooks-singer](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fsource-quickbooks-singer%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/connectors/source-quickbooks-singer) |
| RD Station Marketing | [![source-rd-station-marketing](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fsource-rd-station-marketing%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/connectors/source-rd-station-marketing) |
| Railz | [![source-railz](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fsource-railz%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/connectors/source-railz) |
| Recharge | [![source-recharge](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fsource-recharge%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/connectors/source-recharge) |
| Recurly | [![source-recurly](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fsource-recurly%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/connectors/source-recurly) |
| Redshift | [![source-redshift](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fsource-redshift%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/connectors/source-redshift) |
Expand Down Expand Up @@ -185,4 +186,4 @@
| S3 | [![destination-s3](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fdestination-s3%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/connectors/destination-s3) |
| Scylla | [![destination-scylla](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fdestination-s3%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/connectors/destination-scylla) |
| SFTP-JSON | [![destination-sftp-json](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fdestination-sftp-json%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/connectors/destination-sftp-json) |
| Snowflake | [![destination-snowflake](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fdestination-snowflake%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/connectors/destination-snowflake) |\
| Snowflake | [![destination-snowflake](https://img.shields.io/endpoint?url=https%3A%2F%2Fdnsgjos7lj2fu.cloudfront.net%2Ftests%2Fsummary%2Fdestination-snowflake%2Fbadge.json)](https://dnsgjos7lj2fu.cloudfront.net/tests/summary/connectors/destination-snowflake) |\
5 changes: 5 additions & 0 deletions airbyte-integrations/connectors/source-railz/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
!Dockerfile
!main.py
!source_railz
!setup.py
38 changes: 38 additions & 0 deletions airbyte-integrations/connectors/source-railz/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM python:3.9.11-alpine3.15 as base

# build and load all requirements
FROM base as builder
WORKDIR /airbyte/integration_code

# upgrade pip to the latest version
RUN apk --no-cache upgrade \
&& pip install --upgrade pip \
&& apk --no-cache add tzdata build-base


COPY setup.py ./
# install necessary packages to a temporary folder
RUN pip install --prefix=/install .

# build a clean environment
FROM base
WORKDIR /airbyte/integration_code

# copy all loaded and built libraries to a pure basic image
COPY --from=builder /install /usr/local
# add default timezone settings
COPY --from=builder /usr/share/zoneinfo/Etc/UTC /etc/localtime
RUN echo "Etc/UTC" > /etc/timezone

# bash is installed for more convenient debugging.
RUN apk --no-cache add bash

# copy payload code only
COPY main.py ./
COPY source_railz ./source_railz

ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.0
LABEL io.airbyte.name=airbyte/source-railz
82 changes: 82 additions & 0 deletions airbyte-integrations/connectors/source-railz/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Railz Source

This is the repository for the Railz configuration based source connector.
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/railz).

## Local development

#### Building via Gradle
You can also build the connector in Gradle. This is typically used in CI and not needed for your development workflow.

To build using Gradle, from the Airbyte repository root, run:
```
./gradlew :airbyte-integrations:connectors:source-railz:build
```

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

**If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `Primary Railz Dev Account` from notes the sandbox creds
and place them into `secrets/config.json`.

### Locally running the connector docker image

#### Build
First, make sure you build the latest Docker image:
```
docker build . -t airbyte/source-railz:dev
```

You can also build the connector image via Gradle:
```
./gradlew :airbyte-integrations:connectors:source-railz:airbyteDocker
```
When building via Gradle, the docker image name and tag, respectively, are the values of the `io.airbyte.name` and `io.airbyte.version` `LABEL`s in
the Dockerfile.

#### Run
Then run any of the connector commands as follows:
```
docker run --rm airbyte/source-railz:dev spec
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-railz:dev check --config /secrets/config.json
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-railz:dev discover --config /secrets/config.json
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-railz:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
```
## Testing

#### Acceptance Tests
Customize `acceptance-test-config.yml` file to configure tests. See [Source Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference) for more information.
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.

To run your integration tests with Docker, run:
```
./acceptance-test-docker.sh
```

### Using gradle to run tests
All commands should be run from airbyte project root.
To run unit tests:
```
./gradlew :airbyte-integrations:connectors:source-railz:unitTest
```
To run acceptance and custom integration tests:
```
./gradlew :airbyte-integrations:connectors:source-railz:integrationTest
```

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

### Publishing a new version of the connector
You've checked out the repo, implemented a million dollar feature, and you're ready to share your changes with the world. Now what?
1. Make sure your changes are passing unit and integration tests.
1. Bump the connector version in `Dockerfile` -- just increment the value of the `LABEL io.airbyte.version` appropriately (we use [SemVer](https://semver.org/)).
1. Create a Pull Request.
1. Pat yourself on the back for being an awesome contributor.
1. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
3 changes: 3 additions & 0 deletions airbyte-integrations/connectors/source-railz/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
#
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# See [Source Acceptance Tests](https://docs.airbyte.com/connector-development/testing-connectors/connector-acceptance-tests-reference)
# for more information about how to configure these tests
connector_image: airbyte/source-railz:dev
test_strictness_level: "high"
acceptance_tests:
spec:
tests:
- spec_path: "source_railz/spec.yaml"
connection:
tests:
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
discovery:
tests:
- config_path: "secrets/config.json"
basic_read:
tests:
- config_path: "secrets/config.json"
expect_records:
path: "integration_tests/expected_records.jsonl"
extra_fields: no
exact_order: no
extra_records: yes
empty_streams:
- name: "businesses"
bypass_reason: "Stream object fields like 'status' and 'updatedAt' can change pretty often"
incremental:
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
future_state:
future_state_path: "integration_tests/abnormal_state.json"
threshold_days: 30
cursor_paths:
accounting_transactions: ["b_dynamicsBusinessCentral", "dynamicsBusinessCentral", "postedDate"]
bank_transfers: ["b_xero", "xero", "date"]
bills: ["b_freshbooks", "freshbooks", "postedDate"]
bills_credit_notes: ["b_xero", "xero", "postedDate"]
bills_payments: ["b_dynamicsBusinessCentral", "dynamicsBusinessCentral", "date"]
commerce_disputes: ["b_square", "square", "createdDate"]
commerce_orders: ["b_square", "square", "createdDate"]
commerce_products: ["b_square", "square", "createdDate"]
commerce_transactions: ["b_square", "square", "createdDate"]
deposits: ["b_quickbooks", "quickbooks", "postedDate"]
estimates: ["b_xero", "xero", "postedDate"]
invoices: ["b_sageBusinessCloud", "sageBusinessCloud", "postedDate"]
invoices_credit_notes: ["b_freshbooks", "freshbooks", "postedDate"]
invoices_payments: ["b_freshbooks", "freshbooks", "date"]
journal_entries: ["b_freshbooks", "freshbooks", "postedDate"]
purchase_orders: ["b_oracleNetsuite", "oracleNetsuite", "postedDate"]
refunds: ["b_xero", "xero", "date"]
full_refresh:
tests:
- config_path: "secrets/config.json"
# stream "accounting_transactions" too volatile
configured_catalog_path: "integration_tests/configured_catalog_skip_accounting_transactions.json"
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env sh

# Build latest connector image
docker build . -t $(cat acceptance-test-config.yml | grep "connector_image" | head -n 1 | cut -d: -f2-)

# Pull latest acctest image
docker pull airbyte/connector-acceptance-test:latest

# Run
docker run --rm -it \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /tmp:/tmp \
-v $(pwd):/test_input \
airbyte/connector-acceptance-test \
--acceptance-test-config /test_input

13 changes: 13 additions & 0 deletions airbyte-integrations/connectors/source-railz/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
plugins {
id 'airbyte-python'
id 'airbyte-docker'
id 'airbyte-connector-acceptance-test'
}

airbytePython {
moduleDirectory 'source_railz'
}

dependencies {
implementation files(project(':airbyte-integrations:bases:connector-acceptance-test').airbyteDocker.outputs)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
#
Loading