Forced-Alignment-and-Vowel-Extraction / alignedTextGrid

aligned-textgrid links textgrid sequences together
https://forced-alignment-and-vowel-extraction.github.io/alignedTextGrid/
GNU General Public License v3.0
6 stars 1 forks source link

Flexibilization of ATG object creation #191

Closed JoFrhwld closed 4 months ago

JoFrhwld commented 4 months ago

This PR flexibilizes the creation of aligned_textgrid objects in a number of ways.

AlignedTextGrid

The first position argument to AlignedTextGrid() can now be one of

The original textgrid_path argument can still be utilized without breaking previous code.

SequenceInterval and SequencePoint

The first argument to both SequenceInterval and SequencePoint can now also be a list or tuple of the relevant time and label information. e.g.

seq_int = SequenceInterval((0, 1, "a"))
seq_point = SequencePoint((0, "a"))

SequenceTier and SequencePointTier

These can now also be passed lists of SequenceInterval and SequencePoint, as appropriate, or another tier of its own class.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 94.89796% with 5 lines in your changes missing coverage. Please review.

Project coverage is 90.70%. Comparing base (4c9a41c) to head (0cc7eb1).

Files Patch % Lines
src/aligned_textgrid/points/tiers.py 86.95% 3 Missing :warning:
src/aligned_textgrid/sequences/sequences.py 96.00% 1 Missing :warning:
src/aligned_textgrid/sequences/tiers.py 95.45% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #191 +/- ## ========================================== + Coverage 90.44% 90.70% +0.25% ========================================== Files 14 14 Lines 1361 1431 +70 ========================================== + Hits 1231 1298 +67 - Misses 130 133 +3 ```

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