-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A bunch of maintenance work for the repo #203
Conversation
…e a bit While we do not need to really optimize test suites, test_web_api.py load time was annoying me while testing run.py, so I tucked its expensive imports away.
audio_utils.py: we only ever want to see errors from pydub, no debug info, so set the pydub.converter logger to WARNING. This mostly has the effect of quietting previously very verbose test suites, but in general we just don't want to see DEBUG and INFO from pydub, WARNING and ERROR messages are plenty. basic_test_case.py: don't start by setting the log level to DEBUG, and in tearDown(), when it's DEBUG reset it to INFO, so an individual case can trigger DEBUG, e.g., with --debug, and test the effect, without making the rest of the suite verbose. remaining wish item I can't solve: test_force_align.py calls align_audio with debug_aligner=True once, for coverage, but I cannot figure out how to capture the logs from SoundSwallower, its own C stdout/stderr do not seem to be redirectable from Python.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #203 +/- ##
==========================================
+ Coverage 87.04% 87.05% +0.01%
==========================================
Files 21 21
Lines 1744 1746 +2
Branches 315 315
==========================================
+ Hits 1518 1520 +2
Misses 189 189
Partials 37 37 ☔ View full report in Codecov by Sentry. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good improvements in here, I'm glad to see we're already working on 3.12 compatibility
from typing import Union | ||
|
||
from pydub import AudioSegment | ||
|
||
from readalongs.log import LOGGER | ||
|
||
# quiet pydub's logging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, the beauty of logging 😉
Please see the individual commit messages for what's all in here.