Skip to content

ENH: Add Segments class - #133

Merged
NickleDave merged 69 commits into
mainfrom
add-segments-class
Apr 3, 2024
Merged

NickleDave merged 69 commits into
mainfrom
add-segments-class

Conversation

@NickleDave

@NickleDave NickleDave commented Apr 3, 2024 •

Copy link
Copy Markdown
Contributor

Adds vocalpy.Segments as in #127 (but doesn't add Boxes yet).

Along with that, adds a how-to on segmentation metrics that borrows heavily from @houtan-ghaffari 's paper and code (happy to hear feedback! Like if I made a dumb mistake 🙈 )

Also:

  • Removes dataset module and SequenceDataset class (because as written would require rewriting to work with Segments)
  • And because of this removes the SQLAlchemy dependency
  • Renames vocalpy.segment.ava.segment -> vocalpy.segment.ava
    • (we import all other things from ava module at segment level)
  • Adds a Params class to generically represent parameters used with a method, e.g. segmenting parameters
    • This allows type annotations that "this class accepts an instance of Params, or a dict, at instantiation"
    • Allows subclassing to declare params for a specific method, e.g. AvaParams represents the parameters for segment.ava
  • Renames Spectrogram_Maker.spect_params and Segmenter.segment_params to just params

…e with actual string labels, not empty strings
Apparently this is needed to generate the autodoc files.
Refs in how-tos weren't working before this
@codecov

codecov Bot commented Apr 3, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.33%. Comparing base (51bba63) to head (350dd80).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #133      +/-   ##
==========================================
+ Coverage   94.47%   95.33%   +0.86%     
==========================================
  Files          30       31       +1     
  Lines        1013     1180     +167     
==========================================
+ Hits          957     1125     +168     
+ Misses         56       55       -1     

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

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