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
419 stars 40 forks source link

editoast: stdcm: add arrival time parameters #7827

Closed eckter closed 2 weeks ago

eckter commented 3 weeks ago

Fix https://github.com/OpenRailAssociation/osrd/issues/7692 and https://github.com/OpenRailAssociation/osrd/issues/7687

Adds stop time parameters and forwards them from editoast inputs to core. Departure time parameter is now optional.

There's a few other changes on the editoast side to have meaningful values as start/end times despite this change. Eventually we should use them to pre-filter the resource uses (see https://github.com/OpenRailAssociation/osrd/issues/7649).

There's one API change on which I'm not 100% sure: I've "deprecated" the departure time parameter, assuming the time of the first waypoint should be used instead. We could instead keep it but not let the user set a time for the first waypoint.

Note: the feature is not entirely supported by core yet. When the departure time is set, the behavior won't change. If it's not set, the departure time will be too early and the scheduled points will be ignored, but it won't crash.

codecov-commenter commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 22.22222% with 49 lines in your changes missing coverage. Please review.

Project coverage is 28.54%. Comparing base (1178871) to head (12a5a59). Report is 1 commits behind head on dev.

Files Patch % Lines
editoast/src/views/v2/timetable/stdcm.rs 2.38% 41 Missing :warning:
...in/fr/sncf/osrd/api/api_v2/stdcm/STDCMRequestV2.kt 0.00% 5 Missing :warning:
...kotlin/fr/sncf/osrd/utils/json/UnitJsonAdapters.kt 0.00% 3 Missing :warning:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #7827 +/- ## ============================================ - Coverage 28.55% 28.54% -0.01% Complexity 2059 2059 ============================================ Files 1249 1249 Lines 154130 154183 +53 Branches 3040 3041 +1 ============================================ + Hits 44006 44011 +5 - Misses 108310 108358 +48 Partials 1814 1814 ``` | [Flag](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7827/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/7827/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `74.96% <0.00%> (-0.05%)` | :arrow_down: | | [editoast](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7827/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `71.65% <2.38%> (-0.11%)` | :arrow_down: | | [front](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7827/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `10.01% <100.00%> (+<0.01%)` | :arrow_up: | | [gateway](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7827/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/7827/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/7827/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `73.16% <ø> (ø)` | | 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.