Skip to content

Conversation

@miklcct
Copy link
Contributor

@miklcct miklcct commented Oct 10, 2024

Such geometries may happen when a replacement trip partially uses the original geometry.

Summary

Fix out of bounds under period of train disruption. The problem occurs when fetching geometries for a stop further than the geometry which may happen when a replacement trip partially uses the geometry.

Issue

Fixes #6072 and possibly #3110.

Unit tests

Added.

Documentation

None needed.

@miklcct miklcct requested a review from a team as a code owner October 10, 2024 09:05
@miklcct miklcct changed the title fix #6072 fix out of bounds when fetching NextLegs Oct 10, 2024
@habrahamsson-skanetrafiken
Copy link
Contributor

This approach has some issues and needs to be discussed in the developer meeting.

@t2gran t2gran added this to the 2.7 (next release) milestone Oct 16, 2024
@miklcct miklcct marked this pull request as draft October 24, 2024 14:29
@miklcct
Copy link
Contributor Author

miklcct commented Oct 24, 2024

As discussed in the developer meeting I am going to work on the shape generation at the point of generating new pattern.

@miklcct miklcct force-pushed the fix-nextLeg-outOfBounds branch from 56131a8 to 2dfaddf Compare October 25, 2024 09:57
@miklcct miklcct force-pushed the fix-nextLeg-outOfBounds branch from 2dfaddf to 8753f82 Compare October 25, 2024 10:13
@miklcct miklcct marked this pull request as ready for review October 25, 2024 10:14
@codecov
Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.91%. Comparing base (ee53e50) to head (15c862d).
Report is 33 commits behind head on dev-2.x.

Additional details and impacted files
@@            Coverage Diff             @@
##             dev-2.x    #6136   +/-   ##
==========================================
  Coverage      69.91%   69.91%           
- Complexity     17736    17740    +4     
==========================================
  Files           2006     2006           
  Lines          75526    75521    -5     
  Branches        7730     7731    +1     
==========================================
- Hits           52804    52801    -3     
+ Misses         20036    20035    -1     
+ Partials        2686     2685    -1     

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

@optionsome optionsome self-requested a review October 29, 2024 12:31
@leonardehrenfried leonardehrenfried changed the title fix out of bounds when fetching NextLegs Fix hop geometries when one pattern is replaced by another with different number of stops Nov 4, 2024
@leonardehrenfried
Copy link
Member

I know you didn't write this code, but can you please apply this commit which tidies the neighbouring code a little bit: leonardehrenfried@e47856b

@optionsome optionsome merged commit 01ef0bf into opentripplanner:dev-2.x Nov 7, 2024
5 checks passed
t2gran pushed a commit that referenced this pull request Nov 7, 2024
@miklcct miklcct deleted the fix-nextLeg-outOfBounds branch November 26, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataFetchingException (index out of bounds) when planning journey during period of disruption

5 participants