Skip to content

Commit 8b756cb

Browse files
committed
chore: initial setup
0 parents  commit 8b756cb

18 files changed

Lines changed: 3041 additions & 0 deletions

.dockerignore

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Git
2+
.git
3+
.gitignore
4+
5+
# Python
6+
__pycache__
7+
*.pyc
8+
*.pyo
9+
*.pyd
10+
.Python
11+
env
12+
pip-log.txt
13+
pip-delete-this-directory.txt
14+
.tox
15+
.coverage
16+
.coverage.*
17+
.pytest_cache
18+
nosetests.xml
19+
coverage.xml
20+
*.cover
21+
*.log
22+
.cache
23+
.mypy_cache
24+
.ruff_cache
25+
26+
# Virtual environments
27+
.env
28+
.venv
29+
env/
30+
venv/
31+
ENV/
32+
env.bak/
33+
venv.bak/
34+
35+
# IDE
36+
.vscode/
37+
.idea/
38+
*.swp
39+
*.swo
40+
*~
41+
42+
# OS
43+
.DS_Store
44+
.DS_Store?
45+
._*
46+
.Spotlight-V100
47+
.Trashes
48+
ehthumbs.db
49+
Thumbs.db
50+
51+
# Build artifacts
52+
build/
53+
dist/
54+
*.egg-info/
55+
.uv-cache/
56+
57+
# Documentation
58+
docs/_build/

