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

Fix coach and trolleybus extended GTFS route types #6086

Open
wants to merge 1 commit into
base: dev-2.x
Choose a base branch
from

Conversation

miklcct
Copy link

@miklcct miklcct commented Sep 23, 2024

Summary

Fix GTFS extended route types for coach (2xx) and trolleybus (8xx)

Issue

Fixes #5550

Unit tests

None needed - trivial changes

Documentation

None needed - trivial changes

@miklcct miklcct requested a review from a team as a code owner September 23, 2024 14:13
Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Please upload report for BASE (dev-2.x@155d19b). Learn more about missing BASE report.
Report is 89 commits behind head on dev-2.x.

Files with missing lines Patch % Lines
...pentripplanner/gtfs/mapping/TransitModeMapper.java 0.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             dev-2.x    #6086   +/-   ##
==========================================
  Coverage           ?   69.81%           
  Complexity         ?    17422           
==========================================
  Files              ?     1974           
  Lines              ?    74537           
  Branches           ?     7633           
==========================================
  Hits               ?    52040           
  Misses             ?    19846           
  Partials           ?     2651           

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

@leonardehrenfried leonardehrenfried added the GTFS Related to import of GTFS data label Sep 24, 2024
Copy link
Member

@leonardehrenfried leonardehrenfried left a comment

Choose a reason for hiding this comment

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

Due to OTP's complexity, I'm afraid there is no such thing as a trivial change anymore and we expect you to write a test for every PR. Luckily, testing this this is quite easy and you can add more test cases to the existing ones.

On top of this, using COACH instead BUS may be the correct thing to do for the 200-299 type range but it is a breaking change so we will need to check with the relevant users.

@@ -19,7 +19,7 @@ public static TransitMode mapMode(int routeType) {
if (routeType >= 100 && routeType < 200) { // Railway Service
return TransitMode.RAIL;
} else if (routeType >= 200 && routeType < 300) { //Coach Service
Copy link
Member

Choose a reason for hiding this comment

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

I know that you didn't do this but can you convert all trailing comments to line comments, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GTFS Related to import of GTFS data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenTripPlanner returns a route as mode "BUS" instead of "COACH" for GTFS route type 200
2 participants