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

Call correct isochrone compute method depending on requested expansion type #2967

Merged
merged 1 commit into from
Mar 25, 2021

Conversation

danpat
Copy link
Member

@danpat danpat commented Mar 25, 2021

Issue

Looks like this was a typo introduced in the refactoring done here

Tasklist

  • Add tests
  • Add #fixes with the issue number that this PR addresses
  • Update the docs with any new request parameters or changes to behavior described
  • Update the changelog

Requirements / Relations

Link any requirements here. Other pull requests this PR is based on?

@@ -235,10 +235,10 @@ void Dijkstras::Expand(ExpansionType expansion_type,
Compute(*api.mutable_options()->mutable_locations(), reader, costings, mode);
break;
case ExpansionType::reverse:
Compute(*api.mutable_options()->mutable_locations(), reader, costings, mode);
ComputeReverse(*api.mutable_options()->mutable_locations(), reader, costings, mode);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to add tests (new or update existing) to catch such issues? (haven't looked at current isochrone tests)

Copy link
Member

Choose a reason for hiding this comment

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

its hard to do the multimodal one unless we just test that it works for a short pedestrian only route. one day we need to figure out how to generate transit pbfs from gurka that would be awesome.

as for reverse we can totally test it but it will be just as unscientific of a test as the existing isochrone test in that we'll just check that a polygon comes out. its very hard to really accurately test this type of thing where the result is a geometric shape.

@kevinkreiser
Copy link
Member

This is a good breakfix. We should add testing but it seems unfair to put that burden on this PR given there was no testing on it before.

@kevinkreiser kevinkreiser merged commit 782452b into master Mar 25, 2021
@danpat
Copy link
Member Author

danpat commented Mar 25, 2021

@kevinkreiser 👍 thanks - I have some refactoring PRs coming to start to address #2885, and I'm going to start with aligning the isochrone and bidir_astar code. I'll include some tests with that, because as this PR shows, refactoring can be risky :-)

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.

None yet

3 participants