Skip to content

Fix GTFS-Flex duration offset and factor parsing when only one of them is set - #6138

Merged
vpaturet merged 1 commit into
opentripplanner:dev-2.xfrom
LeoFrachet:fix-gtfs-flex-offset-and-factors
Oct 11, 2024
Merged

Fix GTFS-Flex duration offset and factor parsing when only one of them is set#6138
vpaturet merged 1 commit into
opentripplanner:dev-2.xfrom
LeoFrachet:fix-gtfs-flex-offset-and-factors

Conversation

@LeoFrachet

Copy link
Copy Markdown
Contributor

PR Instructions

Summary

Currently, if only one of the safe_duration_offset or safe_duration_factor is set, OTP crashes.

This PR fixes that by providing default for the other one if only of them is set.

Issue

No.

Unit tests

Unit tests added.

Documentation

No

@codecov

codecov Bot commented Oct 10, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.86%. Comparing base (9e58db4) to head (9cd51fe).
Report is 70 commits behind head on dev-2.x.

Additional details and impacted files
@@            Coverage Diff             @@
##             dev-2.x    #6138   +/-   ##
==========================================
  Coverage      69.85%   69.86%           
- Complexity     17491    17497    +6     
==========================================
  Files           1976     1976           
  Lines          74712    74717    +5     
  Branches        7645     7647    +2     
==========================================
+ Hits           52192    52200    +8     
  Misses         19868    19868           
+ Partials        2652     2649    -3     

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

@vpaturet vpaturet added !Bug Apply to issues describing a bug and PRs witch fixes it. +GTFS Related to import of GTFS data labels Oct 10, 2024
@LeoFrachet
LeoFrachet marked this pull request as ready for review October 10, 2024 13:28
@LeoFrachet
LeoFrachet requested a review from a team as a code owner October 10, 2024 13:28
@vpaturet
vpaturet self-requested a review October 10, 2024 13:28
@vpaturet
vpaturet merged commit 7edd0d1 into opentripplanner:dev-2.x Oct 11, 2024
t2gran pushed a commit that referenced this pull request Oct 11, 2024
@LeoFrachet
LeoFrachet deleted the fix-gtfs-flex-offset-and-factors branch October 11, 2024 07:22
@t2gran t2gran added this to the 2.7 (next release) milestone Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!Bug Apply to issues describing a bug and PRs witch fixes it. +GTFS Related to import of GTFS data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants