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

Jormungandr: fix reverse isochrons #1082

Merged
merged 5 commits into from
Jul 9, 2015
Merged

Conversation

antoine-de
Copy link
Contributor

isochrons were working only with a 'from'argument, they now also works with only a 'to' argument.

fix http://jira.canaltp.fr/browse/NAVITIAII-1774

@yohanboniface, it should fix your problem, thanks for the bug report!

fixes SNCFdevelopers/API-trains-sncf#7

} else {
ep = destinations[0];
}
return navitia::routing::make_isochrone(*planner, ep, request.datetimes(0),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you need to specify if ep is the origin or the destination?

@TeXitoi
Copy link
Contributor

TeXitoi commented Jul 6, 2015

The direction is fixed by the from/to param in isochrone: from -> clockwise, to -> non-clockwise. Jormungandr should do something about that and kraken or raptor should check the coherence of these params.

@antoine-de
Copy link
Contributor Author

you're right I added a test on this

add tests and then fix the discovered bugs :)
normal_response, error_code = self.query_no_assert(q)

assert error_code == 404
assert normal_response['error']['message'] == 'isochrone works only for clockwise request'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linefeed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@TeXitoi
Copy link
Contributor

TeXitoi commented Jul 8, 2015

OK for me

and return a nice error when no solution found
@kinnou02
Copy link
Contributor

kinnou02 commented Jul 9, 2015

Fine, but you need to update the documentation of isochrone

TeXitoi added a commit that referenced this pull request Jul 9, 2015
Jormungandr: fix reverse isochrons
@TeXitoi TeXitoi merged commit d3c0c90 into hove-io:dev Jul 9, 2015
@antoine-de
Copy link
Contributor Author

🖕

@l-vincent-l
Copy link
Contributor

@stifoon manage your team!

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 this pull request may close these issues.

journeys entry point: "from" not required in doc but seems mandatory in API
5 participants