Skip to content

Conversation

@habrahamsson-skanetrafiken
Copy link
Contributor

Summary

This is a pure refactor that separates the siri TripUpdate object into two different records depending on whether the trip is being modified or if a new trip is being added.

The nice thing about having two separate records for SiriAddTrip and SiriModifyTrip is that it's clearer what properties are actually valid depending on the use case, instead of having a big record with lots of nullable fields that is difficult to understand when you can expect different fields to be present or not.

Unit tests

There is pretty good test coverage from before of this piece of code.

Bumping the serialization version id

No.

@habrahamsson-skanetrafiken habrahamsson-skanetrafiken added +Real-Time The issue/PR is related to RealTime updates +Skip Changelog This is not a relevant change for a product owner since last release. labels Feb 25, 2025
@habrahamsson-skanetrafiken habrahamsson-skanetrafiken requested a review from a team as a code owner February 25, 2025 16:31
@codecov
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.10%. Comparing base (b9ebbd3) to head (02db3e7).
Report is 4 commits behind head on dev-2.x.

Additional details and impacted files
@@            Coverage Diff             @@
##             dev-2.x    #6489   +/-   ##
==========================================
  Coverage      70.10%   70.10%           
+ Complexity     18269    18263    -6     
==========================================
  Files           2077     2077           
  Lines          77658    77658           
  Branches        7827     7827           
==========================================
+ Hits           54439    54440    +1     
+ Misses         20441    20440    -1     
  Partials        2778     2778           

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

@habrahamsson-skanetrafiken habrahamsson-skanetrafiken changed the title Refactor: Separate the Siri TripUpdate inte AddedTrip and ModifiedTrip classes Refactor: Separate the Siri TripUpdate into AddedTrip and ModifiedTrip classes Feb 26, 2025
@habrahamsson-skanetrafiken habrahamsson-skanetrafiken marked this pull request as draft February 28, 2025 07:57
@habrahamsson-skanetrafiken
Copy link
Contributor Author

Converting to draft for now, let's merge vincents Extra call pr before this

@t2gran t2gran added this to the 2.8 (next release) milestone Mar 12, 2025
@t2gran t2gran modified the milestones: 2.8, 2.9 (next release) Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

+Real-Time The issue/PR is related to RealTime updates +Skip Changelog This is not a relevant change for a product owner since last release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants