roedoejet / g2p

Grapheme-to-Phoneme transductions that preserve input and output indices, and support cross-lingual g2p!
https://g2p-studio.herokuapp.com
Other
119 stars 26 forks source link

Miscenalleous cli improvement for convert #385

Closed joanise closed 5 days ago

joanise commented 1 week ago

PR Goal?

misc small improvements:

Feedback sought?

standard code review - use SemanticDiff to make it easier to read, though: https://app.semanticdiff.com/gh/roedoejet/g2p/pull/385

Priority?

low

Tests added?

yup

How to test?

The last two cases came up as I was preparing and processing files for EveryVoice, where I wanted to cut a column out of a psv file and pass it to g2p without having the same temporary files on disk. That's what triggered this patch in the first place.

Confidence?

high

Version change?

Possibly a minor since we're adding a feature, but really I think of this as just a patch: this is how it should have worked in the first place.

We've done a bunch of changes since 2.0.0, though, so we're probably due for releasing 2.1.0, especially for api/v2.

github-actions[bot] commented 1 week ago
CLI load time: 0:00.05
Pull Request HEAD: f0cf073d8e6b3a953577eedb381a9bb13290b312
Imports that take more than 0.1 s:
import time: self [us] | cumulative | imported package
codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.22%. Comparing base (e6a1280) to head (f0cf073).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #385 +/- ## ========================================== + Coverage 93.19% 93.22% +0.02% ========================================== Files 17 17 Lines 2440 2450 +10 Branches 544 547 +3 ========================================== + Hits 2274 2284 +10 Misses 95 95 Partials 71 71 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

joanise commented 5 days ago

@roedoejet @dhdaines This PR is ready to (re)review, with the --file option we agreed on yesterday for g2p convert reading from a file.

Includes documentation, and an unrelated change to CI I did months ago but that got lost in a PR that never got merged.

Plus making test_update_schema() quiet except when there are errors, and making those errors more helpful when the are some.