Skip to content

Commit c721e99

Browse files
committed
first commit
0 parents  commit c721e99

File tree

17 files changed

+2054
-0
lines changed

17 files changed

+2054
-0
lines changed

.github/dependabot.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: pip
9+
directory: "/"
10+
schedule:
11+
interval: weekly
12+
commit-message:
13+
prefix: "chore(deps): "
14+
prefix-development: "chore(deps-dev): "
15+
groups:
16+
development-dependencies:
17+
dependency-type: development
18+
runtime-dependencies:
19+
dependency-type: production
20+
update-types:
21+
- "patch"
22+
versioning-strategy: increase-if-necessary
23+
- package-ecosystem: github-actions
24+
directory: "/"
25+
schedule:
26+
interval: weekly
27+
commit-message:
28+
prefix: "ci: "
29+
groups:
30+
actions:
31+
patterns:
32+
- "*"

.github/workflows/build.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
6+
permissions:
7+
contents: write # Needed to upload artifacts to the release
8+
id-token: write # Needed for OIDC PyPI publishing
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
version: ${{ steps.baipp.outputs.package_version }}
15+
steps:
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17+
- uses: hynek/build-and-inspect-python-package@b5076c307dc91924a82ad150cdd1533b444d3310 # v2.12.0
18+
id: baipp
19+
20+
publish:
21+
name: Publish to PyPI
22+
runs-on: ubuntu-latest
23+
needs: [build]
24+
## TODO: optionally provide the name of the environment for the trusted
25+
## publisher on PyPI
26+
## https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment
27+
# environment:
28+
# name: pypi
29+
# url: https://pypi.org/project/ticketswap-target-notion/${{ steps.baipp.outputs.package_version }}
30+
if: startsWith(github.ref, 'refs/tags/')
31+
steps:
32+
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
33+
with:
34+
name: Packages
35+
path: dist
36+
- name: Upload wheel to release
37+
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # 2.9.0
38+
with:
39+
repo_token: ${{secrets.GITHUB_TOKEN}}
40+
file: dist/*.whl
41+
tag: ${{github.ref}}
42+
overwrite: true
43+
file_glob: true
44+
45+
- name: Publish
46+
## TODO: create a trusted publisher on PyPI
47+
## https://docs.pypi.org/trusted-publishers/
48+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4

.github/workflows/test.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
### A CI workflow template that runs linting and python testing
2+
### TODO: Modify as needed or as desired.
3+
4+
name: Test target-notion
5+
6+
on:
7+
push:
8+
branches: [main]
9+
paths:
10+
- .github/workflows/test.yml
11+
- target_notion/**
12+
- tests/**
13+
- pyproject.toml
14+
- uv.lock
15+
- tox.ini
16+
pull_request:
17+
branches: [main]
18+
paths:
19+
- .github/workflows/test.yml
20+
- target_notion/**
21+
- tests/**
22+
- pyproject.toml
23+
- uv.lock
24+
- tox.ini
25+
workflow_dispatch:
26+
27+
env:
28+
FORCE_COLOR: 1
29+
30+
jobs:
31+
pytest:
32+
runs-on: ubuntu-latest
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
python-version:
37+
- "3.9"
38+
- "3.10"
39+
- "3.11"
40+
- "3.12"
41+
- "3.13"
42+
steps:
43+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
44+
- name: Set up Python ${{ matrix.python-version }}
45+
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
46+
with:
47+
python-version: ${{ matrix.python-version }}
48+
- run: pipx install tox
49+
- name: Run Tox
50+
run: |
51+
tox -e $(echo py${{ matrix.python-version }} | tr -d .)

.gitignore

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Secrets and internal config files
2+
.secrets/*
3+
.vscode/*
4+
plugins/
5+
6+
# Ignore meltano internal cache and sqlite systemdb
7+
8+
.meltano/
9+
meltano.yml
10+
11+
# Byte-compiled / optimized / DLL files
12+
__pycache__/
13+
*.py[cod]
14+
*$py.class
15+
16+
# C extensions
17+
*.so
18+
19+
# Distribution / packaging
20+
.Python
21+
build/
22+
develop-eggs/
23+
dist/
24+
downloads/
25+
eggs/
26+
.eggs/
27+
lib/
28+
lib64/
29+
parts/
30+
sdist/
31+
var/
32+
wheels/
33+
pip-wheel-metadata/
34+
share/python-wheels/
35+
*.egg-info/
36+
.installed.cfg
37+
*.egg
38+
MANIFEST
39+
40+
# PyInstaller
41+
# Usually these files are written by a python script from a template
42+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
43+
*.manifest
44+
*.spec
45+
46+
# Installer logs
47+
pip-log.txt
48+
pip-delete-this-directory.txt
49+
50+
# Unit test / coverage reports
51+
htmlcov/
52+
.tox/
53+
.nox/
54+
.coverage
55+
.coverage.*
56+
.cache
57+
nosetests.xml
58+
coverage.xml
59+
*.cover
60+
*.py,cover
61+
.hypothesis/
62+
.pytest_cache/
63+
64+
# Translations
65+
*.mo
66+
*.pot
67+
68+
# Django stuff:
69+
*.log
70+
local_settings.py
71+
db.sqlite3
72+
db.sqlite3-journal
73+
74+
# Flask stuff:
75+
instance/
76+
.webassets-cache
77+
78+
# Scrapy stuff:
79+
.scrapy
80+
81+
# Sphinx documentation
82+
docs/_build/
83+
84+
# PyBuilder
85+
target/
86+
87+
# Jupyter Notebook
88+
.ipynb_checkpoints
89+
90+
# IPython
91+
profile_default/
92+
ipython_config.py
93+
94+
# pyenv
95+
.python-version
96+
97+
# pipenv
98+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
99+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
100+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
101+
# install all needed dependencies.
102+
#Pipfile.lock
103+
104+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
105+
__pypackages__/
106+
107+
# Celery stuff
108+
celerybeat-schedule
109+
celerybeat.pid
110+
111+
# SageMath parsed files
112+
*.sage.py
113+
114+
# Environments
115+
.env
116+
.venv
117+
env/
118+
venv/
119+
ENV/
120+
env.bak/
121+
venv.bak/
122+
123+
# Spyder project settings
124+
.spyderproject
125+
.spyproject
126+
127+
# Rope project settings
128+
.ropeproject
129+
130+
# mkdocs documentation
131+
/site
132+
133+
# mypy
134+
.mypy_cache/
135+
.dmypy.json
136+
dmypy.json
137+
138+
# Pyre type checker
139+
.pyre/

.pre-commit-config.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
ci:
2+
autofix_prs: true
3+
autoupdate_schedule: weekly
4+
autoupdate_commit_msg: 'chore: pre-commit autoupdate'
5+
skip:
6+
- uv-lock
7+
8+
repos:
9+
- repo: https://github.com/pre-commit/pre-commit-hooks
10+
rev: v5.0.0
11+
hooks:
12+
- id: check-json
13+
exclude: |
14+
(?x)^(
15+
.*/launch.json
16+
)$
17+
- id: check-toml
18+
- id: check-yaml
19+
- id: end-of-file-fixer
20+
- id: trailing-whitespace
21+
22+
- repo: https://github.com/python-jsonschema/check-jsonschema
23+
rev: 0.33.0
24+
hooks:
25+
- id: check-dependabot
26+
- id: check-github-workflows
27+
- id: check-meltano
28+
29+
- repo: https://github.com/astral-sh/ruff-pre-commit
30+
rev: v0.11.6
31+
hooks:
32+
- id: ruff
33+
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
34+
- id: ruff-format
35+
36+
- repo: https://github.com/pre-commit/mirrors-mypy
37+
rev: v1.15.0
38+
hooks:
39+
- id: mypy
40+
additional_dependencies:
41+
- sqlalchemy-stubs
42+
43+
- repo: https://github.com/astral-sh/uv-pre-commit
44+
rev: 0.6.14
45+
hooks:
46+
- id: uv-lock
47+
- id: uv-sync

.secrets/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# IMPORTANT! This folder is hidden from git - if you need to store config files or other secrets,
2+
# make sure those are never staged for commit into your git repo. You can store them here or another
3+
# secure location.
4+
#
5+
# Note: This may be redundant with the global .gitignore for, and is provided
6+
# for redundancy. If the `.secrets` folder is not needed, you may delete it
7+
# from the project.
8+
9+
*
10+
!.gitignore

0 commit comments

Comments
 (0)