Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
eigerx committed Jan 23, 2024
1 parent 2943a34 commit 7b3e706
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions python/lsst/ctrl/mpexec/cli/script/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@
from lsst.pipe.base.execution_reports import QuantumGraphExecutionReport


def report(butler_config: str, qgraph_uri: str,
full_output_filename: str | None, logs: bool = True,
show_errors: bool = False) -> None:
def report(
butler_config: str,
qgraph_uri: str,
full_output_filename: str | None,
logs: bool = True,
show_errors: bool = False,
) -> None:
"""Summarize the produced and missing expected dataset in a quantum graph.
Parameters
Expand All @@ -59,12 +63,6 @@ def report(butler_config: str, qgraph_uri: str,
command-line along with the report. By default, these messages and
their associated data ids are stored in a yaml file with format
`{run timestamp}_err.yaml` in the working directory instead.
See Also
--------
lsst.pipe.base.QuantumGraphExecutionReport.make_reports
lsst.pipe.base.QuantumGraphExecutionReport.write_summary_yaml
lsst.pipe.base.TaskExecutionReport.to_summary_dict
"""
butler = Butler.from_config(butler_config, writeable=False)
qgraph = QuantumGraph.loadUri(qgraph_uri)
Expand All @@ -81,10 +79,15 @@ def report(butler_config: str, qgraph_uri: str,
dataset_table_rows.append(summary_dict[task]["outputs"][data_product])
data_products.append(data_product)

Check warning on line 80 in python/lsst/ctrl/mpexec/cli/script/report.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/ctrl/mpexec/cli/script/report.py#L79-L80

Added lines #L79 - L80 were not covered by tests

quanta_summary.append({"Task" : task, "Failed Quanta" : summary_dict[task]["failed_quanta"],
"Blocked Quanta": summary_dict[task]["n_quanta_blocked"]})
quanta_summary.append(

Check warning on line 82 in python/lsst/ctrl/mpexec/cli/script/report.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/ctrl/mpexec/cli/script/report.py#L82

Added line #L82 was not covered by tests
{
"Task": task,
"Failed Quanta": summary_dict[task]["failed_quanta"],
"Blocked Quanta": summary_dict[task]["n_quanta_blocked"],
}
)

if 'errors' in summary_dict[task].keys():
if "errors" in summary_dict[task].keys():
error_summary.append({task: summary_dict[task]["errors"]})
quanta = Table(quanta_summary)
datasets = Table(dataset_table_rows)
Expand Down

0 comments on commit 7b3e706

Please sign in to comment.