Skip to content

Commit 1f79d06

Browse files
committed
Rename command
1 parent 962359d commit 1f79d06

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

src/cli.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ enum Commands {
7575
model_dir: PathBuf,
7676
},
7777
/// Build and output commodity flow graphs for a model.
78-
Graph {
78+
SaveGraphs {
7979
/// The path to the model directory.
8080
model_dir: PathBuf,
8181
/// Other options
@@ -97,7 +97,9 @@ impl Commands {
9797
Self::Run { model_dir, opts } => handle_run_command(&model_dir, &opts, None),
9898
Self::Example { subcommand } => subcommand.execute(),
9999
Self::Validate { model_dir } => handle_validate_command(&model_dir, None),
100-
Self::Graph { model_dir, opts } => handle_graph_command(&model_dir, &opts, None),
100+
Self::SaveGraphs { model_dir, opts } => {
101+
handle_save_graphs_command(&model_dir, &opts, None)
102+
}
101103
Self::Settings { subcommand } => subcommand.execute(),
102104
}
103105
}
@@ -200,8 +202,8 @@ pub fn handle_validate_command(model_path: &Path, settings: Option<Settings>) ->
200202
Ok(())
201203
}
202204

203-
/// Handle the `graph` command.
204-
pub fn handle_graph_command(
205+
/// Handle the `save-graphs` command.
206+
pub fn handle_save_graphs_command(
205207
model_path: &Path,
206208
opts: &GraphOpts,
207209
settings: Option<Settings>,

tests/graph.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Integration tests for the `graph` command.
2-
use muse2::cli::{GraphOpts, handle_graph_command};
2+
use muse2::cli::{GraphOpts, handle_save_graphs_command};
33
use muse2::log::is_logger_initialised;
44
use muse2::settings::Settings;
55
use std::path::PathBuf;
@@ -26,7 +26,7 @@ fn test_handle_graph_command() {
2626
output_dir: Some(output_dir.clone()),
2727
overwrite: false,
2828
};
29-
handle_graph_command(&get_model_dir(), &opts, Some(Settings::default())).unwrap();
29+
handle_save_graphs_command(&get_model_dir(), &opts, Some(Settings::default())).unwrap();
3030
assert!(is_logger_initialised());
3131

3232
// Check that at least one DOT file was created

0 commit comments

Comments
 (0)