OpenRailAssociation / osrd

An open source web application for railway infrastructure design, capacity analysis, timetabling and simulation
https://osrd.fr
GNU Lesser General Public License v3.0
415 stars 40 forks source link

front: fix trains not stopping at the end of path #7880

Closed SharglutDev closed 6 days ago

SharglutDev commented 6 days ago

close #7868

Use dayjs to transform a duration in ISO8601 in seconds so that it's resilient to any format of ISO8601 (not only PTxxx)

close #7863

By default, we add a 0sec stopFor for the destination when launching the pathfinding

codecov-commenter commented 6 days ago

Codecov Report

Attention: Patch coverage is 37.50000% with 10 lines in your changes missing coverage. Please review.

Project coverage is 28.54%. Comparing base (435263b) to head (5710204). Report is 10 commits behind head on dev.

Files Patch % Lines
...thfinding/components/Pathfinding/PathfindingV2.tsx 0.00% 8 Missing :warning:
...thfinding/components/Pathfinding/TypeAndPathV2.tsx 0.00% 1 Missing :warning:
front/src/utils/timeManipulation.ts 85.71% 0 Missing and 1 partial :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #7880 +/- ## ============================================ - Coverage 28.54% 28.54% -0.01% + Complexity 2060 2059 -1 ============================================ Files 1249 1249 Lines 154183 154210 +27 Branches 3041 3036 -5 ============================================ + Hits 44015 44016 +1 - Misses 108354 108384 +30 + Partials 1814 1810 -4 ``` | [Flag](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7880/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [core](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7880/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `74.95% <ø> (-0.01%)` | :arrow_down: | | [editoast](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7880/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `71.64% <ø> (-0.04%)` | :arrow_down: | | [front](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7880/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `10.01% <37.50%> (+<0.01%)` | :arrow_up: | | [gateway](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7880/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `2.34% <ø> (ø)` | | | [railjson_generator](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7880/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `87.49% <ø> (ø)` | | | [tests](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7880/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `72.93% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more.

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

kmer2016 commented 6 days ago

I realize that there are some duplication of code used for starting pathfinding in PathFindingV2.tsx and TypeAndPathV2.tsx. I think we must fix it just after this PR will merged, because it extract the logic of start pathfinding in a hook.