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

front: convert times from NGE to OSRD #8416

Merged
merged 2 commits into from
Sep 12, 2024
Merged

front: convert times from NGE to OSRD #8416

merged 2 commits into from
Sep 12, 2024

Conversation

emersion
Copy link
Member

@emersion emersion commented Aug 9, 2024

Closes: #8389

@emersion emersion requested a review from a team as a code owner August 9, 2024 15:15
@emersion emersion marked this pull request as draft August 9, 2024 15:17
@codecov-commenter
Copy link

codecov-commenter commented Aug 9, 2024

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

Codecov Report

Attention: Patch coverage is 1.38889% with 71 lines in your changes missing coverage. Please review.

Project coverage is 37.01%. Comparing base (c268b4a) to head (d031d8e).
Report is 4 commits behind head on dev.

Files Patch % Lines
...ationalStudies/components/MacroEditor/ngeToOsrd.ts 0.00% 70 Missing ⚠️
front/src/utils/date.ts 0.00% 0 Missing and 1 partial ⚠️

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

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #8416      +/-   ##
============================================
- Coverage     37.04%   37.01%   -0.03%     
  Complexity     2165     2165              
============================================
  Files          1267     1267              
  Lines        117203   117262      +59     
  Branches       3139     3139              
============================================
- Hits          43413    43408       -5     
- Misses        71948    72012      +64     
  Partials       1842     1842              
Flag Coverage Δ
core 74.94% <ø> (ø)
editoast 66.40% <ø> (-0.03%) ⬇️
front 15.76% <1.38%> (-0.02%) ⬇️
gateway 2.20% <ø> (ø)
osrdyne 2.71% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 73.00% <ø> (ø)

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.

@emersion emersion force-pushed the emr/nge-schedule branch 6 times, most recently from fe1950c to d031d8e Compare August 13, 2024 19:47
@emersion emersion force-pushed the emr/nge-schedule branch 7 times, most recently from 47e5a35 to 4d4b0c0 Compare August 22, 2024 14:25
@emersion emersion force-pushed the emr/nge-schedule branch 5 times, most recently from a7828f4 to 70a81b8 Compare September 3, 2024 08:01
@emersion emersion marked this pull request as ready for review September 3, 2024 08:05
@louisgreiner
Copy link
Contributor

It looks like changing the source arrival time for the first section also changes the departure time (caused directly by NGE times propagation).
It then schedules the start and next stop of the train schedule in OSRD.
In addition, the travel time is always 0, don't we want to play with it to adjust the differents times ?

@louisgreiner
Copy link
Contributor

isNonStopTransit sets the times at 0. It would be nice to set 2' of stopping time at this point, but since we don't deal with simulation results yet, i wonder how to deal with that :(

Before:
image

After:
image
image

@emersion
Copy link
Member Author

emersion commented Sep 4, 2024

Right, isNonStopTransit is not handled in this PR at all (left as a TODO).

Copy link
Contributor

@SharglutDev SharglutDev left a comment

Choose a reason for hiding this comment

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

Another weird thing : when creating a train with a via in NGE and asking the train to stop at this via, the output table is properly updated with the stop but not the input table.

@louisgreiner
Copy link
Contributor

image

Interacting with NGE times triggers a POST v2/trainschedule/ that leads to a 404, I think it is related with UpsertedTrainSchedules feature. Is it in the scope of that PR ? I'm not sure to understand what it does and if the error is important

@emersion
Copy link
Member Author

emersion commented Sep 6, 2024

Interacting with NGE times triggers a POST v2/trainschedule/ that leads to a 404, I think it is related with UpsertedTrainSchedules feature. Is it in the scope of that PR ? I'm not sure to understand what it does and if the error is important

I believe this bug happens without this PR as well.

Copy link
Contributor

@louisgreiner louisgreiner left a comment

Choose a reason for hiding this comment

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

Tested and LGTM. Thanks a lot for this precious feature 💯

Copy link
Contributor

@SharglutDev SharglutDev left a comment

Choose a reason for hiding this comment

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

Lgtm and tested. The input table issue will be done in a different PR.

@emersion emersion removed the request for review from theocrsb September 12, 2024 09:54
@emersion emersion added this pull request to the merge queue Sep 12, 2024
Merged via the queue into dev with commit a69f045 Sep 12, 2024
23 checks passed
@emersion emersion deleted the emr/nge-schedule branch September 12, 2024 11:02
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.

Converting times from NGE to OSRD
4 participants