-
Notifications
You must be signed in to change notification settings - Fork 27
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
Detect empty mappings and fail early. #323
Conversation
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #323 +/- ##
==========================================
+ Coverage 92.54% 92.95% +0.40%
==========================================
Files 18 18
Lines 2334 2341 +7
Branches 517 519 +2
==========================================
+ Hits 2160 2176 +16
+ Misses 99 94 -5
+ Partials 75 71 -4 ☔ 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.
just a couple of little changes, otherwise good!
@dhdaines Unit test added, ready to re-review. |
Letting an empty mapping get loaded will corrupt langs.json.gz, so immediately alert the user they cannot do that! Also, don't override the rules_path if it's already initialized. Fixes: 322
Also, no need to sleep after starting the API since it has the whole run_tests.py time to launch itself. Also, network.json.gz was missed in the files whose status we checked after g2p update.
Pydantic validation errors were previously causing stack trace dumps
7f0739e
to
95bf4be
Compare
Empty mappings cause the g2p database to get corrupted, so block them.
Other changes were things I noticed while fixing this, including some coverage improvements.
Fixes: #322