forked from hotgluexyz/tap-canvas-catalog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1b202bb
Showing
14 changed files
with
666 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
# Secrets and internal config files | ||
**/.secrets/* | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
poetry.lock | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
docker-compose.yml | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# 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. | ||
# | ||
# Note: This may be redundant with the global .gitignore for, and is provided | ||
# for redundancy. If the `.secrets` folder is not needed, you may delete it | ||
# from the project. | ||
|
||
* | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
# tap-canvas-catalog | ||
|
||
`tap-canvas-catalog` is a Singer tap for CanvasCatalog. | ||
|
||
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-canvas-catalog | ||
``` | ||
Install from GitHub: | ||
```bash | ||
pipx install git+https://github.com/ORG_NAME/tap-canvas-catalog.git@main | ||
``` | ||
--> | ||
|
||
## Configuration | ||
|
||
### Accepted Config Options | ||
|
||
<!-- | ||
Developer TODO: Provide a list of config options accepted by the tap. | ||
This section can be created by copy-pasting the CLI output from: | ||
``` | ||
tap-canvas-catalog --about --format=markdown | ||
``` | ||
--> | ||
|
||
A full list of supported settings and capabilities for this | ||
tap is available by running: | ||
|
||
```bash | ||
tap-canvas-catalog --about | ||
``` | ||
|
||
### Configure using environment variables | ||
|
||
This Singer tap will automatically import any environment variables within the working directory's | ||
`.env` if the `--config=ENV` is provided, such that config values will be considered if a matching | ||
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. | ||
--> | ||
|
||
## Usage | ||
|
||
You can easily run `tap-canvas-catalog` by itself or in a pipeline using [Meltano](https://meltano.com/). | ||
|
||
### Executing the Tap Directly | ||
|
||
```bash | ||
tap-canvas-catalog --version | ||
tap-canvas-catalog --help | ||
tap-canvas-catalog --config CONFIG --discover > ./catalog.json | ||
``` | ||
|
||
## Developer Resources | ||
|
||
Follow these instructions to contribute to this project. | ||
|
||
### Initialize your Development Environment | ||
|
||
```bash | ||
pipx install poetry | ||
poetry install | ||
``` | ||
|
||
### Create and Run Tests | ||
|
||
Create tests within the `tap_canvas_catalog/tests` subfolder and | ||
then run: | ||
|
||
```bash | ||
poetry run pytest | ||
``` | ||
|
||
You can also test the `tap-canvas-catalog` CLI interface directly using `poetry run`: | ||
|
||
```bash | ||
poetry run tap-canvas-catalog --help | ||
``` | ||
|
||
### Testing with [Meltano](https://www.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._ | ||
|
||
<!-- | ||
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 | ||
# Install meltano | ||
pipx install meltano | ||
# Initialize meltano within this directory | ||
cd tap-canvas-catalog | ||
meltano install | ||
``` | ||
|
||
Now you can test and orchestrate using Meltano: | ||
|
||
```bash | ||
# Test invocation: | ||
meltano invoke tap-canvas-catalog --version | ||
# OR run a test `elt` pipeline: | ||
meltano elt tap-canvas-catalog target-jsonl | ||
``` | ||
|
||
### SDK Dev Guide | ||
|
||
See the [dev guide](https://sdk.meltano.com/en/latest/dev_guide.html) for more instructions on how to use the SDK to | ||
develop your own taps and targets. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: 1 | ||
send_anonymous_usage_stats: true | ||
project_id: "tap-canvas-catalog" | ||
default_environment: test | ||
environments: | ||
- name: test | ||
plugins: | ||
extractors: | ||
- name: "tap-canvas-catalog" | ||
namespace: "tap_canvas_catalog" | ||
pip_url: -e . | ||
capabilities: | ||
- state | ||
- catalog | ||
- 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 | ||
kind: password | ||
- name: start_date | ||
value: '2010-01-01T00:00:00Z' | ||
loaders: | ||
- name: target-jsonl | ||
variant: andyh1203 | ||
pip_url: target-jsonl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This directory is used as a target by target-jsonl, so ignore all files | ||
|
||
* | ||
!.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
[tool.poetry] | ||
name = "tap-canvas-catalog" | ||
version = "0.0.1" | ||
description = "`tap-canvas-catalog` is a Singer tap for CanvasCatalog, built with the Meltano Singer SDK." | ||
readme = "README.md" | ||
authors = ["hotglue"] | ||
keywords = [ | ||
"ELT", | ||
"CanvasCatalog", | ||
] | ||
license = "Apache 2.0" | ||
|
||
[tool.poetry.dependencies] | ||
python = "<3.12,>=3.7.1" | ||
singer-sdk = { version="^0.23.0" } | ||
fs-s3fs = { version = "^1.1.1", optional = true } | ||
requests = "^2.28.2" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
pytest = "^7.2.1" | ||
flake8 = "^5.0.4" | ||
darglint = "^1.8.1" | ||
black = "^23.1.0" | ||
pyupgrade = "^3.3.1" | ||
mypy = "^1.0.0" | ||
isort = "^5.11.5" | ||
singer-sdk = { version="^0.23.0", extras = ["testing"] } | ||
types-requests = "^2.28.11.12" | ||
|
||
[tool.poetry.extras] | ||
s3 = ["fs-s3fs"] | ||
|
||
[tool.isort] | ||
profile = "black" | ||
multi_line_output = 3 # Vertical Hanging Indent | ||
src_paths = "tap_canvas_catalog" | ||
|
||
[tool.mypy] | ||
python_version = "3.9" | ||
warn_unused_configs = true | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.8"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry.scripts] | ||
# CLI declaration | ||
tap-canvas-catalog = 'tap_canvas_catalog.tap:TapCanvasCatalog.cli' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""Tap for CanvasCatalog.""" |
Oops, something went wrong.