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

Take realtime patterns into account when storing realtime vehicles #5994

Merged

Conversation

leonardehrenfried
Copy link
Member

@leonardehrenfried leonardehrenfried commented Aug 5, 2024

Summary

When storing realtime vehicle positions by pattern the realtime added patterns are not taken into account correctly.

This PR uses the original pattern as the key for the storage map.

Unit tests

Added.

Documentation

Explained it in Javadoc.

@leonardehrenfried leonardehrenfried requested a review from a team as a code owner August 5, 2024 16:18
Copy link

codecov bot commented Aug 5, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 69.73%. Comparing base (fbca53d) to head (e81aa53).
Report is 65 commits behind head on dev-2.x.

Files Patch % Lines
...hicles/internal/DefaultRealtimeVehicleService.java 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             dev-2.x    #5994   +/-   ##
==========================================
  Coverage      69.73%   69.73%           
- Complexity     17294    17297    +3     
==========================================
  Files           1954     1954           
  Lines          74163    74167    +4     
  Branches        7595     7595           
==========================================
+ Hits           51715    51719    +4     
  Misses         19809    19809           
  Partials        2639     2639           

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

@leonardehrenfried leonardehrenfried force-pushed the realtime-vehicle-pattern branch from 611727b to e81aa53 Compare August 6, 2024 10:40
Copy link
Member

@optionsome optionsome left a comment

Choose a reason for hiding this comment

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

There are potential issues with using the originalTripPattern from a realtime added trip pattern but I think so far we have kinda merged the realtime added patterns with the normal ones in API if I remember correctly so this does make sense. I think in the somewhat near future we do want to refactor the patterns a bit more so there is a pattern which makes more sense for clients to use in most cases.

@leonardehrenfried leonardehrenfried merged commit b93901e into opentripplanner:dev-2.x Aug 19, 2024
5 checks passed
@leonardehrenfried leonardehrenfried deleted the realtime-vehicle-pattern branch August 19, 2024 14:15
t2gran pushed a commit that referenced this pull request Aug 19, 2024
@t2gran t2gran added this to the 2.6 milestone Sep 18, 2024
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.

4 participants