Skip to content

Commit 1ede4c6

Browse files
committed
editoast: remove train schedule endpoints and unused cli
- All train schedule related endpoints are removed - Remove a legacy cli command - Regenerate openapi and rtk files Signed-off-by: Florian Amsallem <florian.amsallem@gmail.com>
1 parent 5e1385d commit 1ede4c6

File tree

12 files changed

+24
-3153
lines changed

12 files changed

+24
-3153
lines changed

editoast/openapi.yaml

Lines changed: 23 additions & 819 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

editoast/src/client/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ pub mod runserver;
1111
pub mod search_commands;
1212
pub mod stdcm_search_env_commands;
1313
mod telemetry_config;
14-
pub mod timetables_commands;
1514
mod trains_traffic;
1615
pub mod user;
1716
mod valkey_config;
@@ -31,7 +30,6 @@ use search_commands::SearchCommands;
3130
use stdcm_search_env_commands::StdcmSearchEnvCommands;
3231
pub use telemetry_config::TelemetryConfig;
3332
pub use telemetry_config::TelemetryKind;
34-
use timetables_commands::TimetablesCommands;
3533
use user::UserCommand;
3634
pub use valkey_config::ValkeyConfig;
3735

@@ -82,8 +80,6 @@ pub enum Commands {
8280
Search(SearchCommands),
8381
#[command(subcommand, about, long_about = "Infrastructure related commands")]
8482
Infra(InfraCommands),
85-
#[command(subcommand, about, long_about = "Timetables related commands")]
86-
Timetables(TimetablesCommands),
8783
#[command(
8884
subcommand,
8985
about,

editoast/src/client/timetables_commands.rs

Lines changed: 0 additions & 172 deletions
This file was deleted.

editoast/src/main.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ use client::roles::RolesCommand;
3131
use client::runserver::runserver;
3232
use client::search_commands::*;
3333
use client::stdcm_search_env_commands::handle_stdcm_search_env_command;
34-
use client::timetables_commands::*;
3534
use client::user;
3635
use client::user::UserCommand;
3736
use common::tracing::SpanUploading;
@@ -175,10 +174,6 @@ async fn run() -> anyhow::Result<()> {
175174
}
176175
InfraCommands::ImportRailjson(args) => import_railjson(args, db_pool.into()).await,
177176
},
178-
Commands::Timetables(subcommand) => match subcommand {
179-
TimetablesCommands::Import(args) => trains_import(args, db_pool.into()).await,
180-
TimetablesCommands::Export(args) => trains_export(args, db_pool.into()).await,
181-
},
182177
Commands::STDCMSearchEnv(subcommand) => {
183178
handle_stdcm_search_env_command(subcommand, db_pool).await
184179
}

editoast/src/models/fixtures.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -205,16 +205,6 @@ pub fn simple_paced_train_changeset(timetable_id: i64) -> Changeset<models::Pace
205205
Changeset::<models::PacedTrain>::from(simple_paced_train_base()).timetable_id(timetable_id)
206206
}
207207

208-
pub async fn create_simple_train_schedule(
209-
conn: &mut DbConnection,
210-
timetable_id: i64,
211-
) -> editoast_models::TrainSchedule {
212-
simple_train_schedule_changeset(timetable_id)
213-
.create(conn)
214-
.await
215-
.expect("Failed to create train schedule")
216-
}
217-
218208
pub async fn create_simple_paced_train(
219209
conn: &mut DbConnection,
220210
timetable_id: i64,

editoast/src/tests/track_occupancy/example_pathfinding_track_occupancy.json

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)