Skip to content

Commit

Permalink
wns_report: list previous stage line
Browse files Browse the repository at this point in the history
Signed-off-by: Øyvind Harboe <[email protected]>
  • Loading branch information
oharboe committed Oct 29, 2024
1 parent e17a846 commit 13cda26
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions wns_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,20 @@ def read_file(variant):
)

table_data = None

def previous_stage(previous_stage):
if len(previous_stage) == 0:
return ""
stage, previous = list(previous_stage.items())[0]
return f"{stage}: {previous}"

for variant in sweep:
if table_data is None:
table_data = [
["Variant", "Description"]
+ names
+ variable_names
+ ["dissolve"]
+ ["dissolve", "previous_stage"]
+ logs
]
variables = sweep[variant].get("variables", {})
Expand All @@ -175,7 +182,10 @@ def read_file(variant):
)
for variable in variable_names
]
+ [" ".join(sweep[variant].get("dissolve", []))]
+ [
" ".join(sweep[variant].get("dissolve", [])),
previous_stage(sweep[variant].get("previous_stage", {})),
]
+ [
print_log_dir_times(os.path.join(logs_dir, variant, log))
for log in logs
Expand Down

0 comments on commit 13cda26

Please sign in to comment.