test: add comprehensive test coverage for main functionality#6
Open
thorwhalen wants to merge 2 commits intomasterfrom
Open
test: add comprehensive test coverage for main functionality#6thorwhalen wants to merge 2 commits intomasterfrom
thorwhalen wants to merge 2 commits intomasterfrom
Conversation
- Add 55 passing tests covering TaggedWaveformAnalysis and utility functions - Test both unsupervised and supervised learning workflows - Cover spectral analysis, annotation handling, probability calculations - Test integration scenarios and edge cases - Tests for STFT, padding utilities, lazy properties, and frequency detection - TaggedWaveformAnalysisExtended tests skip gracefully without hum package Test coverage includes: - Core TaggedWaveformAnalysis class initialization and fitting - Snip extraction and probability calculations - Tag annotation parsing and conversion - Time unit conversion (ChkUnitConverter) - Spectral analysis functions (STFT, spectrogram) - Utility functions (running_mean, pad_to_align, lazyprop) - Complete unsupervised and supervised workflows
- Add fallback imports for optional dependencies (linkup, lined, hum) - Create mock implementations for linkup.base when package unavailable - Make Line class mockable when lined package not installed - Make TaggedWaveformAnalysisExtended import conditional on hum availability - Prevents ImportError when optional dependencies are missing - Allows core functionality to work without all optional packages installed This improves the package's usability in environments where all dependencies cannot be easily installed, while maintaining full functionality when they are.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test coverage includes: