Skip to content

Commit

Permalink
✨Source BambooHR - Migrate Python CDK to Low-code CDK (#37452)
Browse files Browse the repository at this point in the history
Co-authored-by: Natik Gadzhi <natik@respawn.io>
Co-authored-by: Serhii Lazebnyi <53845333+lazebnyi@users.noreply.github.com>
Co-authored-by: Alexandre Girard <alexandre@airbyte.io>
Co-authored-by: Serhii Lazebnyi <serhii.lazebnyi@globallogic.com>
  • Loading branch information
5 people authored Jun 3, 2024
1 parent ff0ba70 commit 460de72
Show file tree
Hide file tree
Showing 23 changed files with 645 additions and 634 deletions.

This file was deleted.

20 changes: 12 additions & 8 deletions airbyte-integrations/connectors/source-bamboo-hr/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Bamboo-Hr source connector
# Bamboo Hr Source

This is the repository for the Bamboo-Hr source connector, written in Python.
This is the repository for the Bamboo HR source connector.
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/bamboo-hr).

## Local development

### Prerequisites

* Python (`^3.9`)
* Poetry (`^1.7`) - installation instructions [here](https://python-poetry.org/docs/#installation)


- Python (~=3.9)
- Poetry (~=1.7) - installation instructions [here](https://python-poetry.org/docs/#installation)

Expand All @@ -21,7 +25,7 @@ poetry install --with dev
### Create credentials

**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/bamboo-hr)
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_bamboo_hr/spec.yaml` file.
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `src/source_bamboo_hr/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 `sample_files/sample_config.json` for a sample config file.

Expand All @@ -34,12 +38,12 @@ poetry run source-bamboo-hr discover --config secrets/config.json
poetry run source-bamboo-hr read --config secrets/config.json --catalog sample_files/configured_catalog.json
```

### Running unit tests
### Running tests

To run unit tests locally, from the connector directory run:
To run tests locally, from the connector directory run:

```
poetry run pytest unit_tests
poetry run pytest tests
```

### Building the docker image
Expand Down Expand Up @@ -79,7 +83,7 @@ If your connector requires to create or destroy resources for use during accepta

### Dependency Management

All of your dependencies should be managed via Poetry.
All of your dependencies should be managed via Poetry.
To add a new dependency, run:

```bash
Expand All @@ -94,7 +98,7 @@ You've checked out the repo, implemented a million dollar feature, and you're re

1. Make sure your changes are passing our test suite: `airbyte-ci connectors --name=source-bamboo-hr test`
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)):
- bump the `dockerImageTag` value in in `metadata.yaml`
- bump the `dockerImageTag` value in `metadata.yaml`
- bump the `version` value in `pyproject.toml`
3. Make sure the `metadata.yaml` content is up to date.
4. Make sure the connector documentation and its changelog is up to date (`docs/integrations/sources/bamboo-hr.md`).
Expand Down
3 changes: 3 additions & 0 deletions airbyte-integrations/connectors/source-bamboo-hr/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
Original file line number Diff line number Diff line change
@@ -1,22 +1,41 @@
# See [Connector 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-bamboo-hr:dev
tests:
acceptance_tests:
spec:
- spec_path: "source_bamboo_hr/spec.json"
tests:
- spec_path: "source_bamboo_hr/spec.yaml"
connection:
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
tests:
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
discovery:
- config_path: "secrets/config.json"
backward_compatibility_tests_config:
disable_for_version: "0.2.0"
tests:
- config_path: "secrets/config.json"
backward_compatibility_tests_config:
disable_for_version: "0.2.0"
basic_read:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
empty_streams: []
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
empty_streams: []
# TODO uncomment this block to specify that the tests should assert the connector outputs the records provided in the input file a file
# expect_records:
# path: "integration_tests/expected_records.jsonl"
# extra_fields: no
# exact_order: no
# extra_records: yes
incremental:
bypass_reason: "This connector does not implement incremental sync"
# TODO uncomment this block this block if your connector implements incremental sync:
# tests:
# - config_path: "secrets/config.json"
# configured_catalog_path: "integration_tests/configured_catalog.json"
# future_state:
# future_state_path: "integration_tests/abnormal_state.json"
full_refresh:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"todo-stream-name": {
"todo-field-name": "todo-abnormal-value"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"api_key": "awesome-api-key",
"subdomain": "my-company"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"todo-stream-name": {
"todo-field-name": "value"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
data:
allowedHosts:
hosts:
- api.bamboohr.com
ab_internal:
ql: 200
sl: 100
Expand All @@ -7,12 +10,13 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 90916976-a132-4ce9-8bce-82a03dd58788
dockerImageTag: 0.2.6
dockerImageTag: 0.3.0
dockerRepository: airbyte/source-bamboo-hr
documentationUrl: https://docs.airbyte.com/integrations/sources/bamboo-hr
githubIssueLabel: source-bamboo-hr
icon: bamboohr.svg
license: MIT
releaseDate: 2021-08-27
name: BambooHR
registries:
cloud:
Expand All @@ -27,7 +31,7 @@ data:
supportLevel: community
tags:
- language:python
- cdk:python
- cdk:low-code
connectorTestSuitesOptions:
- suite: unitTests
- suite: acceptanceTests
Expand Down
Loading

0 comments on commit 460de72

Please sign in to comment.