Skip to content

Commit

Permalink
v0.0.1 complete and functional
Browse files Browse the repository at this point in the history
  • Loading branch information
jlloyd-widen committed Feb 8, 2024
1 parent a7d00d8 commit 4826c23
Show file tree
Hide file tree
Showing 12 changed files with 2,053 additions and 199 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
### A CI workflow template that runs linting and python testing
### TODO: Modify as needed or as desired.

name: Test tap-toggl

Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,7 @@ dmypy.json

# Pyre type checker
.pyre/

# IDE
.idea
.vscode
20 changes: 0 additions & 20 deletions .vscode/launch.json

This file was deleted.

38 changes: 16 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,14 @@

Built with the [Meltano Tap SDK](https://sdk.meltano.com) for Singer Taps.

<!--
Developer TODO: Update the below as needed to correctly describe the install procedure. For instance, if you do not have a PyPi repo, or if you want users to directly install from your git repo, you can modify this step as appropriate.
## Installation

Install from PyPi:
```bash
pipx install tap-toggl
```
Install from GitHub:

```bash
pipx install git+https://github.com/ORG_NAME/tap-toggl.git@main
pipx install git+https://github.com/Widen/tap-toggl.git
```

-->

## Configuration

### Accepted Config Options
Expand All @@ -38,6 +26,20 @@ tap-toggl --about --format=markdown
```
-->

| Setting | Required | Default | Description |
|:-----------------------------|:--------:|:-------:|:------------|
| api_token | True | None | The token to authenticate against the Toggl API |
| detailed_report_trailing_days| False | 1 | Provided for backwards compatibility. Does nothing. |
| start_date | False | | The earliest record date to sync. In the format YYYY-MM-DD. |
| user_agent | False | | Inserts a user agent into the request header |
| stream_maps | False | None | Config object for stream maps capability. For more information check out [Stream Maps](https://sdk.meltano.com/en/latest/stream_maps.html). |
| stream_map_config | False | None | User-defined config values to be used within map expressions. |
| faker_config | False | None | Config for the [`Faker`](https://faker.readthedocs.io/en/master/) instance variable `fake` used within map expressions. Only applicable if the plugin specifies `faker` as an addtional dependency (through the `singer-sdk` `faker` extra or directly). |
| flattening_enabled | False | None | 'True' to enable schema flattening and automatically expand nested properties. |
| flattening_max_depth | False | None | The max depth to flatten schemas. |
| batch_config | False | None | |


A full list of supported settings and capabilities for this
tap is available by running:

Expand All @@ -53,9 +55,7 @@ environment variable is set either in the terminal context or in the `.env` file

### Source Authentication and Authorization

<!--
Developer TODO: If your tap requires special access on the source system, or any special authentication requirements, provide those here.
-->
See https://developers.track.toggl.com/docs/authentication for more information on how to obtain an API token. Only the api_token authentication method is supported.

## Usage

Expand Down Expand Up @@ -100,12 +100,6 @@ poetry run tap-toggl --help
_**Note:** This tap will work in any Singer environment and does not require Meltano.
Examples here are for convenience and to streamline end-to-end orchestration scenarios._

<!--
Developer TODO:
Your project comes with a custom `meltano.yml` project file already created. Open the `meltano.yml` and follow any "TODO" items listed in
the file.
-->

Next, install Meltano (if you haven't already) and any needed plugins:

```bash
Expand Down
22 changes: 16 additions & 6 deletions meltano.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,25 @@ plugins:
- discover
- about
- stream-maps
config:
start_date: '2010-01-01T00:00:00Z'
settings:
# TODO: To configure using Meltano, declare settings and their types here:
- name: username
- name: password
- name: api_token
kind: password
- name: detailed_report_trailing_days
kind: integer
- name: start_date
value: '2010-01-01T00:00:00Z'
kind: string
- name: user_agent
kind: string
select:
- clients.*
- groups.*
- organizations.*
- projects.*
- tasks.*
- tags.*
- time_entries.*
- users.*
- workspaces.*
loaders:
- name: target-jsonl
variant: andyh1203
Expand Down
34 changes: 34 additions & 0 deletions plugins/loaders/target-jsonl--andyh1203.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"plugin_type": "loaders",
"name": "target-jsonl",
"namespace": "target_jsonl",
"variant": "andyh1203",
"label": "JSON Lines (JSONL)",
"docs": "https://hub.meltano.com/loaders/target-jsonl--andyh1203",
"repo": "https://github.com/andyh1203/target-jsonl",
"pip_url": "target-jsonl",
"description": "JSONL loader",
"logo_url": "https://hub.meltano.com/assets/logos/loaders/jsonl.png",
"settings": [
{
"name": "destination_path",
"kind": "string",
"value": "output",
"label": "Destination Path",
"description": "Sets the destination path the JSONL files are written to, relative\nto the project root.\n\nThe directory needs to exist already, it will not be created\nautomatically.\n\nTo write JSONL files to the project root, set an empty string (`\"\"`).\n"
},
{
"name": "do_timestamp_file",
"kind": "boolean",
"value": false,
"label": "Include Timestamp in File Names",
"description": "Specifies if the files should get timestamped.\n\nBy default, the resulting file will not have a timestamp in the file name (i.e. `exchange_rate.jsonl`).\n\nIf this option gets set to `true`, the resulting file will have a timestamp associated with it (i.e. `exchange_rate-{timestamp}.jsonl`).\n"
},
{
"name": "custom_name",
"kind": "string",
"label": "Custom File Name Override",
"description": "Specifies a custom name for the filename, instead of the stream name.\n\nThe file name will be `{custom_name}-{timestamp}.jsonl`, if `do_timestamp_file` is `true`.\nOtherwise the file name will be `{custom_name}.jsonl`.\n\nIf custom name is not provided, the stream name will be used.\n"
}
]
}
Loading

0 comments on commit 4826c23

Please sign in to comment.