bmcfee / muda

A library for augmenting annotated audio data
ISC License
230 stars 33 forks source link

Bugfix #59: `BackgroundNoise` fails if `len(soundf)==n_target` #60

Closed lostanlen closed 7 years ago

lostanlen commented 7 years ago

Fixes #59.

If len(soundf) < n_target, raises a RuntimeError which prints the faulty values of filename, len(soundf) and n_target.

This is a breaking change, because the maximal value for the random integer start is increased by 1.

Milestone: v0.2


This change is Reviewable

lostanlen commented 7 years ago

The Travis CI build passed on every Python version but coverage decreased (-0.2%) to 98.726% because of the new branch len(soundf) < n_target. I will write tests now.

lostanlen commented 7 years ago

deformers/background.py has now 100% coverage. @bmcfee I think this is ready to merge.