Skip to content

feature: new train schedules exceptions#15653

Draft
Wadjetz wants to merge 20 commits intodevfrom
features/train-schedule-exceptions
Draft

feature: new train schedules exceptions#15653
Wadjetz wants to merge 20 commits intodevfrom
features/train-schedule-exceptions

Conversation

@Wadjetz
Copy link
Copy Markdown
Member

@Wadjetz Wadjetz commented Mar 10, 2026

@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 Mar 10, 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 @Wadjetz, please ensure the following:

@theocrsb theocrsb force-pushed the features/train-schedule-exceptions branch from 2289ec9 to 560eb50 Compare March 10, 2026 12:28
@younesschrifi younesschrifi force-pushed the features/train-schedule-exceptions branch from 560eb50 to 536a949 Compare March 11, 2026 08:44
@github-actions github-actions bot added the area:integration-tests Work on Integration test, by nature related to different services label Mar 11, 2026
@Wadjetz Wadjetz force-pushed the features/train-schedule-exceptions branch from 0f5158e to 536a949 Compare March 11, 2026 10:36
@github-actions github-actions bot removed the area:integration-tests Work on Integration test, by nature related to different services label Mar 11, 2026
@Wadjetz Wadjetz force-pushed the features/train-schedule-exceptions branch 2 times, most recently from 8000ceb to a4f9a1f Compare March 16, 2026 12:59
@younesschrifi younesschrifi force-pushed the features/train-schedule-exceptions branch from a4f9a1f to 23b0218 Compare March 17, 2026 09:28
@theocrsb theocrsb force-pushed the features/train-schedule-exceptions branch 2 times, most recently from ca988aa to 33cc939 Compare March 18, 2026 08:20
@Wadjetz Wadjetz force-pushed the features/train-schedule-exceptions branch from 33cc939 to c35b312 Compare March 19, 2026 09:02
@Wadjetz Wadjetz moved this to In Progress in Board PI 19 Mar 19, 2026
@Wadjetz Wadjetz removed this from Board PI 19 Mar 19, 2026
@theocrsb theocrsb force-pushed the features/train-schedule-exceptions branch 2 times, most recently from 5fcded2 to 2cca888 Compare March 23, 2026 07:16
@github-actions github-actions bot added the area:integration-tests Work on Integration test, by nature related to different services label Mar 23, 2026
Wadjetz added a commit that referenced this pull request Mar 24, 2026
Part of #15653

This PR adapt the `GET /train_schedules/{id}/simulation` with new
exceptions
Rename query string to exception_id
Fix tests and frontend

> [!NOTE]
> This PR targets a feature branch and may contain all its commits, as
it has not been rebased yet. Only the last commit need to be reviewed.

Signed-off-by: Egor <egor@berezify.fr>
@younesschrifi younesschrifi force-pushed the features/train-schedule-exceptions branch from a70aa80 to 463cc1d Compare March 26, 2026 13:39
@theocrsb theocrsb force-pushed the features/train-schedule-exceptions branch from 463cc1d to 229b162 Compare March 26, 2026 15:20
theocrsb pushed a commit that referenced this pull request Mar 26, 2026
Part of #15653

This PR adapt the `GET /train_schedules/{id}/simulation` with new
exceptions
Rename query string to exception_id
Fix tests and frontend

> [!NOTE]
> This PR targets a feature branch and may contain all its commits, as
it has not been rebased yet. Only the last commit need to be reviewed.

Signed-off-by: Egor <egor@berezify.fr>
@theocrsb theocrsb force-pushed the features/train-schedule-exceptions branch from 6076314 to c84a410 Compare March 30, 2026 09:33
theocrsb pushed a commit that referenced this pull request Mar 30, 2026
Part of #15653

This PR adapt the `GET /train_schedules/{id}/simulation` with new
exceptions
Rename query string to exception_id
Fix tests and frontend

> [!NOTE]
> This PR targets a feature branch and may contain all its commits, as
it has not been rebased yet. Only the last commit need to be reviewed.

Signed-off-by: Egor <egor@berezify.fr>
@younesschrifi younesschrifi force-pushed the features/train-schedule-exceptions branch from b7e4444 to 302e525 Compare March 30, 2026 22:49
Wadjetz and others added 19 commits March 31, 2026 21:32
fix #15428

This PR adapts the `GET /timetable/{id}/train_schedules` endpoint to
retrieve the new exceptions.

To reduce the amount of refactoring, we convert the new exceptions into
the old ones; later, we will replace them entirely.

This PR targets a feature branch and breaks e2e tests. We will fix the
tests later (normally, they should fix themselves when we complete the
refactoring).

Signed-off-by: Egor <egor@berezify.fr>
This PR add apply_train_schedule_exception function to compute
train_occurrence from new exception

