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: add default CH code when not provided during open data import #10236

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

Conversation

SarahBellaha
Copy link
Contributor

Closes #10159

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

codecov-commenter commented Jan 6, 2025

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

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.39%. Comparing base (58d7306) to head (8bbc271).

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

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #10236      +/-   ##
==========================================
- Coverage   81.44%   81.39%   -0.05%     
==========================================
  Files        1058     1040      -18     
  Lines      104268   103481     -787     
  Branches      722      722              
==========================================
- Hits        84916    84224     -692     
+ Misses      19311    19216      -95     
  Partials       41       41              
Flag Coverage Δ
editoast 73.57% <ø> (-0.05%) ⬇️
front 89.18% <100.00%> (+<0.01%) ⬆️
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.50% <ø> (ø)
tests ?

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.

try {
const payloadSteps = {
object: 'operationalpoint',
query: ['and', stepsQuery, mainChCodeConstraint],
Copy link
Member

Choose a reason for hiding this comment

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

I think we also need to filter by infra ID here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As we retrieve information from the OP with its UIC code, which is normally unique regardless of the infra (thanks to the "country code"), i don't think it's necessary here ?

Copy link
Member

Choose a reason for hiding this comment

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

A test infra created by a random person might have a BV CH which doesn't really exist in the real infra the user is interested in.

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.

Hm, I'm not a fan of looking at the infrastructure during the import step. Right now the import is completely disconnected from the infrastructure (much like etl-basic) and that's a very good property IMHO.

@emersion
Copy link
Member

emersion commented Jan 6, 2025

FWIW, when the CH is unspecified in a path step, the backend is supposed to automatically pick BV/00.

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.

Open data import picks random CH codes instead of BV/00
3 participants