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

core: fallback for speed limit tags #7903

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

bougue-pe
Copy link
Contributor

@bougue-pe bougue-pe commented Jul 1, 2024

Only handling the speed for now, no work on output, warnings and logs.
Extra-code to handle long-names currently used on speedLimitTag (both in infra or in requested simu).

also: little fix on Speed.toString()

Test:

  • ✅ hand-tested locally that fallback works (for long-names) on small-infra: adding a speed section on Messagerie - ME100 somewhere else than South-East(to be able to select it), then using that speedLimitTag on a train to trigger fallback to MA100 on South-East.

Fix #7715

@bougue-pe bougue-pe requested a review from Castavo July 1, 2024 13:55
@bougue-pe bougue-pe requested a review from a team as a code owner July 1, 2024 13:55
@bougue-pe bougue-pe requested a review from eckter July 1, 2024 13:55
@codecov-commenter
Copy link

codecov-commenter commented Jul 1, 2024

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

Codecov Report

Attention: Patch coverage is 80.76923% with 15 lines in your changes missing coverage. Please review.

Project coverage is 28.43%. Comparing base (66dce06) to head (b907320).
Report is 81 commits behind head on dev.

Files Patch % Lines
.../src/main/kotlin/fr/sncf/osrd/RawInfraRJSParser.kt 74.07% 4 Missing and 3 partials ⚠️
...kotlin/fr/sncf/osrd/sim_infra/impl/RawInfraImpl.kt 84.78% 1 Missing and 6 partials ⚠️
.../src/main/kotlin/fr/sncf/osrd/utils/units/Speed.kt 0.00% 1 Missing ⚠️

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

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #7903      +/-   ##
============================================
- Coverage     28.67%   28.43%   -0.24%     
- Complexity     2058     2075      +17     
============================================
  Files          1249     1264      +15     
  Lines        154405   155174     +769     
  Branches       3040     3073      +33     
============================================
- Hits          44271    44123     -148     
- Misses       108321   109222     +901     
- Partials       1813     1829      +16     
Flag Coverage Δ
core 75.04% <80.76%> (+0.03%) ⬆️
editoast 71.56% <ø> (-0.37%) ⬇️
front 9.99% <ø> (-0.03%) ⬇️
gateway 2.34% <ø> (-0.07%) ⬇️
railjson_generator 87.49% <ø> (ø)
tests 72.93% <ø> (ø)

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

@Castavo Castavo left a comment

Choose a reason for hiding this comment

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

Cool
Don't we want to check whether tags inside a fallback list are present inside the config file ?

@bougue-pe bougue-pe requested review from Erashin and Castavo July 3, 2024 14:30
@bougue-pe bougue-pe force-pushed the peb/core/speed_limit_tag_fallback branch from 8c7694d to b907320 Compare July 4, 2024 07:57
@bougue-pe bougue-pe removed the request for review from eckter July 4, 2024 08:16
Copy link
Contributor

@Castavo Castavo left a comment

Choose a reason for hiding this comment

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

LGTM
Did not test though

also: little fix on Speed.toString()
@bougue-pe bougue-pe force-pushed the peb/core/speed_limit_tag_fallback branch from b907320 to 6919758 Compare July 4, 2024 13:12
@bougue-pe bougue-pe added this pull request to the merge queue Jul 4, 2024
Merged via the queue into dev with commit 64756fc Jul 4, 2024
17 checks passed
@bougue-pe bougue-pe deleted the peb/core/speed_limit_tag_fallback branch July 4, 2024 13:33
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.

Speed-limit tag fallback in simulation
4 participants