-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 20220a4
Showing
66 changed files
with
6,501 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
max-complexity = 10 | ||
select = C,E,F,W,B,B950 | ||
ignore = E203,E501,W503 | ||
exclude = | ||
.git, | ||
__pycache__, | ||
*.egg-info, | ||
.nox, | ||
.pytest_cache, | ||
.mypy_cache | ||
__init__.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Build docs | ||
on: | ||
push: | ||
branches: ["main"] | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: "actions/checkout@v3" | ||
- uses: "actions/setup-python@v4" | ||
with: | ||
python-version: 3.8 | ||
- name: Install poetry | ||
run: | | ||
python -m pip install --upgrade pip | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
- name: Configure poetry | ||
run: poetry config virtualenvs.create false | ||
- name: Install dependencies | ||
run: poetry install | ||
- run: mkdocs gh-deploy --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Publish on Pypi | ||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
publish: | ||
name: "Publish release" | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- uses: "actions/checkout@v3" | ||
- uses: "actions/setup-python@v4" | ||
with: | ||
python-version: 3.8 | ||
- name: Install poetry | ||
run: | | ||
python -m pip install --upgrade pip | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
- name: Configure poetry | ||
run: poetry config virtualenvs.create false | ||
- name: Install dependencies | ||
run: poetry install | ||
- name: Publish | ||
env: | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
poetry config pypi-token.pypi $PYPI_TOKEN | ||
poetry publish --build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: Python package | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
jobs: | ||
tests: | ||
name: "Python ${{ matrix.python-version }}" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
|
||
services: | ||
postgres: | ||
image: postgres:14-alpine | ||
env: | ||
POSTGRES_USER: username | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_DB: test_db | ||
ports: | ||
- 5432:5432 | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
|
||
mysql: | ||
image: mysql:8 | ||
env: | ||
MYSQL_ROOT_PASSWORD: password | ||
MYSQL_USER: username | ||
MYSQL_PASSWORD: password | ||
MYSQL_DATABASE: test_db | ||
ports: | ||
- 3306:3306 | ||
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 10 | ||
|
||
minio: | ||
image: minio/minio:edge-cicd | ||
env: | ||
MINIO_ROOT_USER: minioadmin | ||
MINIO_ROOT_PASSWORD: minioadmin | ||
ports: | ||
- 9000:9000 | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install poetry | ||
run: | | ||
python -m pip install --upgrade pip | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
- name: Configure poetry | ||
run: poetry config virtualenvs.create false | ||
- name: Install dependencies | ||
run: poetry install | ||
- name: Lint | ||
run: poetry run bash scripts/lint.sh | ||
- name: Test Local Storage provider & sqlite | ||
env: | ||
ENGINE: 'sqlite:///test.db?check_same_thread=False' | ||
STORAGE_PROVIDER: 'LOCAL' | ||
LOCAL_PATH: '/tmp/storage' | ||
run: poetry run coverage run -m pytest tests | ||
- name: Test Local Storage provider & postgresql | ||
env: | ||
ENGINE: 'postgresql+psycopg2://username:password@localhost:5432/test_db' | ||
STORAGE_PROVIDER: 'LOCAL' | ||
LOCAL_PATH: '/tmp/storage' | ||
run: poetry run coverage run -m pytest tests | ||
- name: Test Local Storage provider & mysql | ||
env: | ||
ENGINE: 'mysql+pymysql://username:password@localhost:3306/test_db' | ||
STORAGE_PROVIDER: 'LOCAL' | ||
LOCAL_PATH: '/tmp/storage' | ||
run: poetry run coverage run -m pytest tests | ||
- name: Test Minio Storage provider & sqlite memory | ||
env: | ||
ENGINE: 'sqlite:///:memory:?check_same_thread=False' | ||
STORAGE_PROVIDER: 'MINIO' | ||
MINIO_KEY: 'minioadmin' | ||
MINIO_SECRET: 'minioadmin' | ||
MINIO_HOST: 'localhost' | ||
MINIO_PORT: 9000 | ||
MINIO_SECURE: false | ||
run: poetry run coverage run -m pytest tests | ||
- name: Coverage Report | ||
run: poetry run bash scripts/coverage.sh | ||
- name: Upload coverage | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
|
||
### macOS ### | ||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
### Python ### | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
pytestdebug.log | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
doc/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# Pipfile.lock | ||
|
||
# poetry | ||
# poetry.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
*.env* | ||
.env/ | ||
.venv/ | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
pythonenv* | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/public | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# operating system-related files | ||
# *.DS_Store | ||
Thumbs.db | ||
|
||
# profiling data | ||
.prof | ||
|
||
### VirtualEnv ### | ||
# Virtualenv | ||
[Bb]in | ||
[Ii]nclude | ||
[Ll]ib | ||
[Ll]ib64 | ||
[Ll]ocal | ||
pyvenv.cfg | ||
.venv | ||
pip-selfcheck.json | ||
|
||
### VisualStudioCode ### | ||
*.code-workspace | ||
.vscode/* | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
.history | ||
.ionide | ||
|
||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Jocelin Hounon | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.