Skip to content
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

Flexibilization of ATG object creation #191

Merged
merged 32 commits into from
Jun 15, 2024
Merged

Flexibilization of ATG object creation #191

merged 32 commits into from
Jun 15, 2024

Conversation

JoFrhwld
Copy link
Member

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

  • A str representing a path to a textgrid.
  • A pathlib:Path to a textgrid
  • A praatio.textgrid.Textgrid

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.

Copy link

codecov bot commented Jun 14, 2024

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 ⚠️
src/aligned_textgrid/sequences/sequences.py 96.00% 1 Missing ⚠️
src/aligned_textgrid/sequences/tiers.py 95.45% 1 Missing ⚠️
Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JoFrhwld JoFrhwld merged commit 35e03a3 into dev Jun 15, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant