opentripplanner / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
2.13k stars 1.01k forks source link

Small clean up of flex duration factor/offset #5856

Closed leonardehrenfried closed 1 month ago

leonardehrenfried commented 1 month ago

Summary

After merging of #5796 I realised that I missed a couple of renames where I still used the old name for time penalty (modifier, factors). This is fixed in this PR.

I also cleaned up the modifcation logic a bit: the check for isZero is no longer necessary as the default is a value that doesn't modify at all.

Lastly, I added a test that makes sure that the mapper sets the correct default value.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 68.37%. Comparing base (18d742f) to head (3faf591). Report is 22 commits behind head on dev-2.x.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev-2.x #5856 +/- ## ============================================= + Coverage 67.95% 68.37% +0.42% - Complexity 16607 16677 +70 ============================================= Files 1914 1914 Lines 72648 72650 +2 Branches 7452 7452 ============================================= + Hits 49368 49675 +307 + Misses 20750 20418 -332 - Partials 2530 2557 +27 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.