Skip to content

Commit

Permalink
Show number of expected quanta in pipetask report
Browse files Browse the repository at this point in the history
  • Loading branch information
eigerx committed Jun 15, 2024
1 parent f1e75d8 commit cc4a59f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
12 changes: 8 additions & 4 deletions python/lsst/ctrl/mpexec/cli/script/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,20 @@ def report(
quanta_summary.append(
{
"Task": task,
"Failed Quanta": len(summary_dict[task]["failed_quanta"]),
"Blocked Quanta": summary_dict[task]["n_quanta_blocked"],
"Failed": len(summary_dict[task]["failed_quanta"]),
"Blocked": summary_dict[task]["n_quanta_blocked"],
"Succeeded": summary_dict[task]["n_succeeded"],
"Expected": summary_dict[task]["n_expected"]
}
)
else:
quanta_summary.append(
{
"Task": task,
"Failed Quanta": summary_dict[task]["failed_quanta"],
"Blocked Quanta": summary_dict[task]["n_quanta_blocked"],
"Failed": summary_dict[task]["failed_quanta"],
"Blocked": summary_dict[task]["n_quanta_blocked"],
"Succeeded": summary_dict[task]["n_succeeded"],
"Expected": summary_dict[task]["n_expected"]
}
)
if "errors" in summary_dict[task].keys():
Expand Down
6 changes: 5 additions & 1 deletion tests/test_cliCmdReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def test_report(self):
report_output_dict = yaml.load(f, Loader=SafeLoader)
self.assertIsNotNone(report_output_dict["task0"])
self.assertIsNotNone(report_output_dict["task0"]["failed_quanta"])
self.assertIsInstance(report_output_dict["task0"]["n_expected"], int)

result_hr = self.runner.invoke(
pipetask_cli,
Expand All @@ -97,7 +98,10 @@ def test_report(self):

# Check that task0 and the failed quanta for task0 exist in the string
self.assertIn("task0", result_hr.stdout)
self.assertIn("Failed Quanta", result_hr.stdout)
self.assertIn("Failed", result_hr.stdout)
self.assertIn("Expected", result_hr.stdout)
self.assertIn("Succeeded", result_hr.stdout)



if __name__ == "__main__":

Check failure on line 107 in tests/test_cliCmdReport.py

View workflow job for this annotation

GitHub Actions / call-workflow / lint

E303

too many blank lines (3)
Expand Down

0 comments on commit cc4a59f

Please sign in to comment.