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

Use enum instead of boolean for real time update semantics #5892

Merged

Conversation

leonardehrenfried
Copy link
Member

Summary

In #5871 we discussed that the boolean argument indicating if a realtime update is a full or an incremental one should be replaced with an enum, which this PR does.

Issue

#4816

@vpaturet @habrahamsson-skanetrafiken Do you want to have this for SIRI as well?

@leonardehrenfried leonardehrenfried requested a review from a team as a code owner June 5, 2024 08:53
@leonardehrenfried leonardehrenfried added Real-Time Update The issue/PR is related to RealTime updates Skip Changelog labels Jun 5, 2024
Copy link

codecov bot commented Jun 5, 2024

Codecov Report

Attention: Patch coverage is 47.61905% with 11 lines in your changes missing coverage. Please review.

Project coverage is 69.45%. Comparing base (b9e54d2) to head (dfce217).

Files Patch % Lines
...r/ext/siri/updater/SiriETHttpTripUpdateSource.java 0.00% 3 Missing ⚠️
...ner/updater/trip/GtfsRealtimeTripUpdateSource.java 50.00% 2 Missing ⚠️
...pplanner/updater/trip/MqttGtfsRealtimeUpdater.java 0.00% 2 Missing ⚠️
...pplanner/ext/siri/SiriTimetableSnapshotSource.java 0.00% 0 Missing and 1 partial ⚠️
...pentripplanner/ext/siri/updater/SiriETUpdater.java 0.00% 1 Missing ⚠️
...entripplanner/updater/trip/PollingTripUpdater.java 0.00% 1 Missing ⚠️
...er/updater/trip/TripUpdateGraphWriterRunnable.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #5892      +/-   ##
=============================================
- Coverage      69.45%   69.45%   -0.01%     
- Complexity     17064    17066       +2     
=============================================
  Files           1927     1928       +1     
  Lines          73578    73580       +2     
  Branches        7549     7550       +1     
=============================================
+ Hits           51106    51107       +1     
- Misses         19847    19848       +1     
  Partials        2625     2625              

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

@leonardehrenfried leonardehrenfried changed the title Use enum instead of boolean for update semantics Use enum instead of boolean for real time update semantics Jun 5, 2024
t2gran
t2gran previously approved these changes Jun 7, 2024
@t2gran t2gran added this to the 2.6 (next release) milestone Jun 7, 2024
Comment on lines +8 to +18
/**
* The update contains all available realtime information for all trips in a given feed. The
* previously stored updates must be deleted and replaced with the information from this one.
*/
FULL_DATASET,
/**
* The update contains only information for a subset of all trips. If there is information stored
* from a previous realtime update it must be kept in order to have a complete picture of all
* trips.
*/
DIFFERENTIAL,
Copy link
Member

Choose a reason for hiding this comment

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

Btw does SIRI itself have some similar thing? I'm just wondering since we usually tell in the javadoc what are the matching SIRI values.

Copy link
Member Author

Choose a reason for hiding this comment

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

There is a little bit of code that suggests that Siri updates can either be FULL_DATASET or DIFFERENTIAL but I don't see the former being ever returned. That's a lot of words to say "I don't know".

@leonardehrenfried leonardehrenfried merged commit b1a7c53 into opentripplanner:dev-2.x Jun 13, 2024
5 checks passed
@leonardehrenfried leonardehrenfried deleted the update-semantics branch June 13, 2024 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Real-Time Update The issue/PR is related to RealTime updates Skip Changelog Technical Debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants