Skip to content

Commit 500a7e8

Browse files
Merge pull request #1016 from rfbgo/infovariants
Allow workspace info to print variants
2 parents 9910b69 + 4fd560d commit 500a7e8

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lib/ramble/ramble/cmd/workspace.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,10 @@ def workspace_info_setup_parser(subparser):
649649
"--phases", action="store_true", help="If set, phase information will be printed"
650650
)
651651

652+
subparser.add_argument(
653+
"--variants", action="store_true", help="If set, experiment variants will be printed"
654+
)
655+
652656
arguments.add_common_arguments(subparser, ["where", "exclude_where", "filter_tags"])
653657

654658
subparser.add_argument(
@@ -658,7 +662,7 @@ def workspace_info_setup_parser(subparser):
658662
default=0,
659663
help="level of verbosity. Add flags to "
660664
+ "increase description of workspace\n"
661-
+ "level 1 enables software, tags, and templates\n"
665+
+ "level 1 enables software, tags, templates, and variants\n"
662666
+ "level 2 enables expansions and phases\n",
663667
)
664668

@@ -671,6 +675,7 @@ def workspace_info(args):
671675
args.software = True
672676
args.tags = True
673677
args.templates = True
678+
args.variants = True
674679

675680
if args.verbose >= 2:
676681
args.expansions = True
@@ -802,6 +807,11 @@ def workspace_info(args):
802807
if args.tags:
803808
color.cprint(" Experiment Tags: " + str(app_inst.experiment_tags))
804809

810+
if args.variants:
811+
color.cprint(rucolor.nested_4(" Variants: "))
812+
for key, value in app_inst.variants.items():
813+
color.cprint(f" {key}: {value}")
814+
805815
if args.expansions:
806816
var_groups = [
807817
config_vars,

share/ramble/ramble-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ _ramble_workspace_push_to_cache() {
679679
}
680680

681681
_ramble_workspace_info() {
682-
RAMBLE_COMPREPLY="-h --help --software --all-software --templates --expansions --tags --phases --where --exclude-where --filter-tags -v --verbose"
682+
RAMBLE_COMPREPLY="-h --help --software --all-software --templates --expansions --tags --phases --variants --where --exclude-where --filter-tags -v --verbose"
683683
}
684684

685685
_ramble_workspace_edit() {

0 commit comments

Comments
 (0)