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

Initial code #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions tap-canny/.secrets/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# IMPORTANT! This folder is hidden from git - if you need to store config files or other secrets,
# make sure those are never staged for commit into your git repo. You can store them here or another
# secure location.

*
!.gitignore
100 changes: 100 additions & 0 deletions tap-canny/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# tap-canny

`tap-canny` is a Singer tap for Canny.

Build with the [Singer SDK](https://gitlab.com/meltano/singer-sdk).

## Installation

- [ ] `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.

```bash
pipx install tap-canny
```

## Configuration

### Accepted Config Options

- [ ] `Developer TODO:` Provide a list of config options accepted by the tap.

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

```bash
tap-canny --about
```

### Source Authentication and Authorization

- [ ] `Developer TODO:` If your tap requires special access on the source system, or any special authentication requirements, provide those here.

## Usage

You can easily run `tap-canny` by itself or in a pipeline using [Meltano](www.meltano.com).

### Executing the Tap Directly

```bash
tap-canny --version
tap-canny --help
tap-canny --config CONFIG --discover > ./catalog.json
```

## Developer Resources

- [ ] `Developer TODO:` As a first step, scan the entire project for the text "`TODO:`" and complete any recommended steps, deleting the "TODO" references once completed.

### Initialize your Development Environment

```bash
pipx install poetry
poetry install
```

### Create and Run Tests

Create tests within the `tap-canny/tests` subfolder and
then run:

```bash
poetry run pytest
```

You can also test the `tap-canny` CLI interface directly using `poetry run`:

```bash
poetry run tap-canny --help
```

### Testing with [Meltano](meltano.com)

_**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._

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
# Install meltano
pipx install meltano
# Initialize meltano within this directory
cd tap-canny
meltano install
```

Now you can test and orchestrate using Meltano:

```bash
# Test invocation:
meltano invoke tap-canny --version
# OR run a test `elt` pipeline:
meltano etl tap-canny target-jsonl
```

### Singer SDK Dev Guide

See the [dev guide](../../docs/dev_guide.md) for more instructions on how to use the Singer SDK to
develop your own taps and targets.
14 changes: 14 additions & 0 deletions tap-canny/meltano.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 1
send_anonymous_usage_stats: true
project_id: tap-canny
plugins:
extractors:
- name: tap-canny
namespace: tap-canny
# TODO: To test using Meltano, replace with absolute path
# to the tap-canny.sh script:
executable: ./tap-canny.sh
loaders:
- name: target-jsonl
variant: andyh1203
pip_url: target-jsonl
22 changes: 22 additions & 0 deletions tap-canny/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[tool.poetry]
name = "tap-canny"
version = "0.0.1"
description = "`tap-canny` is Singer tap for Canny, built with the Singer SDK."
authors = ["FirstName LastName"]
license = "Apache 2.0"

[tool.poetry.dependencies]
python = "<3.9,>=3.6"
requests = "^2.25.1"
singer-sdk = "^0.1.0"

[tool.poetry.dev-dependencies]
pytest = "^6.1.2"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
# CLI declaration
tap-canny = 'tap-canny.tap:cli'
12 changes: 12 additions & 0 deletions tap-canny/tap-canny.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

# This simple script allows you to test your tap from any directory, while still taking
# advantage of the poetry-managed virtual environment.
# Adapted from: https://github.com/python-poetry/poetry/issues/2179#issuecomment-668815276

STARTDIR=$(pwd)
TOML_DIR=$(dirname "$0")

cd "$TOML_DIR" || exit
poetry install
poetry run tap-canny $*
Empty file added tap-canny/tap-canny/__init__.py
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Loading