tulsawebdevs / django-multi-gtfs

Django app to import and export General Transit Feed Specification (GTFS)
http://tulsawebdevs.org/
Apache License 2.0
50 stars 32 forks source link

Import route_directions.txt, if present #73

Open mharvey opened 6 years ago

mharvey commented 6 years ago

Some providers, notably TriMet, provide a route_directions.txt file that associates a route_id and direction_id with a human-readable name. This data is valuable and can be much more convenient to use than trying to divine this information using StopTime.stop_headsign — especially with the larger feeds.

This PR implements the RouteDirection model and was based largely on existing models.

In addition to passing automated tests, I tested this with a few recent TriMet and C-TRAN feeds (which do not have route_directions.txt) and imports occurred as expected.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling a196e3a1a4d17b1dcb9a1d50efa31ff67c2b0be5 on mharvey:route_directions into f104c09424f9c6b2557db6ef08f40893ee4ea2ed on tulsawebdevs:master.

mharvey commented 6 years ago

This adresses #63

mharvey commented 6 years ago

If you know of a feed smaller than TriMet that uses this, I'd appreciate it

Sure thing!

Albany: http://transitfeeds.com/p/albany-transit-system/435/latest Emeryville: https://transitfeeds.com/p/emery-go-round/769/20161026 Petaluma: http://transitfeeds.com/p/petaluma-transit-gtfs/675/latest Patriots Party Boats: http://transitfeeds.com/p/massdot/648/latest

Those each seem to import in under five seconds. 😄

mharvey commented 6 years ago

Sorry, some stuff came up and I got sidetracked from this. I'll block out time to get those follow-on actions added tomorrow and Thursday and commit them to this pull request, unless it works better for you to have them in a separate PR.

jwhitlock commented 6 years ago

Not a problem, and thanks for the work so far! I think the example app is the most work and the lowest priority, so focus on the other bits when you have time.

jspetrak commented 3 years ago

We have reviewed this PR as well as extensible model in #83 and the later solution would be better for including non-standard models into multigtfs.