Skip to content

Conversation

@cka-y
Copy link
Contributor

@cka-y cka-y commented Dec 8, 2025

Summary:

This pull request adds a helper function to ensure that every feed has a properly derived TransitFeeds external ID, and integrates this check into the historical dataset import process. The main goal is to improve data consistency by guaranteeing that each feed is associated with a unique external identifier from TransitFeeds.

TransitFeeds external ID management:

  • Added the _ensure_transitfeeds_externalid function to derive and attach an Externalid with source='transitfeeds' to a feed, based on the TransitFeeds dataset ID. This function checks for existing IDs to avoid duplicates and logs actions for traceability.
  • Integrated the new external ID check into the _add_historical_datasets function, ensuring that the external ID is set for each feed before processing historical datasets.

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with ./scripts/api-tests.sh to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@cka-y cka-y self-assigned this Dec 8, 2025
Copy link
Member

@davidgamez davidgamez left a comment

Choose a reason for hiding this comment

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

LGTM!

@cka-y cka-y merged commit e7d703f into main Dec 9, 2025
2 of 3 checks passed
@cka-y cka-y deleted the hotfix/tfs-historical-datasets-missing branch December 9, 2025 15:17
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