Skip to content

editoast: replace track_reference with local_track_name#14807

Merged
hamz2a merged 10 commits intodevfrom
hai/editoast-track-reference-filter
Jan 29, 2026
Merged

editoast: replace track_reference with local_track_name#14807
hamz2a merged 10 commits intodevfrom
hai/editoast-track-reference-filter

Conversation

@hamz2a
Copy link
Copy Markdown
Contributor

@hamz2a hamz2a commented Jan 20, 2026

Remove the TrackReference enum that allowed filtering by either track ID or track name. Now only filter by local_track_name directly.
This simplifies the filtering logic by moving it directly into OperationalPoint instead of having a separate filter step.

Changes:

  • Remove TrackReference enum
  • Replace track_reference field with local_track_name
  • Add track_offsets_matching_local_name method to OperationalPoint
  • Remove track_reference_filter method from PathItemCache
  • Add get_name_by_track helper method to PathItemCache
  • Update all usages across path items, pathfinding, tests, and front.

@hamz2a hamz2a requested review from a team as code owners January 20, 2026 09:09
@hamz2a hamz2a requested a review from Castavo January 20, 2026 09:09
@github-actions github-actions Bot added area:front Work on Standard OSRD Interface modules area:editoast Work on Editoast Service kind:api-change area:railway-manager-interface Work on Railway Manager Interface service labels Jan 20, 2026
@hamz2a hamz2a changed the title editoast: replace track_reference with local_track_name editoast: replace track_reference with local_track_name Jan 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ API changes

This Pull Request introduces some changes in the API:

  • please own it: notify or even prepare dedicated PR(s) to consumer projects

Changes in Schemas

Dear @hamz2a, please ensure the following:

@hamz2a hamz2a moved this to Awaiting merge in Board PI 18 Jan 20, 2026
@hamz2a hamz2a self-assigned this Jan 20, 2026
@hamz2a hamz2a requested a review from flomonster January 20, 2026 09:11
@hamz2a hamz2a force-pushed the hai/editoast-track-reference-filter branch from e70b643 to 6674fd9 Compare January 20, 2026 09:16
@hamz2a hamz2a changed the title editoast: replace track_reference with local_track_name editoast: replace track_reference with local_track_name Jan 20, 2026
@hamz2a hamz2a force-pushed the hai/editoast-track-reference-filter branch 3 times, most recently from c1ad278 to 14223d6 Compare January 20, 2026 10:26
Copy link
Copy Markdown
Member

@flomonster flomonster left a comment

Choose a reason for hiding this comment

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

Thanks for this PR, we need a migration to adapt paced trains (model + exceptions).
I will need further testing afterwards.

@flomonster flomonster mentioned this pull request Jan 20, 2026
4 tasks
Comment thread editoast/schemas/src/train_schedule/path_item.rs
Copy link
Copy Markdown
Contributor

@Khoyo Khoyo left a comment

Choose a reason for hiding this comment

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

Thanks for the clear commit message!

Comment thread editoast/schemas/src/infra/operational_point.rs Outdated
Comment thread editoast/schemas/src/infra/operational_point.rs Outdated
Comment thread editoast/src/views/path/path_item_cache.rs Outdated
Comment thread editoast/src/views/path/path_item_cache.rs Outdated
Comment thread editoast/schemas/src/infra/track_offset.rs Outdated
@hamz2a
Copy link
Copy Markdown
Contributor Author

hamz2a commented Jan 20, 2026

we need a migration to adapt paced trains (model + exceptions).
@flomonster

Done

@hamz2a hamz2a requested a review from flomonster January 20, 2026 14:57
@hamz2a hamz2a force-pushed the hai/editoast-track-reference-filter branch from e1a8d58 to 6e20b04 Compare January 20, 2026 15:03
@hamz2a hamz2a requested review from Castavo and Khoyo January 20, 2026 15:32
Copy link
Copy Markdown
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.

I'm surprised that with the inlining of NonBlankString in the openAPI we still get a LocalTrackName root model in models.py

Besides that, LGTM on models part.

Could you make sure that the changes are handled in our data pipelines too ?

Copy link
Copy Markdown
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.

Thanks for the PR !

Comment thread front/src/modules/timesStops/hooks/useTimesStopsTableData.ts Outdated
Comment thread front/src/modules/timesStops/hooks/useTimesStopsTableData.ts
Comment thread front/src/common/Map/Layers/InfraObjectLayers/OperationalPoints.tsx
@Uriel-Sautron Uriel-Sautron force-pushed the hai/editoast-track-reference-filter branch from 69d300b to 089b066 Compare January 29, 2026 08:40
@flomonster flomonster removed the request for review from Khoyo January 29, 2026 10:37
@Uriel-Sautron Uriel-Sautron force-pushed the hai/editoast-track-reference-filter branch from 089b066 to 07996a6 Compare January 29, 2026 12:08
Copy link
Copy Markdown
Contributor

@SarahBellaha SarahBellaha left a comment

Choose a reason for hiding this comment

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

Lgtm

Copy link
Copy Markdown
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 ✅

hamz2a and others added 10 commits January 29, 2026 15:38
  Remove the TrackReference enum that allowed filtering by either
  track ID or track name. Now only filter by local_track_name directly.
  This simplifies the filtering logic by moving it directly into
  OperationalPoint instead of having a separate filter step.

Signed-off-by: hamz2a <atrari.hamza@gmail.com>
Signed-off-by: hamz2a <atrari.hamza@gmail.com>
Signed-off-by: Uriel-Sautron <uriel.sautron@gmail.com>
Signed-off-by: Uriel-Sautron <uriel.sautron@gmail.com>
Signed-off-by: Uriel-Sautron <uriel.sautron@gmail.com>
Signed-off-by: Uriel-Sautron <uriel.sautron@gmail.com>
Signed-off-by: Uriel-Sautron <uriel.sautron@gmail.com>
Signed-off-by: Uriel-Sautron <uriel.sautron@gmail.com>
Signed-off-by: Uriel-Sautron <uriel.sautron@gmail.com>
Signed-off-by: Uriel-Sautron <uriel.sautron@gmail.com>
@Uriel-Sautron Uriel-Sautron force-pushed the hai/editoast-track-reference-filter branch from 07996a6 to 3da23b3 Compare January 29, 2026 14:40
@hamz2a hamz2a added this pull request to the merge queue Jan 29, 2026
Merged via the queue into dev with commit 6f8d3d2 Jan 29, 2026
30 checks passed
@hamz2a hamz2a deleted the hai/editoast-track-reference-filter branch January 29, 2026 15:32
@github-project-automation github-project-automation Bot moved this from Awaiting merge to Awaiting Validation in Board PI 18 Jan 29, 2026
@Maymanaf Maymanaf moved this from Awaiting Validation to Done in Board PI 18 Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:editoast Work on Editoast Service area:front Work on Standard OSRD Interface modules area:integration-tests Work on Integration test, by nature related to different services area:railway-manager-interface Work on Railway Manager Interface service kind:api-change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.