Skip to content

Add option to set birdnet app data manually - #37

Merged
stefantaubert merged 4 commits into
devfrom
birdnet-app-data-env-variable
May 9, 2026
Merged

Add option to set birdnet app data manually#37
stefantaubert merged 4 commits into
devfrom
birdnet-app-data-env-variable

Conversation

@Josef-Haupt

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 4, 2026 15:32

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

Adds support for overriding BirdNET’s application-data directory via an environment variable, enabling users to place downloaded models/benchmarks in a custom location (useful for deployments with restricted home directories or shared storage).

Changes:

  • Introduce BIRDNET_APP_DATA (ENV_VAR_APP_DATA) as a global constant.
  • Update app-data resolution to prefer BIRDNET_APP_DATA when set.
  • Document the override mechanism in the setup/FAQ docs.

Reviewed changes

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

File Description
src/birdnet/utils/local_data.py Adds env-var-based override for the computed application data folder.
src/birdnet/globals.py Defines the BIRDNET_APP_DATA env var constant.
docs/setup.rst Documents how to set BIRDNET_APP_DATA on Windows and Linux/macOS.

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

Comment thread src/birdnet/utils/local_data.py Outdated
Comment thread src/birdnet/utils/local_data.py Outdated
Comment thread src/birdnet/utils/local_data.py Outdated
Comment thread docs/setup.rst Outdated
@codecov

codecov Bot commented May 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/birdnet/utils/local_data.py 33.33% 1 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
src/birdnet/globals.py 100.00% <100.00%> (ø)
src/birdnet/utils/local_data.py 61.70% <33.33%> (-1.94%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stefantaubert
stefantaubert changed the base branch from main to dev May 9, 2026 07:33
@stefantaubert
stefantaubert merged commit 082ed2f into dev May 9, 2026
@stefantaubert
stefantaubert deleted the birdnet-app-data-env-variable branch May 9, 2026 07:36
stefantaubert added a commit that referenced this pull request May 9, 2026
* Fix issue 32 (#35)

* fix table

* fix issue 32

* rm accident

* bump version

* Fixing mac issues (#40)

* Fixing mac issues

* fix issue

---------

Co-authored-by: Stefan Kahl <kahst@hrz.tu-chemnitz.de>
Co-authored-by: Stefan Taubert <23339395+stefantaubert@users.noreply.github.com>

* Upcast timing columns to float32 in Arrow export to avoid halffloat interop issues (#43)

* Upcast timing columns to float32 in Arrow export to avoid halffloat interop issues

* add fix for issue 38

* add comment for current limitation

---------

Co-authored-by: Stefan Taubert <23339395+stefantaubert@users.noreply.github.com>

* Add option to set birdnet app data manually (#37)

* Add option to set birdnet app data manually

* update with copilot suggestions

* add entry in changelog

---------

Co-authored-by: Stefan Taubert <23339395+stefantaubert@users.noreply.github.com>

* bump version

---------

Co-authored-by: Josef Haupt <josef_haupt@gmx.net>
Co-authored-by: Stefan Kahl <kahst@hrz.tu-chemnitz.de>
Co-authored-by: Felix Günther <guenther@oekofor.de>
stefantaubert added a commit that referenced this pull request May 9, 2026
* Fix issue 32 (#35)

* fix table

* fix issue 32

* rm accident

* bump version

* Fixing mac issues (#40)

* Fixing mac issues

* fix issue

---------

Co-authored-by: Stefan Kahl <kahst@hrz.tu-chemnitz.de>
Co-authored-by: Stefan Taubert <23339395+stefantaubert@users.noreply.github.com>

* Upcast timing columns to float32 in Arrow export to avoid halffloat interop issues (#43)

* Upcast timing columns to float32 in Arrow export to avoid halffloat interop issues

* add fix for issue 38

* add comment for current limitation

---------

Co-authored-by: Stefan Taubert <23339395+stefantaubert@users.noreply.github.com>

* Add option to set birdnet app data manually (#37)

* Add option to set birdnet app data manually

* update with copilot suggestions

* add entry in changelog

---------

Co-authored-by: Stefan Taubert <23339395+stefantaubert@users.noreply.github.com>

* bump version

---------

Co-authored-by: Josef Haupt <josef_haupt@gmx.net>
Co-authored-by: Stefan Kahl <kahst@hrz.tu-chemnitz.de>
Co-authored-by: Felix Günther <guenther@oekofor.de>
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.

3 participants