Currently this is implemented with a check for stops with scheduled/canceled/added schedule relationships. There is a TODO comment in the code: TODO: you can have a trip-level schedule relationship of scheduled, canceled, or added without having stop-level updates of those types -- we would need a trip level schedule_relationship on fct_observed_trips to make this more robust. As of #2489, we will have this trip-level schedule relationship data in fct_observed_trips.
As a result, we want to change this check to perform the check when either the trip level OR any stop level relationship is present.
We also want to reconsider the handling of canceled trips here. It seems odd that a canceled trip would have vehicle positions data; vehicle positions is generally only for trips that are actually happening. We want to check whether we should instead confirm that for canceled trips there is no vehicle positions data.
Currently this is implemented with a check for stops with scheduled/canceled/added schedule relationships. There is a TODO comment in the code:
TODO: you can have a trip-level schedule relationship of scheduled, canceled, or added without having stop-level updates of those types -- we would need a trip level schedule_relationship on fct_observed_trips to make this more robust
. As of #2489, we will have this trip-level schedule relationship data infct_observed_trips
.As a result, we want to change this check to perform the check when either the trip level OR any stop level relationship is present.
We also want to reconsider the handling of
canceled
trips here. It seems odd that a canceled trip would have vehicle positions data; vehicle positions is generally only for trips that are actually happening. We want to check whether we should instead confirm that for canceled trips there is no vehicle positions data.