Skip to content

Commit

Permalink
Clarify and correct pipetask report --show-errors option
Browse files Browse the repository at this point in the history
  • Loading branch information
eigerx committed Mar 22, 2024
1 parent 94d7893 commit e800908
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions doc/changes/DM-43363.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix the `--show-errors` option in `pipetask report`.

Correctly pass the option to the function as a flag. Then, in testing, use the `--show-errors` option to avoid saving yaml files to disk without adequate cleanup.
11 changes: 9 additions & 2 deletions python/lsst/ctrl/mpexec/cli/cmd/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,14 @@ def update_graph_run(
@ctrlMpExecOpts.qgraph_argument()
@click.option("--full-output-filename", default="", help="Summarize report in a yaml file")
@click.option("--logs/--no-logs", default=True, help="Get butler log datasets for extra information.")
@click.option("--show-errors", default=False, help="Pretty-print a dict of errors from failed quanta.")
@click.option(
"--show-errors",
is_flag=True,
default=False,
help="Pretty-print a dict of errors from failed"
" quanta to the screen. Note: the default is to output a yaml file with error information"
" (data_ids and associated messages) to the current working directory.",
)
def report(
repo: str, qgraph: str, full_output_filename: str = "", logs: bool = True, show_errors: bool = False
) -> None:
Expand All @@ -342,4 +349,4 @@ def report(
QGRAPH is the URL to a serialized Quantum Graph file.
"""
script.report(repo, qgraph, full_output_filename, logs)
script.report(repo, qgraph, full_output_filename, logs, show_errors)
2 changes: 1 addition & 1 deletion tests/test_cliCmdReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_report(self):

result_hr = self.runner.invoke(
pipetask_cli,
["report", self.root, graph_uri, "--no-logs"],
["report", self.root, graph_uri, "--no-logs", "--show-errors"],
input="no",
)

Expand Down

0 comments on commit e800908

Please sign in to comment.