Skip to content

Conversation

@jloria2703
Copy link
Collaborator

Sub-issue #16 — Build TripUpdates with ETA Module

Work focused on implementing the ETA-aware TripUpdates builder using a simulated Bytewax-style flow.
The goal was to construct TripUpdate entities enriched with Estimated Time of Arrival (ETA) predictions, while still working with synthetic data instead of real database-backed journeys.

To validate the dataflow before having real Journey / StopTimes models wired in, several helper files were created:

  1. fake_stop_times.py: generates synthetic stops with deterministic arrival times.
  2. stop_times.py: provides the helper function estimate_stop_times() that returns predefined ETA values.
  3. trip_update_fixture.json: acts as a synthetic input fixture to feed build_trip_updates_bytewax() when there are no real Journey or StopTimes objects available.

Execution

The module can be executed interactively through the Django shell using the following commands:

python manage.py shell
>>> from gtfs.utils import realtime
>>> realtime.build_trip_updates_bytewax()

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