-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.0 API Design #5
Comments
For a 1.0 release lets talk about what we want this crate to look like and how we want it to work. I think we're on the right track so far. Generally speaking I'd like to differentiate between GTFS the format, and a TransitNetwork the API. Things I'd want to be able to do with a GTFS type
Versus things I'd want to be able to do with a TransitNetwork type
I'd like to think that TransitNetwork is a trait, not an implementation, and that there would be an implementation for GTFS but that their might also be an implementations for perhaps the wide variety of live transit API's out there. I think a lot of what your thinking is similiar to what I was thinking for what I'm tentatively calling the TransitNetwork trait. It can aggregate shapes/stop times, have various indices and such to help provide the convenience I think most people (myself included) really want to get out of the data that is stored in GTFS and provided by various transit APIs I look forward to your thoughts. If we get a nice plan together we can break things down and work on various parts individually and together as we need to. |
I don't need writing or validation atm but FWIW I think you're right that it should be included in a 1.0 release. GTFS reading is also still unfinished: we're missing Extended GTFS support. Whether that needs to be in place for a 1.0 release or not is a separate discussion, for now I'm just reminding you. As far as TransitNetwork stuff: I think you've defined a good set of high level features that are of interest to feed consumers. I'd be careful about trying to get abstract and making it a trait at this juncture, in particular GTFS makes a lot of decisions about its domain model that aren't reflected in other specs. That's a decision we can always revisit anyways. I have some ideas for an extended feature set for TransitNetwork too but the scope is already pretty big so imma hold back. |
FeedReader helps access transit feed entries in a compressed archive or directory. TransitFeed is a helpful container for transit feed entries that can be filled with a feed reader. Addresses some of georust#5.
FeedReader helps access transit feed entries in a compressed archive or directory. TransitFeed is a helpful container for transit feed entries that can be filled with a feed reader. Addresses some of georust#5.
FeedReader helps access transit feed entries in a compressed archive or directory. TransitFeed is a helpful container for transit feed entries that can be filled with a feed reader. Addresses some of georust#5.
I think ignoring writing out a transit feed for now is fine, and validation is partially done by simply reading the files the way we are, as there are some formatting checks done already, in my opinion what we have now after a lot of great work from @medwards is 1.0 unless anyone feels otherwise |
I briefly looked over the GTFS Extensions ( https://developers.google.com/transit/gtfs/reference/gtfs-extensions ) and I'm worried about the optional columns that it introduces. Those can't be supported without breaking backwards compatibility right now. I'd also want to introduce a |
@medwards sounds like a plan to me |
Hey! 👋 I'm currently working on public-transport/gtfs-utils#25, an overhaul to the My 2 cents on API design from the reusability
Answering quite basic (but very relevant in practical usage of GTFS) questions like When does any vehicle depart at a bus stop? is surprisingly much work: GTFS Time values are inherently timezone-dependent, Also, a project- and language-independent test suite, i.e. a set of fixtures per "question"/operation, would be very helpful for this. Those have been very successful in other areas, e.g. for WebSocket implementations. storage-independencePersonally, I really want GTFS to move away from With scalabilityGTFS feeds will be significantly larger than the hundreds-of-mb-feeds that are common now; The Germany-wide feed is 2.5GB already, so, for example, a European feed including a lot of shapes will probably be dozens of GB in size. With If the input files are sorted in a specific way, we can increase processing speed as follows:
validationThere are a bazillion validation (i.e. "semantic checks on the actual data") cases; The best practices page is long, and the GTFS issue tracker and mailing lists are full of edge cases. There are at east 20 libs across languages doing some form of validation, but none of them cover all the issues that we see with GTFS feeds in the wild. I'd dare to say that people don't care which language a GTFS validator is written in, but they strongly prefer a certain language for "questions"/analysis. Like the "questions"/analysis mentioned above, validation lends itself to a project- and language-independent set of fixtures, maintained by the wider GTFS community. I hope this will push the overall quality of GTFS feeds, and reduce the amount of duplicated work poured into all those GTFS validation libs. I therefore propose not to put too much effort into validation in this project (I'm obviously just a random stranger telling what to do 😬). Edit: I have created public-transport/ideas#17 for the out-of-scope task of creating such a cross-project GTFS test suite. |
just to give some pointers (and it might gives you some ideas), there are already several rust libraries for GTFS handling:
|
Just giving an update on #5 (comment) here. I have implemented public-transport/gtfs-utils#25, I'm a Rust junior, so forgive me if I ask such naive questions, but is it true that |
This crate provides a lazy iterator over CSV rather than attempting to parse and load the entire GTFS file set into memory all at once. Something I found particularly painful when writing tflgtfs (transit for london to gtfs) |
It would be much nicer to simply work with the .zip file
Ex:
Solved with #14
The text was updated successfully, but these errors were encountered: