Skip to content

Commit 0ebe74e

Browse files
committed
Initial commit
0 parents  commit 0ebe74e

136 files changed

Lines changed: 19026 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pr.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: PR Tests
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
13+
- name: Set up Python
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.11"
17+
18+
- name: Install Rust
19+
uses: dtolnay/rust-toolchain@stable
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v3
23+
24+
- name: Sync dependencies (locked)
25+
run: |
26+
uv sync --locked --all-groups --all-extras
27+
28+
- name: Run Ruff
29+
run: |
30+
make lint
31+
32+
- name: Run Ty
33+
run: |
34+
make typecheck
35+
36+
test:
37+
runs-on: ubuntu-latest
38+
strategy:
39+
fail-fast: true
40+
matrix:
41+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
46+
- name: Set up Python ${{ matrix.python-version }}
47+
uses: actions/setup-python@v5
48+
with:
49+
python-version: ${{ matrix.python-version }}
50+
51+
- name: Install uv
52+
uses: astral-sh/setup-uv@v3
53+
54+
- name: Install dependencies
55+
run: uv sync --group dev
56+
57+
- name: Run tests
58+
run: make test

.github/workflows/publish.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
id-token: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.12"
25+
26+
- name: Install uv
27+
uses: astral-sh/setup-uv@v3
28+
29+
- name: Build package
30+
run: uv build
31+
32+
- name: Upload artifacts
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: dist
36+
path: dist/
37+
38+
publish-package:
39+
runs-on: ubuntu-latest
40+
needs: [build]
41+
permissions:
42+
contents: read
43+
id-token: write
44+
steps:
45+
- name: Download artifacts
46+
uses: actions/download-artifact@v4
47+
with:
48+
name: dist
49+
path: dist/
50+
51+
- name: Publish to PyPI
52+
uses: pypa/gh-action-pypi-publish@release/v1
53+
with:
54+
packages-dir: dist/
55+
56+
publish-docs:
57+
runs-on: ubuntu-latest
58+
needs: [publish-package]
59+
permissions:
60+
contents: write
61+
steps:
62+
- uses: actions/checkout@v4
63+
64+
- uses: actions/setup-python@v5
65+
with:
66+
python-version: "3.12"
67+
68+
- name: Install uv
69+
uses: astral-sh/setup-uv@v3
70+
71+
- name: Sync dependencies
72+
run: uv sync --group dev
73+
74+
- name: Deploy to GitHub Pages
75+
run: uv run mkdocs gh-deploy --force

.gitignore

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

CLA.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
Contributor License Agreement
2+
3+
Thank you for your interest in contributing to the Pacta project.
4+
5+
This Contributor License Agreement ("Agreement") applies to any
6+
contribution that you make to the Pacta project.
7+
8+
1. Definitions
9+
10+
"You" (or "Your") shall mean the copyright owner or legal entity
11+
authorized by the copyright owner that is making this Agreement.
12+
13+
"Contribution" shall mean any original work of authorship,
14+
including any modifications or additions to an existing work,
15+
that is intentionally submitted by You to the Pacta project.
16+
17+
2. Grant of Copyright License
18+
19+
You hereby grant to the Pacta Project maintainers a perpetual,
20+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
21+
copyright license to reproduce, prepare derivative works of,
22+
publicly display, publicly perform, sublicense, and distribute
23+
Your Contributions and such derivative works.
24+
25+
3. Grant of Patent License
26+
27+
You hereby grant to the Pacta Project maintainers a perpetual,
28+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
29+
(except as stated in this section) patent license to make, have
30+
made, use, offer to sell, sell, import, and otherwise transfer
31+
the Work, where such license applies only to those patent claims
32+
licensable by You that are necessarily infringed by Your Contribution.
33+
34+
4. Representations
35+
36+
You represent that:
37+
- You are legally entitled to grant the above license.
38+
- Each Contribution is Your original creation or You have
39+
sufficient rights to submit it.
40+
41+
5. Relicensing
42+
43+
You agree that the Pacta Project maintainers may license or
44+
relicense Your Contribution under any license, including
45+
proprietary or commercial licenses, provided that this does not
46+
limit Your right to use Your Contribution under the original
47+
open-source license.
48+
49+
6. No Warranty
50+
51+
You provide Your Contributions on an "AS IS" basis, without
52+
warranties or conditions of any kind.

0 commit comments

Comments
 (0)