Skip to content
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

✨ Destination Timeplus: fix issues in README and upgrade timeplus and cdk #44758

Merged
merged 24 commits into from
Sep 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
69d443d
fix the issue in README. This is a destination not source connector. …
jovezhong Aug 25, 2024
f18c3d2
upgrade timeplus from 1.2.2 to 1.4.1, airbyte-cdk 0.68.1 to 0.90.0
jovezhong Aug 25, 2024
aca8371
Update readme and docker image version
jovezhong Aug 25, 2024
3b0eb9a
Fix a format error for run.py
jovezhong Aug 25, 2024
1022655
fix the issue in README. This is a destination not source connector. …
jovezhong Aug 25, 2024
6d38eb9
upgrade timeplus from 1.2.2 to 1.4.1, airbyte-cdk 0.68.1 to 0.90.0
jovezhong Aug 25, 2024
d64e3df
Update readme and docker image version
jovezhong Aug 25, 2024
52d6029
Fix a format error for run.py
jovezhong Aug 25, 2024
a2bc89a
Merge branch 'feature/refine-timeplus' of https://github.com/jovezhon…
jovezhong Aug 28, 2024
7b5bccc
Merge branch 'airbytehq:master' into feature/refine-timeplus
jovezhong Aug 30, 2024
cd103f1
turn registryOverrides on in metabase.yaml
jovezhong Aug 30, 2024
2ec6a7d
Update spec.json with new cloud URL
jovezhong Aug 30, 2024
725df15
upgrade from timeplus 1.4.1 to 2.0.0b3 for better compatibility
jovezhong Aug 30, 2024
24020d2
Update timeplus.md
jovezhong Aug 30, 2024
2ac89ed
support http as prefix, assume string for array without items
jovezhong Aug 30, 2024
4d02780
Merge branch 'master' into feature/refine-timeplus
jovezhong Aug 30, 2024
c7fb8dd
set 0.1.19 and update lib
jovezhong Sep 3, 2024
bc9633e
Merge branch 'master' into feature/refine-timeplus
jovezhong Sep 3, 2024
772f8d2
Merge branch 'master' into feature/refine-timeplus
jovezhong Sep 3, 2024
25317ac
Merge branch 'master' into feature/refine-timeplus
jovezhong Sep 4, 2024
30a2fea
Merge remote-tracking branch 'upstream/master' into feature/refine-ti…
jovezhong Sep 5, 2024
99dbb1a
Merge branch 'master' into feature/refine-timeplus
marcosmarxm Sep 7, 2024
873927c
Merge remote-tracking branch 'upstream/master' into feature/refine-ti…
jovezhong Sep 8, 2024
5e719e4
bump version to 0.1.20 since 0.1.19 has auto-released
jovezhong Sep 8, 2024
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
16 changes: 7 additions & 9 deletions airbyte-integrations/connectors/destination-timeplus/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Timeplus source connector
# Timeplus destination connector


This is the repository for the Timeplus source connector, written in Python.
Expand All @@ -7,7 +7,7 @@ For information about how to use this connector within Airbyte, see [the documen
## Local development

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


Expand All @@ -29,8 +29,7 @@ See `sample_files/sample_config.json` for a sample config file.
```
poetry run destination-timeplus spec
poetry run destination-timeplus check --config secrets/config.json
poetry run destination-timeplus discover --config secrets/config.json
poetry run destination-timeplus read --config secrets/config.json --catalog sample_files/configured_catalog.json
cat integration_tests/messages.jsonl | poetry run destination-timeplus write --config secrets/config.json --catalog integration_tests/configured_catalog.json
```

### Running unit tests
Expand All @@ -54,8 +53,7 @@ Then run any of the connector commands as follows:
```
docker run --rm airbyte/destination-timeplus:dev spec
docker run --rm -v $(pwd)/secrets:/secrets airbyte/destination-timeplus:dev check --config /secrets/config.json
docker run --rm -v $(pwd)/secrets:/secrets airbyte/destination-timeplus:dev discover --config /secrets/config.json
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/destination-timeplus:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
cat integration_tests/messages.jsonl | docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/destination-timeplus:dev write --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
```

### Running our CI test suite
Expand All @@ -69,7 +67,7 @@ Customize `acceptance-test-config.yml` file to configure acceptance tests. See [
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.

### 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
poetry add <package-name>
Expand All @@ -80,12 +78,12 @@ Please commit the changes to `pyproject.toml` and `poetry.lock` files.
## 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 our test suite: `airbyte-ci connectors --name=destination-timeplus 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)):
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 `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/destinations/timeplus.md`).
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).
6. Pat yourself on the back for being an awesome contributor.
7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
8. Once your PR is merged, the new version of the connector will be automatically published to Docker Hub and our connector registry.
8. Once your PR is merged, the new version of the connector will be automatically published to Docker Hub and our connector registry.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ def type_mapping(v) -> str:
if t != "null":
type_def = {"type": t}
if t == "array":
type_def["items"] = v["items"]
if "items" in v:
type_def["items"] = v["items"]
else:
type_def["type"] = "string"
return DestinationTimeplus.type_mapping(type_def)
if airbyte_type == "number":
return "float"
Expand Down Expand Up @@ -144,8 +147,6 @@ def check(self, logger: logging.Logger, config: Mapping[str, Any]) -> AirbyteCon
try:
endpoint = config["endpoint"]
apikey = config["apikey"]
if not endpoint.startswith("http"):
return AirbyteConnectionStatus(status=Status.FAILED, message="Endpoint must start with http or https")
if len(apikey) != 60:
return AirbyteConnectionStatus(status=Status.FAILED, message="API Key must be 60 characters")
if endpoint[-1] == "/":
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# Copyright (c) 2024 Airbyte, Inc., all rights reserved.
#


import sys

from airbyte_cdk.entrypoint import launch
from destination_timeplus import DestinationTimeplus


def run():
destination = DestinationTimeplus()
destination.run(sys.argv[1:])
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"title": "Endpoint",
"description": "Timeplus workspace endpoint",
"type": "string",
"default": "https://us.timeplus.cloud/<workspace_id>",
"examples": ["https://us.timeplus.cloud/workspace_id"],
"default": "https://us-west-2.timeplus.cloud/<workspace_id>",
"examples": ["https://us-west-2.timeplus.cloud/workspace_id"],
"order": 0
},
"apikey": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ data:
connectorSubtype: database
connectorType: destination
definitionId: f70a8ece-351e-4790-b37b-cb790bcd6d54
dockerImageTag: 0.1.19
dockerImageTag: 0.1.20
dockerRepository: airbyte/destination-timeplus
githubIssueLabel: destination-timeplus
icon: timeplus.svg
license: MIT
name: Timeplus
registryOverrides:
cloud:
enabled: false
enabled: true
oss:
enabled: false
enabled: true
releaseStage: alpha
documentationUrl: https://docs.airbyte.com/integrations/destinations/timeplus
tags:
Expand Down
Loading
Loading