fast travel cleaners tech-debt #180
Labels
GTFS
technical debt
A better way is available. Fix later approach has been adopted.
wontfix
This will not be worked on
Fast travel tech-debt raised during PR #125, associated with
cleaners.py
:Refactor
clean_multiple_stop_fast_travel_warnings()
andclean_consecutive_stop_fast_travel_warnings()
into a common cleaning function:filter_gtfs_around_trip()
units optional argument should be "km" - or take fromgtfs.feed.dist_units
<--- probably best approach.3. Usepd.isna()
infilter_gtfs_around_trip()
- handles strings, no need to try/except.4. Add a unit test for_gtfs_defence()
in the passing case (i.e. using a GTFS test fixture)5. For_add_validation_row()
add defence to ensure message is only either{"warning", "error"}
6.drop_trip()
works with trip_ids that aren't instop_times
. This is OK since no cleaning is done, but it's slightly opaque for public function, maybe we can protect against this? Perhaps raise a warning to say not cleaning since no warnings/no valid trip_ids?Points 3,4,5 & 6 resolved in #254
The text was updated successfully, but these errors were encountered: