Skip to content
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

Merged
merged 6 commits into from
Feb 2, 2024
Merged

Conversation

joanise
Copy link
Member

@joanise joanise commented Feb 2, 2024

Please see the individual commit messages for what's all in here.

…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.
@joanise joanise requested a review from dhdaines February 2, 2024 17:23
Copy link

codecov bot commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (81effb9) 87.04% compared to head (0268efb) 87.05%.

❗ Current head 0268efb differs from pull request most recent head e36e762. Consider uploading reports for the commit e36e762 to get more accurate results

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.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Feb 2, 2024

CLI load time: 0:00.35
Pull Request HEAD: e36e762ea177b5db9f35e78e364ab6b863c221ef
Imports that take more than 0.1 s:
import time: self [us] | cumulative | imported package
import time:    234829 |     293761 | pkg_resources

@roedoejet roedoejet self-requested a review February 2, 2024 19:51
Copy link
Collaborator

@roedoejet roedoejet left a 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
Copy link
Collaborator

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 😉

@joanise joanise merged commit e36e762 into main Feb 2, 2024
12 checks passed
@joanise joanise deleted the dev.misc-maintenance branch February 2, 2024 21:09
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.

2 participants