-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Big] Adding github action for tests, fixes, black formatting, type h…
…ints, new pianoroll methods * adding test github action, fixes, black formatting, type hints, update setup.py * new notes2pianoroll method, scipy dependency removed, pianoroll tests, constants file, black formatting * pianoroll2notes now have a pitch_range argument
- Loading branch information
Showing
50 changed files
with
681 additions
and
534 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,18 @@ | ||
# Codecov params | ||
|
||
coverage: | ||
status: | ||
project: | ||
default: false # disable the default status that measures entire project | ||
tests: | ||
paths: | ||
- "tests/" | ||
target: 70% | ||
source: | ||
paths: | ||
- "miditoolkit/" | ||
target: 75% | ||
threshold: 0.5% | ||
patch: | ||
default: | ||
enabled: no # target: 75% # new contributions should have a coverage at least equal to target |
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,40 @@ | ||
# PyTest workflow | ||
|
||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | ||
os: [ ubuntu-latest, macOS-latest, windows-latest ] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
# Install local package with tests dependencies extras | ||
python -m pip install --upgrade pip | ||
pip install -e ".[tests]" | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Test with pytest | ||
run: | | ||
pytest --cov=./ --cov-report=xml -n auto | ||
- name: Codecov | ||
uses: codecov/[email protected] |
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,9 +1,9 @@ | ||
''' | ||
""" | ||
Author: Wen-Yi Hsiao, Taiwan | ||
Update date: 2020.06.23 | ||
''' | ||
""" | ||
|
||
from .midi import * | ||
from .pianoroll import * | ||
|
||
__version__ = '0.1.16' | ||
__version__ = "1.0.1" |
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 @@ | ||
""" Constants files | ||
""" | ||
|
||
PITCH_RANGE = (0, 127) |
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
Oops, something went wrong.