Merged
Conversation
Changed Files
|
Contributor
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #781 +/- ##
=======================================
Coverage 82.97% 82.98%
=======================================
Files 47 47
Lines 4153 4154 +1
Branches 611 611
=======================================
+ Hits 3446 3447 +1
Misses 575 575
Partials 132 132 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
055b08c to
3aa49e6
Compare
marctessier
approved these changes
Mar 24, 2026
Collaborator
marctessier
left a comment
There was a problem hiding this comment.
Awesome, looking forward for this to be the default.
When a pydantic field is a class, its default should still be a string so it can be included in the schemas, but we should request it be validated with `validate_default=True` so it gets converted correctly by the before validator.
silence_c_stderr and silence_c_stdout are incompatible with pytest: pytest already captures thoses streams, and if we try to do it, we just cause tests to fail. But since pytest does this already, and more reliably, we no longer need to do it! Yay!!!
Squashing: - build(deps): upgrade matplotlib and remove restriction on numpy - build(deps): add pytest to test dependencies - fix(build): on Windows, we need questionary>=2 - fix(build): lock chardet<6 to make requests happy (Fixes #782)
a95db3a to
faad89c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Goal?
Make it friendly to use
pytestas the driver for EveryVoice, by handling the warnings it outputs. They were pointing out real issues, afterall... :)@marctessier, you're going to like this:
Note: it sits on
collecting 0 itemsfor a long time. That's normal: it's the time it takes to import all our torch and other expensive dependencies.Fixes?
Some warnings pytest told me about, and errors that made pytest fail altogether.
Fixes #573
Feedback sought?
make sure it runs right for you too.
Note that most of the diff is for the schemas and the Pydantic fields with non-string defaults. That's because pytest complained about the way we had them before, and so that pushed me to fix them.
@SamuelLarkin Please have a look at the changes I made to Pydantic-validated directories. My original changes brought back the darn bug where running the tests creates
logs_and_checkpointsandpreprocessedin the directory where you run them. What I understand is that when Pydantic validates aPossiblyRelativePathMustExist, it creates the directory, so I deliberately setvalidate_default=Falseon this one. You hadPath("dirname")as the default before, which did not require validation. I now have"dirname"instead, becausePath()is not json-serializable on Windows. So I resorted to# type: ignore[assignment]to shut mypy up without creating the folders when we don't want them. This makes me wonder if we should not create those folders when we're about to write into them instead of during validation... In fact, this is also the cause behind #478 and #740, so we might want to make the change, sadly undoing the hard work you did to make it happen during validation.Priority?
normal
How to test?
Redo
pip install -e .[dev], or just dopip install pytest, then run:To run a single test file:
To run a single test class or case, add
::ClassNameand maybe also::test_function_name:When
pytestissues a warning or an error message for a given test, it conveniently gives you this string in its output that you can cut and paste.Confidence?
high
Related PRs?
EveryVoiceTTS/HiFiGAN_iSTFT_lightning#59