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: fix max running time default value #9177

Merged
merged 1 commit into from
Oct 4, 2024
Merged

Conversation

eckter
Copy link
Contributor

@eckter eckter commented Oct 3, 2024

Fix #9164

With some cleaning up

There was a misconception around the "max run time" parameter: it describes the maximum duration between the first train departure and its last arrival, stops included. But it was computed and used as if it were the duration between the earliest possible train departure and the latest possible arrival at the last stop.

(e.g. if we want the train to run for 2h max but leave at any time between 10:00AM and 10:00PM, we should set it to 2h, but we used to set it to 2+12h)

@eckter eckter requested a review from a team as a code owner October 3, 2024 12:48
@codecov-commenter
Copy link

codecov-commenter commented Oct 3, 2024

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

Codecov Report

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

Project coverage is 37.54%. Comparing base (0f97f32) to head (5647be6).
Report is 6 commits behind head on dev.

Files with missing lines Patch % Lines
editoast/src/views/timetable/stdcm.rs 0.00% 10 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff            @@
##                dev    #9177   +/-   ##
=========================================
  Coverage     37.53%   37.54%           
  Complexity     2242     2242           
=========================================
  Files          1256     1257    +1     
  Lines        114937   114955   +18     
  Branches       3271     3272    +1     
=========================================
+ Hits          43141    43156   +15     
- Misses        69850    69852    +2     
- Partials       1946     1947    +1     
Flag Coverage Δ
core 74.78% <ø> (ø)
editoast 72.23% <0.00%> (+0.17%) ⬆️
front 15.55% <ø> (-0.02%) ⬇️
gateway 2.22% <ø> (ø)
osrdyne 2.56% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 86.71% <100.00%> (+0.24%) ⬆️

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.

Copy link
Contributor

@younesschrifi younesschrifi left a comment

Choose a reason for hiding this comment

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

LGTM ! 👍🏽

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.

Thank you very much for the PR's description, helped a lot 😅.

Would it make sense to add/modify some tests to avoid a regression on that topic?

Copy link
Contributor

@Erashin Erashin 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 fix :)

@eckter
Copy link
Contributor Author

eckter commented Oct 3, 2024

Would it make sense to add/modify some tests to avoid a regression on that topic?

Yes, most likely 🙈

It's a little tedious to properly test this, I've checked the parameters that are forwarded by core but it's not that easy to automate. But it should be doable with "planches travaux".

I just need to figure out what's the proper way to write tests in editoast. I vaguely remember that the python integration tests are supposed to be replaced by the editoast test suite?

@eckter eckter requested a review from a team as a code owner October 4, 2024 09:51
Copy link
Contributor

@shenriotpro shenriotpro left a comment

Choose a reason for hiding this comment

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

Thanks

@eckter
Copy link
Contributor Author

eckter commented Oct 4, 2024

@woshilapin I've added an integration test

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.

Thank you very much for adding a test (with beautiful ASCII art 😍).

Signed-off-by: Eloi Charpentier <eloi.charpentier.42@gmail.com>
@eckter eckter enabled auto-merge October 4, 2024 12:22
@eckter eckter added this pull request to the merge queue Oct 4, 2024
Merged via the queue into dev with commit 1e2a61b Oct 4, 2024
24 checks passed
@eckter eckter deleted the ech/fix-max-running-time branch October 4, 2024 12:48
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.

stdcm: maximum running time parameter is set too high
6 participants