Skip to content

Commit

Permalink
chore: add an extra digit in scoring command and change command name
Browse files Browse the repository at this point in the history
  • Loading branch information
vcfxb committed Jul 1, 2024
1 parent 9efcc75 commit a09b627
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions hipcheck/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ pub enum FullCommands {
PrintConfig,
PrintData,
PrintCache,
PrintWeightTree,
Scoring,
}

impl From<&Commands> for FullCommands {
Expand All @@ -379,7 +379,7 @@ impl From<&Commands> for FullCommands {
Commands::Schema(args) => FullCommands::Schema(args.clone()),
Commands::Setup(args) => FullCommands::Setup(args.clone()),
Commands::Ready => FullCommands::Ready,
Commands::PrintWeightTree => FullCommands::PrintWeightTree,
Commands::Scoring => FullCommands::Scoring,
}
}
}
Expand All @@ -402,8 +402,8 @@ pub enum Commands {
Setup(SetupArgs),
/// Check if Hipcheck is ready to run.
Ready,
/// Print the tree used to weight analyses.
PrintWeightTree,
/// Print the tree used to weight analyses during scoring.
Scoring,
}

// If no subcommand matched, default to use of '-t <TYPE> <TARGET' syntax. In
Expand Down
4 changes: 2 additions & 2 deletions hipcheck/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fn main() -> ExitCode {
Some(FullCommands::PrintConfig) => cmd_print_config(config.config()),
Some(FullCommands::PrintData) => cmd_print_data(config.data()),
Some(FullCommands::PrintCache) => cmd_print_home(config.cache()),
Some(FullCommands::PrintWeightTree) => {
Some(FullCommands::Scoring) => {
return cmd_print_weights(&config)
.map(|_| ExitCode::SUCCESS)
.unwrap_or_else(|err| {
Expand Down Expand Up @@ -222,7 +222,7 @@ fn cmd_print_weights(config: &CliConfig) -> Result<()> {

// Format as percentage.
PrintNode(format!(
"{}: {:.1}%",
"{}: {:.2}%",
old_node.get().label,
weight_product * 100f64
))
Expand Down

0 comments on commit a09b627

Please sign in to comment.