-
Notifications
You must be signed in to change notification settings - Fork 1
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
REFACTOR: Query template and facade for routing in service #177
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add all stops to RAPTOR, even if they have no departures / stopping trips. - When transfers are generated, it could be that connections from or to stops with no trips are available via a footpath / transfer as first or last leg.
- Test passes when all stops are added to raptor, even if they have no departures. - The asserts are checking actual transfer ids or keys, which makes it easier to follow the test cases. - Clearly differentiate between same stop transfers and between stop transfers. - Suppress unchecked cast compiler warnings in test cases.
- The RAPTOR should not contain all stops, due to the parent stops, which often have not got any departures but would increase the stop array size significantly.
Now only stops with departures are added to the raptor.
…s from router in service - Move transfer generation to convert package. - Pass generators to converter instead of transfers. - Generator uses a stop collection to build transfers instead of the complete schedule. - Service catches IllegalArgumentException of raptor router and returns an empty list. - Introduce GtfsToRaptorTestSchedule to reuse the ManualSchedule. - Rename isoLines to isolines, be consistent.
… precedence order.
… private if no outside access is needed
… pattern and invalid stop exception handling.
- Still has open TODOs and points to be discussed. - Introduce routing query facade the hide complexity of routing from the service.
- Add descriptive logging to most public methods in GtfsRaptorService. - Ensure consistent and informative log messages for easier debugging and tracing. - Set RaptorRouter logging level to DEBUG, as those logs are more important for a technical audience during debugging.
…aptor implementation
…wo stops This case occurs if a stop query does not return any results, due to missing departures on stops, then a query from the stop coordinates is executed as fallback.
- Add location interface to stop. - Refactor error message in walk calculator.
…cade Note: The test cases are still failing.
Note: Arrival is still failing
- Times are still failing due to an issue with the date.
…soline query templates
@munterfi nice work. From looking through I couldn't find any issues with this pull request. I will try to address at least one of the two remaining issues this weekend. |
clukas1
approved these changes
Jan 24, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First draft / concept on how to break down the complexity of the routing in the service.
Challenges:
Goal: Reduce the complexity by introducing individual cases without code duplication.
I think with the template method pattern and swapping the cases, we can break it down and encapsulate the logic behind a facade, which should be testable.