Skip to content
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

Update Readme #329

Closed
datanel opened this issue Aug 27, 2019 · 3 comments · Fixed by #692
Closed

Update Readme #329

datanel opened this issue Aug 27, 2019 · 3 comments · Fixed by #692

Comments

@datanel
Copy link
Member

datanel commented Aug 27, 2019

We could have a better Readme

  • remove references to binaries once removed binaries #316 is merged
  • complete the list of features (maybe add some examples in ./examples)
@antoine-de
Copy link
Contributor

antoine-de commented Jan 28, 2020

I do agree that the documentation could be improved 😜

It would for example be very nice to see the ergonomic of handling transit data. It's a killer feature, but It's impossible to know it's existence!

something like?

let transit_data = transit_model::gtfs::read_from_path("./example/", None, None, false).expect("impossible to read GTFS");

// get a stop by it's ID
let stop_area_idx = transit_data
    .stop_areas
    .get_idx("stoparea:1")
    .expect("impossible to find stop area");

println!("routes passing by stop stoparea:1");

// efficiently get all the routes that pass through the stop_area
for route in transit_data
    // The rust typesystem is able to guess that we are looking for the routes linked to the stop
    // because the Idx are strongly typed, thus route_idx is Idx<Route>
    .get_corresponding_from_idx(stop_area_idx)
    .into_iter()
    .map(|route_idx| &transit_data.routes[route_idx])
{
    println!(" - {}", route.name);
}

And maybe add a reference to the quite good technical documentation ?

@datanel
Copy link
Member Author

datanel commented Jan 28, 2020

yes that's the idea

@datanel
Copy link
Member Author

datanel commented Jul 29, 2020

the readme has been updated but I think we need to provide some examples as you suggest @antoine-de

pbougue pushed a commit to pbougue/transit_model that referenced this issue Aug 27, 2020
pbougue pushed a commit to pbougue/transit_model that referenced this issue Aug 27, 2020
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 a pull request may close this issue.

2 participants