Additional test coverage - #61
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the Python test suite with focused unit tests for validation/error paths across model loading, inference configs, and helper utilities, aiming to improve coverage without requiring model downloads.
Changes:
- Add new tests for
birdnet.model_loader.load/load_customvalidation and TensorFlow-runtime guard error messaging. - Add new tests for acoustic/geo inference config validators and geo v3.0 language-file generation helpers.
- Add new tests for
birdnet.utils.helperutilities, and extend Perch v2 coverage for Intel macOS behavior.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/birdnet_tests/model_loader_py/test_tf_backend_runtime_guard.py | Adds tests for actionable error messages when TF-backed backends are used without TensorFlow. |
| src/birdnet_tests/model_loader_py/geo/test_geo_load_validation.py | Adds geo load/load_custom argument-validation tests (version/backend/precision). |
| src/birdnet_tests/model_loader_py/acoustic/test_acoustic_load_validation.py | Adds acoustic load/load_custom argument/path/kwargs validation tests. |
| src/birdnet_tests/model_loader_py/acoustic/test_acoustic_load_perch.py | Adds a Perch v2 test ensuring Intel macOS is rejected. |
| src/birdnet_tests/helper_py/test_signal_helpers.py | Adds tests for signal/queue/platform helper utilities. |
| src/birdnet_tests/helper_py/test_misc_helpers.py | Adds tests for miscellaneous helper functions (hashing, batching, protobuf checks, etc.). |
| src/birdnet_tests/helper_py/test_dtype_helpers.py | Adds tests for dtype-selection helper logic. |
| src/birdnet_tests/geo_models/v3_0/model_py/test_lang_file_generation.py | Adds tests for geo v3.0 label localization file generation and atomic writes. |
| src/birdnet_tests/geo_models/inference/test_geo_session.py | Adds tests for geo session week handling (single sample vs squeeze path). |
| src/birdnet_tests/geo_models/inference/configs_py/test_geo_config_validators.py | Adds tests for geo inference config validators (lat/lon/week/device/etc.). |
| src/birdnet_tests/acoustic_models/inference_pipeline/configs_py/ProcessingConfig/test_validate_speed.py | Adds tests for acoustic processing speed validation/coercion. |
| src/birdnet_tests/acoustic_models/inference_pipeline/configs_py/PredictionConfig/test_validate_top_k.py | Adds tests for prediction top_k validation boundaries/types. |
| src/birdnet_tests/acoustic_models/inference_pipeline/configs_py/PredictionConfig/test_validate_sigmoid_sensitivity.py | Adds tests for sigmoid sensitivity validation boundaries/types. |
| src/birdnet_tests/acoustic_models/inference_pipeline/configs_py/PredictionConfig/test_validate_default_confidence_threshold.py | Adds tests for default confidence threshold type validation. |
| src/birdnet_tests/acoustic_models/inference_pipeline/configs_py/PredictionConfig/test_validate_custom_species_list.py | Adds tests for custom species list validation (collections and file input). |
| src/birdnet_tests/acoustic_models/inference_pipeline/configs_py/PredictionConfig/test_validate_custom_confidence_thresholds.py | Adds tests for custom per-species threshold validation. |
| src/birdnet_tests/acoustic_models/inference_pipeline/configs_py/OutputConfig/test_validate_show_stats.py | Adds tests for output show-stats validator accepted values. |
| src/birdnet_tests/acoustic_models/inference_pipeline/configs_py/InferenceConfig/test_validate_input_audio.py | Adds tests for input-audio parsing/validation (tuples, dtypes, rates). |
| src/birdnet_tests/acoustic_models/inference_pipeline/configs_py/FilteringConfig/test_validate_bandpass_frequencies.py | Adds tests for bandpass frequency validation error paths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.