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

Handle both invalid trigrams and uics as invalid op #10471

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

achrafmohye
Copy link
Contributor

Closes #10116

@achrafmohye achrafmohye requested a review from a team as a code owner January 21, 2025 09:26
@github-actions github-actions bot added the area:front Work on Standard OSRD Interface modules label Jan 21, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 21, 2025

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

Codecov Report

Attention: Patch coverage is 0% with 20 lines in your changes missing coverage. Please review.

Project coverage is 82.06%. Comparing base (9ddc06c) to head (6021ad9).
Report is 121 commits behind head on dev.

Files with missing lines Patch % Lines
...alStudies/hooks/useSetupItineraryForTrainUpdate.ts 0.00% 16 Missing ⚠️
...nt/src/modules/pathfinding/hooks/usePathfinding.ts 0.00% 4 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #10471      +/-   ##
==========================================
+ Coverage   81.61%   82.06%   +0.45%     
==========================================
  Files        1067      787     -280     
  Lines      105535    78205   -27330     
  Branches      727      728       +1     
==========================================
- Hits        86128    64182   -21946     
+ Misses      19366    13984    -5382     
+ Partials       41       39       -2     
Flag Coverage Δ
editoast ?
front 89.38% <0.00%> (+0.08%) ⬆️
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.50% <ø> (ø)
tests 88.14% <ø> (+1.09%) ⬆️

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.

@achrafmohye achrafmohye changed the title front: handle both invalid trigrams and uics as invalid op Handle both invalid trigrams and uics as invalid op Jan 22, 2025
Copy link
Contributor

@Akctarus Akctarus left a comment

Choose a reason for hiding this comment

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

Tested, ty for this fix

Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

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

Placeholder comment, just so that GitHub gets this PR off my TODO list :P

See the discussion above.

@achrafmohye achrafmohye force-pushed the ame/fix/handle-unrecognized-uic branch from 21f9f27 to 37a6c2f Compare January 23, 2025 13:41
Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

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

The new logic looks good!

It seems like the usePathfinding() hook has a similar bug: handleInvalidPathItems() there checks trigrams only. There is a TODO:

// TODO: we currently only handle invalid pathSteps with trigram. We will have to do it for trackOffset, opId and uic too.

Are you feeling up for adding a new commit to fix that bug and do something similar to the logic in this PR, or do you prefer to leave that for later?

@achrafmohye achrafmohye enabled auto-merge January 24, 2025 10:27
@achrafmohye achrafmohye force-pushed the ame/fix/handle-unrecognized-uic branch from 8c32833 to 6021ad9 Compare January 29, 2025 16:26
@achrafmohye achrafmohye requested a review from emersion January 29, 2025 16:27
@achrafmohye achrafmohye disabled auto-merge January 29, 2025 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:front Work on Standard OSRD Interface modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UIC are not handled when not recognized in the infrastructure
4 participants