feat: odpt integration - #1797
Open
ianktc wants to merge 5 commits into
Open
Conversation
Contributor
Author
|
I found the same issue with @with_db_session annotation committing on dry_run=True without an explicit rollback. This is addressed by adding an explicit rollback. Explanation:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
odpt_script as provided directly from ODPT
This PR adds a new odpt_import task to the tasks_executor Cloud Function that imports Japanese transit feeds from the Open Data Platform for Transportation (ODPT). It queries ODPT's members-portal metadata API for openly-licensed (CC BY 4.0 and CC0) GTFS datasets, creates/updates the corresponding Gtfsfeed and Gtfsrealtimefeed (trip updates, vehicle positions, service alerts) records, tags each with an odpt external ID and a Japan-level Location, and links related GTFS-RT feeds back to their parent schedule feed. Closes MobilityData/mobility-database-catalogs#1391. A new monthly Cloud Scheduler job (odpt_import_schedule, 5th of the month) is added, alongside the existing JBDA/TDG import schedules.
Expected behavior:
Testing tips:
Please make sure these boxes are checked before submitting your pull request - thanks!
./scripts/api-tests.shto make sure you didn't break anything