.github/workflows/publish-wiki.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Publish Wiki
2+
3+
# Only run on pushes to main branch
4+
on:
5+
push:
6+
branches: [main]
7+
paths:
8+
- wiki/**
9+
- .github/workflows/publish-wiki.yml
10+
11+
# Prevent multiple wiki deployments from running simultaneously
12+
concurrency:
13+
group: publish-wiki
14+
cancel-in-progress: true
15+
16+
# Required permissions to push to the wiki
17+
permissions:
18+
contents: write
19+
20+
jobs:
21+
publish-wiki:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Publish to GitHub Wiki
28+
uses: Andrew-Chen-Wang/github-wiki-action@v4
29+
with:
30+
# Use the default path 'wiki/'
31+
path: wiki/
32+
# Use default token with contents: write permission
33+
token: ${{ github.token }}
34+
# Default strategy is 'clone' which preserves history
35+
strategy: clone
36+
# Enable preprocessing to convert README.md to Home.md and fix links
37+
preprocess: true
38+
# Don't create empty commits if no changes
39+
disable-empty-commits: true
40+
# Custom commit message
41+
commit-message: "Update wiki from main branch (${{ github.sha }})"
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Required Checks
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "*"
7+
workflow_dispatch: # Allow manual trigger
8+
9+
10+
jobs:
11+
required-checks:
12+
name: Required Checks (Lint + Test)
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup uv
20+
uses: astral-sh/setup-uv@v4
21+
with:
22+
enable-cache: true
23+
24+
- name: Setup Python
25+
run: uv python install 3.12
26+
27+
- name: Create virtual environment
28+
run: uv venv
29+
30+
- name: Install dependencies
31+
run: make install-dev
32+
33+
- name: Lint check
34+
id: lint
35+
run: make lint
36+
37+
- name: Format check
38+
id: format
39+
run: make format-check
40+
41+
- name: Test
42+
id: test
43+
run: make test

.gitignore

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# UV
30+
.venv/
31+
32+
# PyInstaller
33+
# Usually these files are written by a python script from a template
34+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
35+
*.manifest
36+
*.spec
37+
38+
# Installer logs
39+
pip-log.txt
40+
pip-delete-this-directory.txt
41+
42+
# Unit test / coverage reports
43+
htmlcov/
44+
.tox/
45+
.nox/
46+
.coverage
47+
.coverage.*
48+
.cache
49+
nosetests.xml
50+
coverage.xml
51+
*.cover
52+
*.py,cover
53+
.hypothesis/
54+
.pytest_cache/
55+
cover/
56+
57+
# Translations
58+
*.mo
59+
*.pot
60+
61+
# Django stuff:
62+
*.log
63+
local_settings.py
64+
db.sqlite3
65+
db.sqlite3-journal
66+
67+
# Flask stuff:
68+
instance/
69+
.webassets-cache
70+
71+
# Scrapy stuff:
72+
.scrapy
73+
74+
# Sphinx documentation
75+
docs/_build/
76+
77+
# PyBuilder
78+
.pybuilder/
79+
target/
80+
81+
# Jupyter Notebook
82+
.ipynb_checkpoints
83+
84+
# IPython
85+
profile_default/
86+
ipython_config.py
87+
88+
# pyenv
89+
# For a library or package, you might want to ignore these files since the code is
90+
# intended to run in multiple environments; otherwise, check them in:
91+
# .python-version
92+
93+
# pipenv
94+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
96+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
97+
# install all needed dependencies.
98+
#Pipfile.lock
99+
100+
# poetry
101+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
102+
# This is especially recommended for binary packages to ensure reproducibility, and is more
103+
# commonly ignored for libraries.
104+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
105+
#poetry.lock
106+
107+
# pdm
108+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
109+
#pdm.lock
110+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
111+
# in version control.
112+
# https://pdm.fming.dev/#use-with-ide
113+
.pdm.toml
114+
115+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
116+
__pypackages__/
117+
118+
# Celery stuff
119+
celerybeat-schedule
120+
celerybeat.pid
121+
122+
# SageMath parsed files
123+
*.sage.py
124+
125+
# Environments
126+
.env
127+
.venv
128+
env/
129+
venv/
130+
ENV/
131+
env.bak/
132+
venv.bak/
133+
134+
# Spyder project settings
135+
.spyderproject
136+
.spyproject
137+
138+
# Rope project settings
139+
.ropeproject
140+
141+
# mkdocs documentation
142+
/site
143+
144+
# mypy
145+
.mypy_cache/
146+
.dmypy.json
147+
dmypy.json
148+
149+
# Pyre type checker
150+
.pyre/
151+
152+
# pytype static type analyzer
153+
.pytype/
154+
155+
# Cython debug symbols
156+
cython_debug/
157+
158+
# PyCharm
159+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
160+
# be added to the global gitignore or merged into this project gitignore.
161+
# For PyCharm Community Edition, use 'pycharm-ce'
162+
.idea/
163+
164+
# VS Code
165+
.vscode/settings.json
166+
.vscode/launch.json
167+
.vscode/extensions.json
168+
.vscode/tasks.json
169+
.vscode/c_cpp_properties.json
170+
.vscode/settings.json

Makefile

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
.PHONY: help install install-dev lint lint-fix format check test clean build upload upload-test
2+
3+
# Default target
4+
help:
5+
@echo "Available commands:"
6+
@echo " install - Install the package in editable mode"
7+
@echo " install-dev - Install the package with development dependencies"
8+
@echo " lint - Run ruff linter (check only)"
9+
@echo " lint-fix - Run ruff linter and fix errors automatically"
10+
@echo " format - Format code with ruff"
11+
@echo " check - Run all checks (lint + format check + tests)"
12+
@echo " test - Run tests with pytest"
13+
@echo " clean - Clean build artifacts and cache files"
14+
@echo " build - Build the package for distribution"
15+
@echo " upload-test - Upload package to TestPyPI"
16+
@echo " upload - Upload package to PyPI"
17+
@echo " info - Show package information"
18+
19+
# Install the package in editable mode
20+
install:
21+
uv pip install -e .
22+
23+
# Install the package with development dependencies
24+
install-dev:
25+
uv pip install -e ".[dev]"
26+
27+
# Run ruff linter (check only)
28+
lint:
29+
uv run ruff check .
30+
31+
# Run ruff linter and fix errors automatically
32+
lint-fix:
33+
uv run ruff check --fix .
34+
35+
# Format code with ruff
36+
format:
37+
uv run ruff format .
38+
39+
# Check if code is properly formatted (without making changes)
40+
format-check:
41+
uv run ruff format --check .
42+
43+
# Run all checks (lint + format check + tests)
44+
check: lint format-check test
45+
46+
# Run tests with pytest
47+
test:
48+
uv run pytest
49+
50+
# Clean build artifacts and cache files
51+
clean:
52+
rm -rf build/
53+
rm -rf dist/
54+
rm -rf *.egg-info/
55+
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
56+
find . -type f -name "*.pyc" -delete
57+
find . -type f -name "*.pyo" -delete
58+
59+
# Build the package for distribution
60+
build: clean
61+
uv build
62+
63+
# Upload package to TestPyPI (requires TWINE_USERNAME and TWINE_PASSWORD env vars)
64+
upload-test: build
65+
uv run twine upload --repository testpypi dist/*
66+
67+
# Upload package to PyPI (requires TWINE_USERNAME and TWINE_PASSWORD env vars)
68+
upload: build
69+
uv run twine upload dist/*
70+
71+
# Install twine for package uploading (run this once before upload commands)
72+
install-twine:
73+
uv add --dev twine

0 commit comments

Comments
 (0)