Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editoast: import and send to core temporary speed limits (LTVs) #8985

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

Sh099078
Copy link
Contributor

@Sh099078 Sh099078 commented Sep 24, 2024

  • Add a temporary speed limit table to the database.
  • Add a create endpoint for temporary speed limits.
  • Update STDCM requests to include the list of temporary speed limits which are active between the query earliest possible departure time and its latest possible arrival time, margins included.

Fixes #8684
Fixes #8685

@codecov-commenter
Copy link

codecov-commenter commented Sep 24, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 55.89354% with 116 lines in your changes missing coverage. Please review.

Project coverage is 37.22%. Comparing base (b54cdb4) to head (b00d8bc).
Report is 38 commits behind head on dev.

Files with missing lines Patch % Lines
editoast/src/views/timetable/stdcm.rs 0.00% 99 Missing ⚠️
editoast/src/models/temporary_speed_limits.rs 16.66% 10 Missing ⚠️
editoast/src/core/pathfinding.rs 0.00% 4 Missing ⚠️
editoast/src/views/temporary_speed_limits.rs 96.77% 3 Missing ⚠️

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

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #8985      +/-   ##
============================================
+ Coverage     37.11%   37.22%   +0.10%     
- Complexity     2241     2242       +1     
============================================
  Files          1262     1265       +3     
  Lines        115834   116356     +522     
  Branches       3277     3279       +2     
============================================
+ Hits          42993    43313     +320     
- Misses        70887    71089     +202     
  Partials       1954     1954              
Flag Coverage Δ
core 74.78% <ø> (-0.01%) ⬇️
editoast 72.10% <50.42%> (-0.29%) ⬇️
front 15.33% <100.00%> (+0.13%) ⬆️
gateway 2.22% <ø> (+<0.01%) ⬆️
osrdyne 2.56% <ø> (-0.01%) ⬇️
railjson_generator 87.49% <ø> (ø)
tests 86.46% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@Sh099078 Sh099078 force-pushed the lf/editoast_add_ltv branch 6 times, most recently from cffcdbb to fa2627d Compare September 27, 2024 09:46
@Sh099078 Sh099078 marked this pull request as ready for review September 27, 2024 09:58
@Sh099078 Sh099078 requested a review from a team as a code owner September 27, 2024 09:58
@Sh099078 Sh099078 requested a review from leovalais September 27, 2024 09:59
@Sh099078 Sh099078 changed the title lf/editoast add ltv Editoast: import and send to core temporary speed limits (LTVs) Sep 27, 2024
Copy link
Contributor

@flomonster flomonster left a comment

Choose a reason for hiding this comment

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

We should add a table speed_limit_group like work_schedule_group. So speed limits are grouped behind a single ID.

editoast/src/core/stdcm.rs Outdated Show resolved Hide resolved
editoast/src/models/temporary_speed_limits.rs Show resolved Hide resolved
Copy link
Contributor

@woshilapin woshilapin left a comment

Choose a reason for hiding this comment

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

Great job. I left a bunch of comments, mostly suggestions, naming and nitpick. But at the very least, I believe the core part should also be provided as part of this PR (not the entire implementation but at least the update of the exposed API).

editoast/src/core/stdcm.rs Outdated Show resolved Hide resolved
editoast/src/core/stdcm.rs Outdated Show resolved Hide resolved
editoast/src/views/timetable/stdcm.rs Outdated Show resolved Hide resolved
editoast/src/views/timetable/stdcm.rs Outdated Show resolved Hide resolved
editoast/src/views/temporary_speed_limits.rs Outdated Show resolved Hide resolved
editoast/src/views/temporary_speed_limits.rs Show resolved Hide resolved
editoast/src/views/temporary_speed_limits.rs Outdated Show resolved Hide resolved
editoast/src/views/temporary_speed_limits.rs Outdated Show resolved Hide resolved
@Sh099078 Sh099078 force-pushed the lf/editoast_add_ltv branch 2 times, most recently from e17e297 to dbc5f64 Compare October 1, 2024 07:54
Copy link
Contributor

@flomonster flomonster left a comment

Choose a reason for hiding this comment

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

A few things to fix and I think we're good.

editoast/src/core/stdcm.rs Outdated Show resolved Hide resolved
editoast/src/views/timetable/stdcm.rs Outdated Show resolved Hide resolved
editoast/src/views/timetable/stdcm.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@leovalais leovalais left a comment

Choose a reason for hiding this comment

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

Great work! A few comments:

editoast/src/views/temporary_speed_limits.rs Outdated Show resolved Hide resolved
editoast/src/views/temporary_speed_limits.rs Show resolved Hide resolved
editoast/src/views/temporary_speed_limits.rs Show resolved Hide resolved
editoast/src/views/temporary_speed_limits.rs Outdated Show resolved Hide resolved
editoast/src/views/work_schedules.rs Outdated Show resolved Hide resolved
editoast/src/views/temporary_speed_limits.rs Outdated Show resolved Hide resolved
editoast/src/views/timetable/stdcm.rs Outdated Show resolved Hide resolved
editoast/src/views/timetable/stdcm.rs Outdated Show resolved Hide resolved
editoast/src/views/timetable/stdcm.rs Outdated Show resolved Hide resolved
@Sh099078 Sh099078 force-pushed the lf/editoast_add_ltv branch from cbc36c0 to de34c4d Compare October 1, 2024 15:12
@Sh099078 Sh099078 force-pushed the lf/editoast_add_ltv branch 2 times, most recently from 58ec1e2 to 77566e9 Compare October 2, 2024 08:02
Copy link
Contributor

@flomonster flomonster left a comment

Choose a reason for hiding this comment

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

Great PR! LGTM

@Sh099078 Sh099078 requested a review from a team as a code owner October 2, 2024 08:34
Copy link
Contributor

@woshilapin woshilapin left a comment

Choose a reason for hiding this comment

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

Thanks for all the work and follow-up.

@Sh099078 Sh099078 force-pushed the lf/editoast_add_ltv branch from 995587e to dc83a4e Compare October 2, 2024 08:41
@Sh099078 Sh099078 force-pushed the lf/editoast_add_ltv branch from dc83a4e to 9df74e1 Compare October 2, 2024 09:26
Copy link
Contributor

@leovalais leovalais left a comment

Choose a reason for hiding this comment

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

Thanks for the modifications!

editoast/src/views/temporary_speed_limits.rs Outdated Show resolved Hide resolved
  - Add a temporary_speed_limits table creation migration script.
  - Add a temporary speed limit creation endpoint.
  - Add the active temporary speed limits which are active during
    an stdcm search to the stdcm request sent to core.

Signed-off-by: Sh099078 <[email protected]>
@Sh099078 Sh099078 force-pushed the lf/editoast_add_ltv branch from 9df74e1 to b00d8bc Compare October 2, 2024 10:44
Copy link
Contributor

@clarani clarani left a comment

Choose a reason for hiding this comment

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

LGTM ✅

@Sh099078 Sh099078 self-assigned this Oct 2, 2024
@Sh099078 Sh099078 added this pull request to the merge queue Oct 2, 2024
Merged via the queue into dev with commit efce7b7 Oct 2, 2024
23 checks passed
@Sh099078 Sh099078 deleted the lf/editoast_add_ltv branch October 2, 2024 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pass LTV data from editoast to core Update OSRD database with LTV data
7 participants