Skip to content

Commit 17c9ccd

Browse files
committed
Initialize
0 parents  commit 17c9ccd

File tree

19 files changed

+5238
-0
lines changed

19 files changed

+5238
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.ipynb linguist-vendored

.github/workflows/ci.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
precommit:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-python@v3
15+
- uses: pre-commit/action@v3.0.0
16+
17+
lints:
18+
runs-on: ubuntu-latest
19+
needs:
20+
- precommit
21+
strategy:
22+
matrix:
23+
python-version: [ 3.11, 3.12 ]
24+
steps:
25+
- uses: actions/checkout@v3
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v3
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
- uses: astral-sh/setup-uv@v5
31+
with:
32+
version: "latest"
33+
- name: Install dependencies
34+
run: |
35+
uv sync --dev
36+
- name: Run lints
37+
run: |
38+
make lints
39+
40+
tests:
41+
runs-on: ubuntu-latest
42+
needs:
43+
- lints
44+
strategy:
45+
matrix:
46+
python-version: [ 3.11, 3.12 ]
47+
steps:
48+
- uses: actions/checkout@v3
49+
- name: Set up Python ${{ matrix.python-version }}
50+
uses: actions/setup-python@v3
51+
with:
52+
python-version: ${{ matrix.python-version }}
53+
- uses: astral-sh/setup-uv@v5
54+
with:
55+
version: "latest"
56+
- name: Install dependencies
57+
run: |
58+
uv sync --dev
59+
- name: Run tests
60+
run: |
61+
make tests
62+
- name: Upload coverage reports to Codecov
63+
uses: codecov/codecov-action@v3
64+
env:
65+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/release.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: release
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: [3.9]
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install pypa/build
21+
run: |
22+
python -m pip install --upgrade build twine
23+
- name: Build a binary wheel and a source tarball
24+
run: |
25+
python -m build --sdist --wheel --outdir dist/ .
26+
- name: Publish a Python distribution to PyPI
27+
if: startsWith(github.ref, 'refs/tags')
28+
uses: pypa/gh-action-pypi-publish@release/v1
29+
with:
30+
password: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
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+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# poetry
98+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102+
#poetry.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/
140+
141+
# pytype static type analyzer
142+
.pytype/
143+
144+
# Cython debug symbols
145+
cython_debug/
146+
147+
# PyCharm
148+
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can
149+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
150+
# and can be added to the global gitignore or merged into this file. For a more nuclear
151+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
152+
.idea/
153+
154+
# vscode
155+
.vscode/
156+
157+
.DS_Store

.gitlint

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[general]
2+
ignore=body-is-missing
3+
4+
[title-min-length]
5+
min-length=10
6+
7+
[title-must-not-contain-word]
8+
words=wip,todo

.pre-commit-config.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.0.1
4+
hooks:
5+
- id: check-docstring-first
6+
- id: check-added-large-files
7+
args: ['--maxkb=1000']
8+
- id: check-merge-conflict
9+
- id: check-toml
10+
- id: check-yaml
11+
- id: debug-statements
12+
- id: end-of-file-fixer
13+
- id: no-commit-to-branch
14+
args: [--branch, main]
15+
- id: requirements-txt-fixer
16+
- id: trailing-whitespace
17+
18+
- repo: https://github.com/pre-commit/mirrors-mypy
19+
rev: v1.15.0
20+
hooks:
21+
- id: mypy
22+
args: ["--ignore-missing-imports"]
23+
files: "(fll)"
24+
25+
- repo: https://github.com/astral-sh/ruff-pre-commit
26+
rev: v0.3.0
27+
hooks:
28+
- id: ruff
29+
args: [ --fix ]
30+
- id: ruff-format
31+
32+
- repo: https://github.com/jorisroovers/gitlint
33+
rev: v0.18.0
34+
hooks:
35+
- id: gitlint
36+
- id: gitlint-ci

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.11.9

0 commit comments

Comments
 (0)