This script parses GTFS RT protobufs into newline-delimited JSON for querying via BigQuery external tables. This script aggregates data hourly, so we can fit within BigQuery external table file count limits.
- Install uv dependencies for airflow:
$ uv sync- Run gtfs-rt-parser tests:
$ uv run pytest tests/scripts/test_gtfs_rt_parser.pyTo run only a specific test, you can reference like this:
$ uv run pytest tests/scripts/test_gtfs_rt_parser.py::TestGtfsRtParser::test_no_vehicle_positions_for_dateThe gtfs-realtime-validator-lib-x.y.z-yyyymmdd.HHMMss-v.jar is an old snapshot
of the GTFS Realtime validator that now lives under
MobilityData.
We've vendored an old version to help make our builds less dependent on external
services. We should begin using the officially-published
packages
at some point in the future.