Skip to content

Commit

Permalink
Merge branch 'develop' into add/ci-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
pearce8 authored Nov 8, 2023
2 parents 8dfc458 + adac499 commit b3472f9
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions bin/benchpark
Original file line number Diff line number Diff line change
Expand Up @@ -96,28 +96,30 @@ def benchpark_list_handler(args):
for system in systems:
print(f"\t{system}")
else:
print(
f"Invalid benchpark list [{sublist}] - must choose [benchmarks],[systems], or leave empty"
raise ValueError(
f'Invalid benchpark list "{sublist}" - must choose [benchmarks], [systems], or leave empty'
)


def benchpark_check_benchmark(arg_str):
benchmarks = benchpark_benchmarks()
found = arg_str in benchmarks
if not found:
print(f"Invalid benchmark/experiment {arg_str} - must choose one of: ")
out_str = f'Invalid benchmark/experiment "{arg_str}" - must choose one of: '
for benchmark in benchmarks:
print(f"\t{benchmark}")
out_str += f"\n\t{benchmark}"
raise ValueError(out_str)
return found


def benchpark_check_system(arg_str):
systems = benchpark_systems()
found = arg_str in systems
if not found:
print(f"Invalid system {arg_str} - must choose one of: ")
out_str = f'Invalid system "{arg_str}" - must choose one of: '
for system in systems:
print(f"\t{system}")
out_str += f"\n\t{system}"
raise ValueError(out_str)
return found


Expand Down Expand Up @@ -192,7 +194,11 @@ def benchpark_setup_handler(args):
debug_print(f"specified system = {system}")
valid_system = benchpark_check_system(system)
if not (valid_benchmark and valid_system):
return
raise ValueError(
"Invalid benchmark/experiment and system provided: {0} {1}".format(
benchmark, system
)
)

workspace_dir = workspace_root / str(benchmark) / str(system)

Expand Down

0 comments on commit b3472f9

Please sign in to comment.