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

Pass-through should override transit-group-priority #5638

Merged
merged 2 commits into from
Jan 30, 2024

Conversation

t2gran
Copy link
Member

@t2gran t2gran commented Jan 23, 2024

Summary

Pass-through and transit-group-priority uses the same Raptor feature and can not be use at the same time (for now - if needed we can fix this). In OTP now pass-through is disabled if transit-priority is enabled. This is a bit unfortunate since transit-priority is a more general thing that might be set up as a default configured feature, while pass-through is always specific to a request. So, it make more sense to turn it around and only allow transit-group-priority if no pass-through-stops exist in the request. This PR does exactly this.

Issue

🟥 This issue was reported internally at Entur, and no issue was created for it. The fix is very simple.

Unit tests

✅ Added a regression test and a smoke test on the mapping of pass-through-points

Documentation

🟥 No doc added

Changelog

🟥 This bug did not exist tín the previous version of OTP; Hence, there is no change.

Bumping the serialization version id

🟥 Not required

@t2gran t2gran added Bug Entur test This is currently being tested at Entur labels Jan 23, 2024
@t2gran t2gran added this to the 2.5 (next release) milestone Jan 23, 2024
@t2gran t2gran requested a review from a team as a code owner January 23, 2024 16:08
@t2gran t2gran changed the title Fix: Make pass-trough override transit-group-priority Pass-trough should override transit-group-priority Jan 23, 2024
@@ -28,7 +29,7 @@
import org.opentripplanner.routing.api.request.framework.CostLinearFunction;
import org.opentripplanner.transit.model.site.StopLocation;

public class RaptorRequestMapper {
public class RaptorRequestMapper<T extends RaptorTripSchedule> {
Copy link
Member Author

Choose a reason for hiding this comment

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

Adding the generic type here was necessary for adding tests. The DefaultAccessEgress -> AStar State😢

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 46 lines in your changes are missing coverage. Please review.

Comparison is base (4e4af20) 67.50% compared to head (65e47e6) 67.46%.
Report is 6 commits behind head on dev-2.x.

Files Patch % Lines
...xt/reportapi/model/TransitGroupPriorityReport.java 0.00% 39 Missing ⚠️
...planner/ext/reportapi/resource/ReportResource.java 0.00% 4 Missing ⚠️
...oradapter/transit/mappers/RaptorRequestMapper.java 70.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #5638      +/-   ##
=============================================
- Coverage      67.50%   67.46%   -0.05%     
- Complexity     16285    16287       +2     
=============================================
  Files           1888     1889       +1     
  Lines          71547    71591      +44     
  Branches        7408     7414       +6     
=============================================
- Hits           48301    48300       -1     
- Misses         20747    20790      +43     
- Partials        2499     2501       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jtorin jtorin changed the title Pass-trough should override transit-group-priority Pass-through should override transit-group-priority Jan 30, 2024
@t2gran t2gran merged commit 39f16d7 into opentripplanner:dev-2.x Jan 30, 2024
5 checks passed
@t2gran t2gran deleted the fix_pass_through branch January 30, 2024 10:00
t2gran pushed a commit that referenced this pull request Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Entur test This is currently being tested at Entur
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants