Skip to content

Remove chardet, pytest-pep8 from dependencies, update music21 and fix haydn_op20 loader - #706

Merged
magdalenafuentes merged 7 commits into
mir-dataset-loaders:masterfrom
yujin-kimmm:fix/test_download_utils
Jul 14, 2026
Merged

Remove chardet, pytest-pep8 from dependencies, update music21 and fix haydn_op20 loader#706
magdalenafuentes merged 7 commits into
mir-dataset-loaders:masterfrom
yujin-kimmm:fix/test_download_utils

Conversation

@yujin-kimmm

@yujin-kimmm yujin-kimmm commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Closes #703, Closes #704

Description

Currently CI was failing because of chardet and music21.

Recent updates in chardet changed its encoding prediction, causing unicode extraction test to fail.
Encoding issue was found from irmas and goodsounds datasets, however, those two datasets can be encoded well with UTF-8. Therefore, fallback to chardet prediction in extractall_unicode is unnecessary.

Recent updates in music21 changed the API: score.flat() -> score.flatten(), which breaks the test.

++ 0629

pytest loads the pytest-pep8 automatically, which is no longer compatible with pytest 9, and it rejects its outdate pytest_collect_file(path, parent) hook signature.
This makes pytest fail before any tests run.

Mirdata already uses flake8 for style checks, and currently, test does not use pytest-pep8. So pytest-pep8 is no longer needed.

Changes

  • Remove Chardet from dependencies, remove the encoding prediction fallback in extractall_unicode
  • Update music21 to support newer version
  • Fix haydn_op20 loader to support the new music21 API.

++0629

  • Remove pytest-pep8 from pyproject.toml and CI environment.

@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.13%. Comparing base (5f51224) to head (8d4fc19).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #706      +/-   ##
==========================================
+ Coverage   97.12%   97.13%   +0.01%     
==========================================
  Files          71       71              
  Lines        7824     7828       +4     
==========================================
+ Hits         7599     7604       +5     
+ Misses        225      224       -1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yujin-kimmm yujin-kimmm changed the title Remove chardet from dependencies, update music21 and fix haydn_op20 loader Remove chardet, pytest-pep8 from dependencies, update music21 and fix haydn_op20 loader Jul 4, 2026
@magdalenafuentes
magdalenafuentes merged commit 0f16526 into mir-dataset-loaders:master Jul 14, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

haydn_op20 fails with music21 Unicode extraction test fails in CI

2 participants