Skip to content

Commit

Permalink
apply style
Browse files Browse the repository at this point in the history
  • Loading branch information
rfbgo committed Oct 22, 2024
1 parent 6449977 commit dbd9f5b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 7 additions & 3 deletions lib/ramble/ramble/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -1944,14 +1944,17 @@ def is_numeric_fom(fom):
if fom_key not in repeat_foms[context_name].keys():
repeat_foms[context_name][fom_key] = {
"fom_type": fom["fom_type"],
"fom_values": []}
"fom_values": [],
}
if is_numeric_fom(fom):
repeat_foms[context_name][fom_key]["fom_is_numeric"] = True
else:
repeat_foms[context_name][fom_key]["fom_is_numeric"] = False
fom_contents = (False, fom["value"], fom["fom_type"])
if repeat_foms[context_name][fom_key]["fom_is_numeric"]:
repeat_foms[context_name][fom_key]["fom_values"].append(float(fom["value"]))
repeat_foms[context_name][fom_key]["fom_values"].append(
float(fom["value"])
)
else:
repeat_foms[context_name][fom_key]["fom_values"].append(fom["value"])

Expand Down Expand Up @@ -2162,7 +2165,8 @@ def _analysis_dicts(self, criteria_list):
"units": conf["units"],
"origin": conf["origin"],
"origin_type": conf["origin_type"],
# FIXME: this 'to_dict' is getting something strange passed into it and I'm not sure where it came from
# FIXME: this 'to_dict' is getting something strange passed
# into it and I'm not sure where it came from
"fom_type": conf["fom_type"].to_dict(),
}
if conf["contexts"]:
Expand Down
4 changes: 3 additions & 1 deletion lib/ramble/ramble/workspace/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,9 @@ def dump_results(self, output_formats=["text"], print_results=False, summary_onl
mod = fom["origin"]
name = f"{fom['origin_type']}{delim}{mod}{delim}{name}"

output = "{} = {} {}".format(name, fom["value"], fom["units"])
output = "{} = {} {}".format(
name, fom["value"], fom["units"]
)
single_foms.append(output)

for fom_name, fom_val_list in summary_foms.items():
Expand Down

0 comments on commit dbd9f5b

Please sign in to comment.