Skip to content

Check transport mode when mapping GroupStops#5518

Merged
vpaturet merged 2 commits into
opentripplanner:dev-2.xfrom
entur:check_transport_mode_when_mapping_group_stops
Nov 21, 2023
Merged

Check transport mode when mapping GroupStops#5518
vpaturet merged 2 commits into
opentripplanner:dev-2.xfrom
entur:check_transport_mode_when_mapping_group_stops

Conversation

@vpaturet

@vpaturet vpaturet commented Nov 20, 2023

Copy link
Copy Markdown
Contributor

Summary

As detailed in #5506, when mapping "fixedStopAreaWide" FlexibleStopPlaces (i.e. "UnrestrictedPublicTransportAreas" stop areas), group stops should include only regular stops that match the transport mode of the FlexibleStopPlace.

Note: The Nordic NeTEx profile defines the transport mode as a mandatory field of a FlexibleStopPlace. If the transport mode is unset or unknown in the input dataset, no stop will be mapped.

Issue

Closes #5506

Unit tests

Updated unit tests.

Documentation

No.

@vpaturet vpaturet added !Improvement A functional improvement or micro feature +NeTEx This issue is related to the Netex model/import. labels Nov 20, 2023
@vpaturet vpaturet self-assigned this Nov 20, 2023
@codecov

codecov Bot commented Nov 20, 2023

Copy link
Copy Markdown

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (c706466) 66.93% compared to head (85e8f71) 66.95%.
Report is 87 commits behind head on dev-2.x.

Files Patch % Lines
...opentripplanner/netex/mapping/FlexStopsMapper.java 63.63% 2 Missing and 2 partials ⚠️
...pplanner/framework/collection/CollectionUtils.java 71.42% 1 Missing and 1 partial ⚠️
...pentripplanner/api/mapping/SystemNoticeMapper.java 0.00% 1 Missing ⚠️
...n/java/org/opentripplanner/model/SystemNotice.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #5518      +/-   ##
=============================================
+ Coverage      66.93%   66.95%   +0.01%     
- Complexity     15700    15794      +94     
=============================================
  Files           1819     1832      +13     
  Lines          70248    70540     +292     
  Branches        7392     7410      +18     
=============================================
+ Hits           47022    47229     +207     
- Misses         20772    20840      +68     
- Partials        2454     2471      +17     

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

@vpaturet vpaturet marked this pull request as ready for review November 21, 2023 08:50
@vpaturet vpaturet requested a review from a team as a code owner November 21, 2023 08:50
Comment thread src/main/java/org/opentripplanner/netex/mapping/FlexStopsMapper.java Outdated
Comment thread src/main/java/org/opentripplanner/netex/mapping/FlexStopsMapper.java Outdated

@leonardehrenfried leonardehrenfried left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good but please add some annotations for clarity and consider my suggestion.

@vpaturet vpaturet merged commit 0a0d8b0 into opentripplanner:dev-2.x Nov 21, 2023
t2gran pushed a commit that referenced this pull request Nov 21, 2023
@t2gran t2gran added this to the 2.5 (next release) milestone Mar 12, 2024
@t2gran t2gran deleted the check_transport_mode_when_mapping_group_stops branch October 9, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!Improvement A functional improvement or micro feature +NeTEx This issue is related to the Netex model/import.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A fixedStopAreaWide should only include stops with the same mode as the FlexStopPlace has

4 participants