Skip to content

Allow underscores in GTFS feed IDs - #5191

Merged
leonardehrenfried merged 7 commits into
opentripplanner:dev-2.xfrom
ibi-group:underscore-feed-id
Jun 22, 2023
Merged

Allow underscores in GTFS feed IDs#5191
leonardehrenfried merged 7 commits into
opentripplanner:dev-2.xfrom
ibi-group:underscore-feed-id

Conversation

@leonardehrenfried

Copy link
Copy Markdown
Member

Summary

Right now it's not allowed to have an underscore in a GTFS feed ID - the underscore is stripped out. This seems like a relict from another time where this ID was used differently and I cannot see a reason why we shouldn't allow the underscore.

This PR fixes that and also does a bit of gentle clear out of related areas in the code.

Unit tests

Added.

@leonardehrenfried leonardehrenfried added +GTFS Related to import of GTFS data !Technical Debt Improve code quality, no functional changes. IBI Developed by or important for IBI Group labels Jun 14, 2023
@leonardehrenfried
leonardehrenfried requested a review from a team as a code owner June 14, 2023 15:28
@codecov

codecov Bot commented Jun 14, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.06 🎉

Comparison is base (14087c8) 65.36% compared to head (c3c57e4) 65.42%.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #5191      +/-   ##
=============================================
+ Coverage      65.36%   65.42%   +0.06%     
- Complexity     14456    14478      +22     
=============================================
  Files           1754     1755       +1     
  Lines          67925    67984      +59     
  Branches        7231     7231              
=============================================
+ Hits           44396    44477      +81     
+ Misses         21059    21041      -18     
+ Partials        2470     2466       -4     
Impacted Files Coverage Δ
.../opentripplanner/gtfs/graphbuilder/GtfsBundle.java 70.90% <ø> (ø)
...pplanner/gtfs/graphbuilder/GtfsFeedParameters.java 100.00% <ø> (ø)
...entripplanner/graph_builder/module/GtfsFeedId.java 92.30% <100.00%> (ø)

... and 15 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@leonardehrenfried leonardehrenfried changed the title Allow underscores in GTFS feed IDs derived from feed_info.txt Allow underscores in GTFS feed IDs Jun 14, 2023
@t2gran t2gran added this to the 2.4 (next release) milestone Jun 15, 2023
@t2gran
t2gran requested a review from vpaturet June 15, 2023 13:51
Comment thread src/test/java/org/opentripplanner/graph_builder/module/GtfsFeedIdTest.java Outdated
Comment thread src/test/java/org/opentripplanner/graph_builder/module/GtfsFeedIdTest.java Outdated
Comment thread src/main/java/org/opentripplanner/graph_builder/module/GtfsFeedId.java Outdated
@leonardehrenfried
leonardehrenfried merged commit 96d0301 into opentripplanner:dev-2.x Jun 22, 2023
t2gran pushed a commit that referenced this pull request Jun 22, 2023
@leonardehrenfried
leonardehrenfried deleted the underscore-feed-id branch June 22, 2023 12:34
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 IBI Developed by or important for IBI Group !Technical Debt Improve code quality, no functional changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants