Skip to content

Fix processing of one-way boarding locations - #6410

Merged
leonardehrenfried merged 10 commits into
opentripplanner:dev-2.xfrom
leonardehrenfried:platform-fix
Feb 4, 2025
Merged

Fix processing of one-way boarding locations#6410
leonardehrenfried merged 10 commits into
opentripplanner:dev-2.xfrom
leonardehrenfried:platform-fix

Conversation

@leonardehrenfried

Copy link
Copy Markdown
Member

Summary

It fixes a problem where invalid OSM platform data would crash the graph build.

In order to have more precise tests that only test individual OSM ways rather than a whole area, I extracted an interface for OsmProvider and added a test implementation. This makes it much easier to write tests that don't need to load OSM data from disk.

Issue

Closes #6387
Closes #6388

Unit tests

Lots added.

Documentation

Javadoc.

@leonardehrenfried leonardehrenfried added !Bug Apply to issues describing a bug and PRs witch fixes it. !Technical Debt Improve code quality, no functional changes. labels Jan 28, 2025
@leonardehrenfried
leonardehrenfried requested a review from a team as a code owner January 28, 2025 12:39
@codecov

codecov Bot commented Jan 28, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 79.16667% with 15 lines in your changes missing coverage. Please review.

Project coverage is 69.84%. Comparing base (0c8c3b2) to head (b3623d1).
Report is 63 commits behind head on dev-2.x.

Files with missing lines Patch % Lines
...va/org/opentripplanner/osm/DefaultOsmProvider.java 75.43% 13 Missing and 1 partial ⚠️
...ripplanner/graph_builder/module/osm/OsmModule.java 87.50% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6410      +/-   ##
=============================================
+ Coverage      69.79%   69.84%   +0.05%     
- Complexity     18092    18129      +37     
=============================================
  Files           2064     2069       +5     
  Lines          77209    77271      +62     
  Branches        7859     7856       -3     
=============================================
+ Hits           53888    53972      +84     
+ Misses         20566    20544      -22     
  Partials        2755     2755              

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

@vesameskanen
vesameskanen self-requested a review January 29, 2025 09:21
@t2gran t2gran added this to the 2.7 (next release) milestone Jan 29, 2025
@abyrd
abyrd self-requested a review January 29, 2025 15:05
@leonardehrenfried leonardehrenfried changed the title Introduce module tests for OsmModule, fix graph build crash Fix processing of one-way boarding locations Jan 30, 2025
abyrd
abyrd previously approved these changes Jan 30, 2025
@leonardehrenfried
leonardehrenfried merged commit e987c72 into opentripplanner:dev-2.x Feb 4, 2025
t2gran pushed a commit that referenced this pull request Feb 4, 2025
@leonardehrenfried
leonardehrenfried deleted the platform-fix branch February 4, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!Bug Apply to issues describing a bug and PRs witch fixes it. !Technical Debt Improve code quality, no functional changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NullPointerException when loading StreetEdgePair

5 participants