Signed-off-by: Egor <egor@berezify.fr>
Signed-off-by: theocrsb <theo_crosbie@yahoo.fr>
Signed-off-by: theocrsb <theo_crosbie@yahoo.fr>
Signed-off-by: theocrsb <theo_crosbie@yahoo.fr>
Add `iter_occurrences_v2` and `get_created_occurrences_exceptions_v2`
functions that use the new exceptions

It used in endpoints, like conflicts, requirements and others

Signed-off-by: Egor <egor@berezify.fr>
…15797)

This PR add a small utility function to retrieve exceptions by ids and
timetable useful for multiple endpoints

Signed-off-by: Egor <egor@berezify.fr>
Part of #15202

This PR adapt the `/train_schedules/{id}/etcs_braking_curves` to use the
new exception table
Rename the query string to `exception_id`
Fix frontend

> [!NOTE]
> This PR targets a feature branch and may contain all its commits, as
it has not been rebased yet. Only the last commit need to be reviewed.

Signed-off-by: Egor <egor@berezify.fr>
closes #15209

This PR updates the import logic to move exceptions from
paced.exceptions into the new dedicated exceptions table.
Instead of being included in the TrainSchedule payload, exceptions are
now created separately via the exceptions endpoint.

Signed-off-by: theocrsb <theo_crosbie@yahoo.fr>
…ble (#15690)

fix #15593
part of #15202

adapt `GET /train_schedule/{id}/path` endpoint with new exceptions with
incremental refactoring to be able to have small PR and adapt endpoints
one by one

- [x] Use exception id in query string
- [x] Adapts tests to use new exceptions

> [!NOTE]
> This PR targets a feature branch and may contain all its commits, as
it has not been rebased yet. Only the last commit need to be reviewed.

Signed-off-by: Egor <egor@berezify.fr>
Part of #15653

This PR adapt the `GET /train_schedules/{id}/simulation` with new
exceptions
Rename query string to exception_id
Fix tests and frontend

> [!NOTE]
> This PR targets a feature branch and may contain all its commits, as
it has not been rebased yet. Only the last commit need to be reviewed.

Signed-off-by: Egor <egor@berezify.fr>
part of #15202

This PR adapt `GET /timetable/{id}/conflicts` with new exceptions

Fix tests: exceptions must now be created through the
timetable/{id}/train_schedule_exceptions endpoint

> [!NOTE]
> This PR targets a feature branch and may contain all its commits, as
it has not been rebased yet. Only the last commit need to be reviewed.

Signed-off-by: Egor <egor@berezify.fr>
Part of #15202

This PR adapt the `/train_schedules/track_occupancy`endpoint to use the
new exceptions table
It also requires the timetable_id as a parameter, as exceptions are now
related to a timetable and not just to a train schedule
Fix tests and frontend

> [!NOTE]
> This PR targets a feature branch and may contain all its commits, as
it has not been rebased yet. Only the last commit need to be reviewed.

Signed-off-by: Egor <egor@berezify.fr>
fix #15592
part of #15202

Adapt GET /paced_train/simulation_summary endpoint with new exceptions

Add timetable_id parameter to the simulation summary endpoint, because
exceptions are now linked to a timetable
Fix tests and frontend

> [!NOTE]
> This PR targets a feature branch and may contain all its commits, as
it has not been rebased yet. Only the last commit need to be reviewed.

Signed-off-by: Egor <egor@berezify.fr>
Signed-off-by: Youness CHRIFI ALAOUI <youness.chrifi@gmail.com>
…#15930)

Part of #15202

This PR adapt the `/level_crossing_occupancy`endpoint to use the new
exceptions table
It also requires the timetable_id as a parameter, as exceptions are now
related to a timetable and not just to a train schedule

> [!NOTE]
> This PR targets a feature branch and may contain all its commits, as
it has not been rebased yet. Only the last commit need to be reviewed.

Signed-off-by: Egor <egor@berezify.fr>
Part of #15202

This PR adapt the `/train_schedules/occupancy_blocks`endpoint to use the
new exceptions table
It also requires the timetable_id as a parameter, as exceptions are now
related to a timetable and not just to a train schedule
Rename exception_key into exception_id
Fix tests and frontend

> [!NOTE]
> This PR targets a feature branch and may contain all its commits, as
it has not been rebased yet. Only the last commit need to be reviewed.

Signed-off-by: Egor <egor@berezify.fr>
@theocrsb theocrsb force-pushed the features/train-schedule-exceptions branch from 302e525 to 1c564a5 Compare March 31, 2026 19:33
Signed-off-by: Youness CHRIFI ALAOUI <youness.chrifi@gmail.com>
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

None yet

Development

Successfully merging this pull request may close these issues.

3 participants