craffel / mir_eval

Evaluation functions for music/audio information retrieval/signal processing algorithms.
MIT License
603 stars 112 forks source link

Fix length error in sonify.time_frequency #374

Closed bmcfee closed 6 months ago

bmcfee commented 6 months ago

This PR fixes #371 by separating out the slicing logic for time_frequency generation.

I've unskipped the test that was previously failing and things seem good to go.

codecov-commenter commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.32%. Comparing base (7997fdf) to head (76d9500).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #374 +/- ## ========================================== + Coverage 88.31% 88.32% +0.01% ========================================== Files 19 19 Lines 2875 2878 +3 ========================================== + Hits 2539 2542 +3 Misses 336 336 ``` | [Flag](https://app.codecov.io/gh/craffel/mir_eval/pull/374/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Colin+Raffel) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/craffel/mir_eval/pull/374/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Colin+Raffel) | `88.32% <100.00%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Colin+Raffel#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bmcfee commented 6 months ago

Test failure is unrelated, appears to be a resurgence of a heisenbug in bsseval on osx. 🤦

bmcfee commented 6 months ago

I added one more test here to cover the case where the input length is shorter than the provided input.

Otherwise I think this is good to go. We shouldn't let the OSX failure block merging this PR.

bmcfee commented 6 months ago

Lol, rerunning the tests passed this time with no changes. OSX is great.