Skip to content

test: add comprehensive test coverage for main functionality#6

Open
thorwhalen wants to merge 2 commits intomasterfrom
claude/improve-repository-comprehensive-011CV2gTjtsygTVxZ6AqDD8A
Open

test: add comprehensive test coverage for main functionality#6
thorwhalen wants to merge 2 commits intomasterfrom
claude/improve-repository-comprehensive-011CV2gTjtsygTVxZ6AqDD8A

Conversation

@thorwhalen
Copy link
Member

  • 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 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.
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.

2 participants