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

Merged
merged 1 commit into from
Feb 4, 2025

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 81.85%. Comparing base (9ddc06c) to head (6021ad9).
Report is 156 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%   81.85%   +0.24%     
==========================================
  Files        1067     1075       +8     
  Lines      105535   107173    +1638     
  Branches      727      728       +1     
==========================================
+ Hits        86128    87724    +1596     
- Misses      19366    19410      +44     
+ Partials       41       39       -2     
Flag Coverage Δ
editoast 74.24% <ø> (+0.55%) ⬆️
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
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.

Thanks, looks good!

(For next time: ideally the usePathFinding change should be in its own separate commit :P )

@achrafmohye achrafmohye added this pull request to the merge queue Feb 4, 2025
Merged via the queue into dev with commit 78ce3c9 Feb 4, 2025
27 checks passed
@achrafmohye achrafmohye deleted the ame/fix/handle-unrecognized-uic branch February 4, 2025 13:20
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