timmahrt / praatIO

A python library for working with praat, textgrids, time aligned audio transcripts, and audio files. It is primarily used for extracting features from and making manipulations on audio files given hierarchical time-aligned transcriptions (utterance > word > syllable > phone, etc).
MIT License
299 stars 32 forks source link

Tests for praatio scripts #52

Open timmahrt opened 1 year ago

timmahrt commented 1 year ago

This PR adds tests for praatio_scripts.py and resolves any bugs found along the way.

I'm taking the opportunity to adjust the interface, so this will be a part of the next major praatio version.

codecov[bot] commented 1 year ago

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Comparison is base (5ff7c78) 77.31% compared to head (d7dd754) 81.36%. Report is 1 commits behind head on praatio_v7.0.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## praatio_v7.0 #52 +/- ## ================================================ + Coverage 77.31% 81.36% +4.04% ================================================ Files 21 21 Lines 2663 2656 -7 ================================================ + Hits 2059 2161 +102 + Misses 604 495 -109 ``` | [Files](https://app.codecov.io/gh/timmahrt/praatIO/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tim) | Coverage Δ | | |---|---|---| | [praatio/data\_classes/interval\_tier.py](https://app.codecov.io/gh/timmahrt/praatIO/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tim#diff-cHJhYXRpby9kYXRhX2NsYXNzZXMvaW50ZXJ2YWxfdGllci5weQ==) | `98.90% <100.00%> (+0.04%)` | :arrow_up: | | [praatio/data\_classes/point\_tier.py](https://app.codecov.io/gh/timmahrt/praatIO/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tim#diff-cHJhYXRpby9kYXRhX2NsYXNzZXMvcG9pbnRfdGllci5weQ==) | `100.00% <100.00%> (ø)` | | | [praatio/data\_classes/textgrid\_tier.py](https://app.codecov.io/gh/timmahrt/praatIO/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tim#diff-cHJhYXRpby9kYXRhX2NsYXNzZXMvdGV4dGdyaWRfdGllci5weQ==) | `98.95% <100.00%> (+0.01%)` | :arrow_up: | | [praatio/utilities/constants.py](https://app.codecov.io/gh/timmahrt/praatIO/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tim#diff-cHJhYXRpby91dGlsaXRpZXMvY29uc3RhbnRzLnB5) | `100.00% <100.00%> (ø)` | | | [praatio/utilities/utils.py](https://app.codecov.io/gh/timmahrt/praatIO/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tim#diff-cHJhYXRpby91dGlsaXRpZXMvdXRpbHMucHk=) | `90.82% <100.00%> (-3.21%)` | :arrow_down: | | [praatio/audio.py](https://app.codecov.io/gh/timmahrt/praatIO/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tim#diff-cHJhYXRpby9hdWRpby5weQ==) | `99.54% <97.67%> (+0.46%)` | :arrow_up: | | [praatio/data\_classes/klattgrid.py](https://app.codecov.io/gh/timmahrt/praatIO/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tim#diff-cHJhYXRpby9kYXRhX2NsYXNzZXMva2xhdHRncmlkLnB5) | `84.93% <50.00%> (-0.43%)` | :arrow_down: | | [praatio/utilities/errors.py](https://app.codecov.io/gh/timmahrt/praatIO/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tim#diff-cHJhYXRpby91dGlsaXRpZXMvZXJyb3JzLnB5) | `75.38% <66.66%> (+3.95%)` | :arrow_up: | | [praatio/praatio\_scripts.py](https://app.codecov.io/gh/timmahrt/praatIO/pull/52?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tim#diff-cHJhYXRpby9wcmFhdGlvX3NjcmlwdHMucHk=) | `66.88% <63.63%> (+49.96%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/timmahrt/praatIO/pull/52/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tim)

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