forked from mir-evaluation/mir_eval
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test and CI modernization (mir-evaluation#370)
* test_alignments → pytest * test_key → pytest * test_onset → pytest * test_patterns → pytest * updating sonify tests * transcription velocity updates * fixed a hack in onset test * test_beats → pytest * test_beats → pytest * test_beats → pytest * updating CI configs to run again * adding scipy config dump to ci action * reverting some working direcory business * modernized test_segment * migrated to setup.cfg * adding minimal dependency environment for CI * fixing ci spec * ignore coverage files * modernized multipitch tests * temporarily disabling concurrency failures to test-drive new environment configs * py312 issues * modernized test_tempo * removed unused import * test_transcription modernized * removed nose from display test * fixed display test code * modernized melody tests * modernized util tests * modernized test_io * modernized hierarchy tests * modernized separation tests * chord test translation in progress * chord test translation in progress * chord test translation in progress * test modernization complete * blacked the tests * Adding linter action * ingesting style check configs * mild spellchecking * Fixed spellcheck dictionary * blaked package code * velinized docstrings * velinized docstrings * docstyle checks on util and key * docstyle updatse * docstyle updates for chord * docstyle updates * velinizing again * docstyle on patterns * docstyle pass * black updates * don't require bz2 for conda packages * let's see if tv tests pass on minimal env * let's see if tv tests pass on minimal env * disabling group concurrency for now * trying once more with disbaling fail-fast * skipping broken chord sonification test for now * skipping display tests for now * blacking tests again * explicitizing a scalar conversion in goto metric to avoid numpy warning * dancing around fancy index deprecations in numpy * dancing around fancy index deprecations in numpy * suppressing noisy warnings in melody * making segment empty tests more precise * catching more warnings in separation test * blacking tests * bumpy min numpy version, redoing transscription velocity fixture 2 * formatting * updated minimal scipy to 1.4 * bumping min matplotlib as well * bumping min matplotlib as well * bumping matplotlib to 3.0 (2018) * making minimal numpy match scipy requirement * Trying mpl-base instead of full package for test environment * Maybe mpl 3.3 will work * bumping numpy to 1.15.4 * removing janky warn nesting in separation test * forgot to modernize multipitch tests * update action versions * fixed content type for setup.cfg description
- Loading branch information
Showing
48 changed files
with
5,108 additions
and
4,412 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,5 @@ | ||
nce | ||
fpr | ||
shepard | ||
dum | ||
theis |
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: lint | ||
channels: | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
# required | ||
- pip | ||
- bandit | ||
- codespell | ||
- flake8 | ||
- pytest | ||
- pydocstyle | ||
|
||
# Dependencies for velin | ||
- numpydoc>=1.1.0 | ||
- sphinx>=5.1.0 | ||
- pygments | ||
- black | ||
|
||
- pip: | ||
- velin |
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,12 @@ | ||
name: test | ||
channels: | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- pip | ||
- numpy ==1.15.4 | ||
- scipy ==1.4.0 | ||
- matplotlib-base==3.3.0 | ||
- pytest | ||
- pytest-cov | ||
- pytest-mpl |
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,71 @@ | ||
name: lint_python | ||
on: [pull_request, push] | ||
jobs: | ||
lint_python: | ||
name: "Lint and code analysis" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
python-version: "3.11" | ||
channel-priority: "flexible" | ||
envfile: ".github/environment-lint.yml" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Cache conda | ||
uses: actions/cache@v4 | ||
env: | ||
CACHE_NUMBER: 0 | ||
with: | ||
path: ~/conda_pkgs_dir | ||
key: ${{ runner.os }}-${{ matrix.python-version }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles( matrix.envfile ) }} | ||
- name: Install conda environmnent | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
auto-update-conda: false | ||
python-version: ${{ matrix.python-version }} | ||
add-pip-as-python-dependency: true | ||
auto-activate-base: false | ||
activate-environment: lint | ||
# mamba-version: "*" | ||
channel-priority: ${{ matrix.channel-priority }} | ||
environment-file: ${{ matrix.envfile }} | ||
use-only-tar-bz2: false | ||
|
||
- name: Conda info | ||
shell: bash -l {0} | ||
run: | | ||
conda info -a | ||
conda list | ||
- name: Spell check package | ||
shell: bash -l {0} | ||
run: codespell --ignore-words .codespell_ignore_list mir_eval | ||
|
||
- name: Security check | ||
shell: bash -l {0} | ||
run: bandit --recursive --skip B101,B110 . | ||
|
||
- name: Style check package | ||
shell: bash -l {0} | ||
run: python -m flake8 mir_eval | ||
|
||
- name: Format check package | ||
shell: bash -l {0} | ||
run: python -m black --check mir_eval | ||
|
||
- name: Format check tests | ||
shell: bash -l {0} | ||
run: python -m black --check tests | ||
|
||
- name: Docstring check | ||
shell: bash -l {0} | ||
run: python -m velin --check mir_eval | ||
|
||
- name: Docstring style check | ||
shell: bash -l {0} | ||
run: python -m pydocstyle mir_eval |
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
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 |
---|---|---|
|
@@ -20,4 +20,4 @@ | |
from . import transcription_velocity | ||
from . import key | ||
|
||
__version__ = '0.7' | ||
__version__ = "0.7" |
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.