Skip to content

Add presets - #955

Merged
Josef-Haupt merged 4 commits into
mainfrom
add-presets
Jul 17, 2026
Merged

Add presets#955
Josef-Haupt merged 4 commits into
mainfrom
add-presets

Conversation

@Josef-Haupt

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 16, 2026 10:02

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 introduces reusable “presets” in the GUI and a unified parameters-file format/loader so users can restore settings from saved presets or from prior analysis/training runs (CLI and GUI).

Changes:

  • Add GUI preset save/load/delete controls for tabs, plus loading settings from prior-run params CSV files.
  • Standardize params CSV output to a two-column Parameter,Value format and add robust loaders for both new and legacy formats.
  • Extend CLI entrypoints to optionally load params files as argument defaults (--load_params), with explicit CLI flags taking precedence.

Reviewed changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/test_params.py Adds tests for reading analysis/training params files and applying them as CLI defaults.
tests/gui/test_presets.py Adds GUI tests for preset CRUD, applying presets, and loading settings from params files.
docs/best-practices/training.rst Updates documented training params filename to the new convention.
birdnet_analyzer/utils.py Adds read_classifier_labels() and replaces legacy params CSV writer with save_params_file().
birdnet_analyzer/train/utils.py Writes training params to *.birdnet.train-params.csv and removes passing params into model save helpers.
birdnet_analyzer/train/cli.py Applies --load_params defaults before parsing and avoids passing load_params into train().
birdnet_analyzer/settings.py Adds preset storage/validation and batch tab-settings persistence helper.
birdnet_analyzer/params.py New module to load analysis/training params from both new and legacy CSV layouts.
birdnet_analyzer/model.py Removes params-file writing from model save paths (now handled in training utils).
birdnet_analyzer/lang/zh_TW.json Adds localized preset UI strings.
birdnet_analyzer/lang/tlh.json Adds localized preset UI strings.
birdnet_analyzer/lang/se.json Adds localized preset UI strings.
birdnet_analyzer/lang/ru.json Adds localized preset UI strings.
birdnet_analyzer/lang/pt-br.json Adds localized preset UI strings.
birdnet_analyzer/lang/id.json Adds localized preset UI strings.
birdnet_analyzer/lang/fr.json Adds localized preset UI strings.
birdnet_analyzer/lang/fi.json Adds localized preset UI strings.
birdnet_analyzer/lang/en.json Adds localized preset UI strings.
birdnet_analyzer/lang/de.json Adds localized preset UI strings.
birdnet_analyzer/gui/utils.py Improves model/species selection interactions and reuses read_classifier_labels().
birdnet_analyzer/gui/train.py Adds preset controls to the training tab, including load-from-params-file.
birdnet_analyzer/gui/state.py Adds component inventory/snapshot + safe “apply settings” update generation for presets.
birdnet_analyzer/gui/presets.py New preset UI wiring + load-from-params mapping for analysis and training tabs.
birdnet_analyzer/gui/multi_file.py Adds preset controls to the multi-file analysis tab (including file components).
birdnet_analyzer/config.py Updates analysis params filename and introduces training params filename suffix constant.
birdnet_analyzer/cli.py Adds --load_params arg injection and a pre-parse defaults application helper.
birdnet_analyzer/analyze/core.py Writes analysis params using the new two-column params CSV layout (including additional columns).
birdnet_analyzer/analyze/cli.py Applies --load_params defaults before parsing and avoids passing load_params into analyze().
.gitignore Ignores the new params filenames (birdnet.analyze-params.csv, *.birdnet.train-params.csv).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread birdnet_analyzer/utils.py Outdated
Comment thread birdnet_analyzer/settings.py
Comment thread birdnet_analyzer/lang/en.json Outdated
@Josef-Haupt
Josef-Haupt merged commit bcb3554 into main Jul 17, 2026
4 of 8 checks passed
@Josef-Haupt
Josef-Haupt deleted the add-presets branch July 17, 2026 09:26
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