Skip to content

Fix GTFS-RT location inheritance from static feeds - #1811

Open
mackenziereading19 wants to merge 1 commit into
MobilityData:mainfrom
mackenziereading19:fix/1567-rt-location-sync
Open

Fix GTFS-RT location inheritance from static feeds#1811
mackenziereading19 wants to merge 1 commit into
MobilityData:mainfrom
mackenziereading19:fix/1567-rt-location-sync

Conversation

@mackenziereading19

Copy link
Copy Markdown

Summary

Fixes GTFS-RT feeds remaining locationless when they are imported after a referenced static GTFS feed already has location metadata.

During catalogue population, once static_reference values are resolved, a GTFS-RT feed with no location metadata of its own now inherits the locations already attached to its matched static GTFS feed(s).

Existing GTFS-RT locations are preserved. If multiple static feeds are referenced, their locations are combined and deduplicated by location ID.

This addresses MobilityData/mobility-database-catalogs#1567, where recently imported STM and Metra GTFS-RT feeds had valid static feed references but empty locations.

Tests

Added regression coverage for:

  • a new locationless GTFS-RT feed inheriting an existing static feed location;
  • preserving an existing GTFS-RT location rather than overwriting it;
  • combining locations from multiple static feed references.

Local verification:

  • targeted regression tests: 3 passed;
  • full api/tests/integration/populate_tests/test_populate.py: 20 passed;
  • functions-python/reverse_geolocation/tests/test_reverse_geolocation_processor.py: 19 passed.

The reverse-geolocation suite was run using the repository's standard function-python-setup.sh shared/test-shared symlink setup.

@ianktc
ianktc requested a review from davidgamez August 24, 2026 15:09
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