Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Apr 26, 2024
0 parents commit aa1c35a
Show file tree
Hide file tree
Showing 24 changed files with 1,217 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Changes here will be overwritten by Copier
_commit: v0.1.5
_src_path: gh:edgarrmondragon/singer-tap-copier-template
author_email: edgarrmondragon@hey.com
author_fullname: Edgar Ramírez-Mondragón
author_username: edgarrmondragon
dependabot_update_time: '10:00'
dependabot_update_timezone: Etc/UTC
python_main_version: '3.12'
repository_name: tap-polarsh
repository_namespace: edgarrmondragon
repository_provider: github.com
repository_visibility: private
tap_auth_method: Bearer Token
tap_id: tap-polarsh
tap_package_command_line_name: tap-polarsh
tap_package_distribution_name: tap-polarsh
tap_package_import_name: tap_polarsh
tap_source_description: Polar is the creator platform for developers
tap_source_id: Polar
tap_source_name: Polar
tap_stream_type: REST
vscode_files: true
43 changes: 43 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: "weekly"
timezone: "Etc/UTC"
time: "10:00"
reviewers:
- "edgarrmondragon"
versioning-strategy: increase-if-necessary
commit-message:
prefix: "feat(deps): "
prefix-development: "chore(deps-dev): "
- package-ecosystem: pip
directory: "/.github/workflows"
schedule:
interval: "monthly"
timezone: "Etc/UTC"
time: "10:00"
reviewers:
- "edgarrmondragon"
commit-message:
prefix: "ci: "
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: "monthly"
timezone: "Etc/UTC"
time: "10:00"
reviewers:
- "edgarrmondragon"
commit-message:
prefix: "ci: "
groups:
actions:
patterns:
- "*"
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and publish

on:
push:

jobs:
build:
name: Build wheel and sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
- uses: hynek/build-and-inspect-python-package@v2

publish:
name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: build
environment:
name: pypi
url: https://pypi.org/p/tap-polarsh
permissions:
contents: write
id-token: write

steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- uses: svenstaro/upload-release-action@v2
with:
file: dist/*.whl
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- uses: pypa/gh-action-pypi-publish@v1.8.14
2 changes: 2 additions & 0 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hatch==1.9.7
pip==24.0
72 changes: 72 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Test tap-polarsh

on:
push:
branches: [main]
paths:
- tap_polarsh/**
- tests/**
- pyproject.toml
- .github/workflows/test.yml
- .github/workflows/constraints.txt
pull_request:
types: [opened, synchronize, reopened]
paths:
- tap_polarsh/**
- tests/**
- pyproject.toml
- .github/workflows/test.yml
- .github/workflows/constraints.txt

jobs:
test:
runs-on: ubuntu-latest
env:
FORCE_COLOR: "1"
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
strategy:
fail-fast: false
matrix:
script: ["test:integration"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
include:
- { script: "test:dependencies", python-version: "3.12" }
- { script: "typing:check", python-version: "3.12" }

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
id: setup-python
with:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Upgrade pip
run: |
pip install pip
pip --version
- name: Install Hatch
run: |
pipx install --python '${{ steps.setup-python.outputs.python-path }}' hatch
hatch --version
- name: Run tests
env:
TAP_POLARSH_TOKEN: ${{ secrets.TAP_POLARSH_TOKEN }}
TAP_POLARSH_START_DATE: ${{ secrets.TAP_POLARSH_START_DATE }}
run: |
hatch run ${{ matrix.script }}
pre-commit:
runs-on: ubuntu-latest
env:
FORCE_COLOR: "1"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: pre-commit/action@v3.0.1
- uses: pre-commit-ci/lite-action@v1.0.2
if: always()
133 changes: 133 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Ignore meltano internal cache and sqlite systemdb

.meltano/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.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/
35 changes: 35 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-json
exclude: "\\.vscode/.*.json"
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.8.0
hooks:
- id: pyproject-fmt

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1
hooks:
- id: ruff
name: Ruff lint
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
- id: ruff-format
name: Ruff format

- repo: https://github.com/pre-commit/pre-commit
rev: v3.7.0
hooks:
- id: validate_manifest

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.2
hooks:
- id: check-dependabot
- id: check-github-workflows
10 changes: 10 additions & 0 deletions .secrets/.gitignore
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
22 changes: 22 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "tap-polarsh",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "tap_polarsh",
"justMyCode": false,
"args": [
"--config",
".secrets/config.json",
"--config",
"ENV",
],
},
]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.words": [
"polarsh"
]
}
Loading

0 comments on commit aa1c35a

Please sign in to comment.