Skip to content

Commit 9af60fd

Browse files
committed
Initial version
0 parents  commit 9af60fd

31 files changed

+1164
-0
lines changed

.github/workflows/conda.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test conda
2+
on: [push, pull_request]
3+
4+
jobs:
5+
test:
6+
name: test ${{ matrix.py }} - ${{ matrix.os }}
7+
runs-on: ${{ matrix.os }}-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os:
12+
- Ubuntu
13+
py:
14+
- "3.8"
15+
16+
steps:
17+
- name: Setup python for test ${{ matrix.py }}
18+
uses: actions/setup-python@v3
19+
with:
20+
python-version: ${{ matrix.py }}
21+
- uses: conda-incubator/setup-miniconda@v2
22+
with:
23+
auto-update-conda: true
24+
python-version: ${{ matrix.python-version}}
25+
- uses: actions/checkout@v3
26+
- name: Upgrade pip
27+
run: python -m pip install -U pip
28+
- name: Install dependencies
29+
run: python -m pip install -e '.[test]'
30+
- name: Run pytest
31+
run: pytest

.github/workflows/pyenv.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Test pyenv
2+
on: [push, pull_request]
3+
4+
jobs:
5+
job:
6+
name: "Pytest with pyenv"
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python:
11+
- 3.9
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Install python version
16+
uses: gabrielfalcao/pyenv-action@v13
17+
with:
18+
default: "${{ matrix.python }}"
19+
command: pip install -U pip # upgrade pip after installing python
20+
- name: Install pyenv-virtualenv
21+
run: git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
22+
- name: Install dependencies
23+
run: pip install -e '.[test]'
24+
- name: Run tests
25+
run: pytest

.github/workflows/venv.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test venv
2+
on: [push, pull_request]
3+
4+
jobs:
5+
test:
6+
name: test ${{ matrix.py }} - ${{ matrix.os }}
7+
runs-on: ${{ matrix.os }}-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os:
12+
- Ubuntu
13+
# - Windows
14+
- MacOs
15+
py:
16+
- "3.11"
17+
- "3.10"
18+
- "3.9"
19+
- "3.8"
20+
21+
steps:
22+
- name: Setup python for test ${{ matrix.py }}
23+
uses: actions/setup-python@v3
24+
with:
25+
python-version: ${{ matrix.py }}
26+
- uses: actions/checkout@v3
27+
- name: Upgrade pip
28+
run: python -m pip install -U pip
29+
- name: Install dependencies
30+
run: python -m pip install -e '.[test]'
31+
- name: Run pytest
32+
run: pytest

.gitignore

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# custom environments
2+
!examples/venv
3+
**/*.envs
4+
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/

.pre-commit-config.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
default_language_version:
2+
python: python3.11
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.4.0
6+
hooks:
7+
- id: check-added-large-files
8+
- id: check-toml
9+
- id: check-yaml
10+
args:
11+
- --unsafe
12+
- id: end-of-file-fixer
13+
- id: trailing-whitespace
14+
- repo: https://github.com/asottile/pyupgrade
15+
rev: v3.3.1
16+
hooks:
17+
- id: pyupgrade
18+
args:
19+
- --py3-plus
20+
- --keep-runtime-typing
21+
- repo: https://github.com/charliermarsh/ruff-pre-commit
22+
rev: v0.0.254
23+
hooks:
24+
- id: ruff
25+
args:
26+
- --fix
27+
- repo: https://github.com/pycqa/isort
28+
rev: 5.12.0
29+
hooks:
30+
- id: isort
31+
name: isort (python)
32+
- id: isort
33+
name: isort (cython)
34+
types: [cython]
35+
- id: isort
36+
name: isort (pyi)
37+
types: [pyi]
38+
- repo: https://github.com/psf/black
39+
rev: 23.1.0
40+
hooks:
41+
- id: black
42+
- repo: https://github.com/pre-commit/mirrors-mypy
43+
rev: v1.1.1
44+
hooks:
45+
- id: mypy

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright: (c) 2023-present David Rubinstein
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)