Skip to content

Additional test coverage - #61

Merged
Josef-Haupt merged 2 commits into
mainfrom
coverage
Jul 24, 2026
Merged

Additional test coverage#61
Josef-Haupt merged 2 commits into
mainfrom
coverage

Conversation

@Josef-Haupt

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 22, 2026 12:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_custom validation 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.helper utilities, 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.

@Josef-Haupt
Josef-Haupt merged commit 52b6243 into main Jul 24, 2026
12 of 18 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.

2 participants