Skip to content

Commit

Permalink
clean up command line usage help
Browse files Browse the repository at this point in the history
  • Loading branch information
cwensel committed Nov 8, 2023
1 parent 43c86ec commit f53cd8a
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@
import java.util.LinkedList;
import java.util.List;

@CommandLine.Command(
name = "status",
description = "Show the status of the current target."
)
public class ArcStatusCommandOption extends CommonCommandOptions {
@CommandLine.Mixin
ArcReportOptions arcReportOptions = new ArcReportOptions();

@CommandLine.Mixin
@CommandLine.ArgGroup(
exclusive = false,
multiplicity = "1",
heading = "Time Range Options:%n"
)
RangeOptions rangeOptions = new RangeOptions();

@CommandLine.Option(
names = {"--name"},
description = "Filter results by the name of the target to show."
description = "Filter results by the name of the arc."
)
List<String> names = new LinkedList<>();

@CommandLine.Option(names = {"--list"}, description = {"List all arc instances"})
@CommandLine.Option(names = {"--list"}, description = {"List all arc instances instead of summarizing."})
boolean list = false;

public ArcStatusCommandOption setNames(List<String> names) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@
import java.util.LinkedList;
import java.util.List;

@CommandLine.Command(
name = "status",
description = "Show the status of the current target."
)
public class DatasetStatusCommandOption extends CommonCommandOptions {
@CommandLine.Mixin
DatasetReportOptions datasetReportOptions = new DatasetReportOptions();

@CommandLine.Mixin
@CommandLine.ArgGroup(
exclusive = false,
multiplicity = "1",
heading = "Time Range Options:%n"
)
RangeOptions rangeOptions = new RangeOptions();

@CommandLine.Option(
names = {"--name"},
description = "Filter results by the name of the target to show."
description = "Filter results by the name of the dataset."
)
List<String> names = new LinkedList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ public class RangeOptions {
@CommandLine.Option(
names = {"--earliest"},
description = {
"Earliest time to include in report.",
"Earliest time to include in report, inclusive.",
"Where the time can be most any date/time format, or",
"an adjuster such as '1h' or '1d'.",
"(default: ${DEFAULT-VALUE})"
},
converter = MomentTypeConverter.class,
Expand All @@ -26,7 +28,9 @@ public class RangeOptions {
@CommandLine.Option(
names = {"--latest"},
description = {
"Latest time to include in report.",
"Latest time to include in report, exclusive.",
"Where the time can be most any date/time format, or",
"an adjuster such as '1h' or '1d'.",
"(default: ${DEFAULT-VALUE})"
},
converter = MomentTypeConverter.class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@ public ArcsCommand() {

@CommandLine.Command(
name = "status",
description = "Show the status of the current target."
description = {
"Show a summary of deployed arcs status (within the time range).",
"Where status is one of:",
" - running: workload is in process",
" - complete: workload finished successfully",
" - partial: workload finished but some data is missing",
" - missing: no data, possibly due to error, or missing upstream data",
"The --list option will output all arc instances instead of summarizing."
}
)
public static class ArcStatusCommand implements Callable<Integer> {
@CommandLine.ParentCommand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@ public DatasetsCommand() {

@CommandLine.Command(
name = "status",
description = "Show the status of the current target."
description = {
"Show a summary of deployed dataset manifest status (within the time range).",
"Where status is one of:",
" - complete: manifest is complete",
" - partial: manifest exists, but some data is missing",
" - empty: manifest has no data, possibly due to error, or missing upstream data",
" - removed: the manifest and its data has been removed",
"The --list option will output all manifest instances instead of summarizing."
}
)
public static class DatasetStatusCommand implements Callable<Integer> {
@CommandLine.ParentCommand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

@CommandLine.Command(
name = "placements",
description = "List all visible placements with deployments."
description = "List all placements with deployments."
)
public class PlacementsCommand extends CommandWrapper<PlacementsCommandOptions> {
public PlacementsCommand() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
import java.util.stream.Stream;

@CommandLine.Command(
name = "status",
description = "List the status of all arcs in the range."
name = "status"
)
public class ArcStatus implements Callable<Integer> {
@CommandLine.ParentCommand
Expand Down

0 comments on commit f53cd8a

Please sign in to comment.