Skip to content

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

Merged
davidgamez merged 3 commits into
MobilityData:mainfrom
mackenziereading19:fix/1567-rt-location-sync
Aug 31, 2026
Merged

davidgamez merged 3 commits into
MobilityData:mainfrom
mackenziereading19:fix/1567-rt-location-sync

Conversation

@mackenziereading19

Copy link
Copy Markdown
Contributor

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

@davidgamez davidgamez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!
@mackenziereading19 Thanks for your contribution

@davidgamez
davidgamez merged commit b121f6e into MobilityData:main Aug 31, 2026
23 of 24 checks passed
@welcome

welcome Bot commented Aug 31, 2026

Copy link
Copy Markdown

🥳 Congrats on getting your first pull request merged!

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