Skip to content

Fix realtime eBird priors for live GPS - #51

Merged
evandhoffman merged 1 commit into
mainfrom
fix/realtime-priors-live-gps
Jun 14, 2026
Merged

Fix realtime eBird priors for live GPS#51
evandhoffman merged 1 commit into
mainfrom
fix/realtime-priors-live-gps

Conversation

@evandhoffman

Copy link
Copy Markdown
Contributor

Summary

  • pass a live date into Pi realtime eBird prior scoring so seasonal mode is active
  • let explicit per-frame GPS coordinates override a configured fallback FIPS
  • add regression coverage for live metadata scoring and GPS/FIPS precedence

Root Cause

The live realtime path passed phone GPS into MetadataPrior.apply(...) without a date, so seasonal priors returned uniform weights. Separately, MetadataPrior.resolve_region(...) always preferred default_fips, even when a caller supplied explicit GPS coordinates.

Closes #44.

Tests

  • uv run pytest tests/test_metadata.py::TestMetadataPriorWithDb::test_explicit_gps_overrides_default_fips tests/test_metadata.py::TestMetadataPriorWithDb::test_explicit_gps_outside_supported_region_ignores_default_fips tests/test_realtime_video_upload.py::test_live_stream_metadata_prior_receives_date --no-cov
  • uv run pytest tests/test_metadata.py tests/test_realtime_video_upload.py --no-cov
  • uv run pytest --no-cov
  • uv run ruff check
  • uv run ruff format --check

@evandhoffman
evandhoffman merged commit e1e4005 into main Jun 14, 2026
2 checks passed
@evandhoffman
evandhoffman deleted the fix/realtime-priors-live-gps branch June 14, 2026 15:13
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.

Fix Pi realtime eBird priors to use live date and client GPS

1 participant