-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #529 from superbock/github_actions
configure CI pipeline with GitHub actions
- Loading branch information
Showing
57 changed files
with
202 additions
and
308 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,2 @@ | ||
[codespell] | ||
ignore-words-list = linz |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
[flake8] | ||
ignore = E203,W503,Q000 | ||
max-line-length = 80 | ||
ignore = E203,W503 | ||
max-complexity = 18 | ||
max-line-length = 120 | ||
per-file-ignores = | ||
*/__init__.py: F401 | ||
tests/***.py: F405 | ||
tests/*: F405 |
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,38 @@ | ||
name: Python package | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' # caching pip dependencies | ||
- name: Install dependencies | ||
run: | | ||
sudo apt install ffmpeg libfftw3-dev | ||
python -m pip install --upgrade pip | ||
pip install pytest pytest-cov ruff | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
# - name: Lint with ruff | ||
# run: | | ||
# # stop the build if there are Python syntax errors or undefined names | ||
# ruff --format=github --select=E9,F63,F7,F82 --target-version=py37 . | ||
# # default set of ruff rules with GitHub Annotations | ||
# ruff --format=github --target-version=py37 . | ||
- name: Setup madmom | ||
run: | | ||
git submodule update --init --remote | ||
pip install -e . | ||
- name: Test with pytest | ||
run: | | ||
pytest --cov --doctest-ignore-import-errors madmom tests |
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
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,5 @@ | ||
[settings] | ||
profile=black | ||
known_madmom=madmom | ||
sections=FUTURE,STDLIB,FIRSTPARTY,THIRDPARTY,LOCALFOLDER,MADMOM | ||
line_length=120 |
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 |
---|---|---|
@@ -1,27 +1,63 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
rev: v4.4.0 | ||
hooks: # for a list of hooks see https://github.com/pre-commit/pre-commit-hooks | ||
- id: check-added-large-files | ||
args: ['--maxkb=100'] | ||
- id: check-builtin-literals | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-executables-have-shebangs | ||
- id: check-json | ||
- id: check-shebang-scripts-are-executable | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: destroyed-symlinks | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: file-contents-sorter | ||
- id: fix-byte-order-marker | ||
- id: mixed-line-ending | ||
- id: name-tests-test | ||
- id: no-commit-to-branch | ||
- id: pretty-format-json | ||
- id: requirements-txt-fixer | ||
- id: sort-simple-yaml | ||
- id: trailing-whitespace | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.9.2 | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: [ '--settings-path', '.isort.cfg', '-a', 'from __future__ import annotations' ] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.10.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: [ '--py39-plus', '--keep-runtime-typing'] | ||
- repo: https://github.com/psf/black | ||
rev: 23.9.0 | ||
hooks: | ||
- id: black | ||
entry: black -t py39 -l 120 -S . | ||
- repo: https://github.com/PyCQA/autoflake | ||
rev: v2.2.1 | ||
hooks: | ||
- id: | ||
autoflake | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.1.0 # 6.0.0 with flake8-quotes raises ValueError | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: ['flake8-quotes'] | ||
- repo: https://github.com/PyCQA/prospector | ||
rev: 1.10.2 | ||
hooks: | ||
- id: prospector | ||
additional_dependencies: [ 'pylint_pydantic' ] | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.5 | ||
hooks: | ||
- id: codespell | ||
entry: codespell -w -i 3 |
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,32 @@ | ||
[pylint] | ||
|
||
disable= | ||
fixme, | ||
import-error, | ||
import-self, | ||
invalid-name, | ||
line-too-long, | ||
locally-disabled, | ||
logging-fstring-interpolation, | ||
logging-not-lazy, | ||
missing-function-docstring, | ||
missing-class-docstring, | ||
missing-module-docstring, | ||
too-few-public-methods, | ||
too-many-arguments, | ||
too-many-instance-attributes, | ||
too-many-locals, | ||
undefined-variable, | ||
ungrouped-imports, | ||
unspecified-encoding, | ||
unused-import, | ||
unused-variable, | ||
wrong-import-order, | ||
|
||
extension-pkg-whitelist= | ||
cv2 | ||
|
||
generated-members= | ||
numpy.*, | ||
scipy.*, | ||
cv2.*, |
Oops, something went wrong.