diff --git a/python/lsst/ctrl/mpexec/cli/cmd/commands.py b/python/lsst/ctrl/mpexec/cli/cmd/commands.py index 423492c5..279352f1 100644 --- a/python/lsst/ctrl/mpexec/cli/cmd/commands.py +++ b/python/lsst/ctrl/mpexec/cli/cmd/commands.py @@ -327,16 +327,18 @@ def update_graph_run( @click.command(cls=PipetaskCommand) +@repo_argument() @ctrlMpExecOpts.qgraph_argument() -@ctrlMpExecOpts.butler_config_option() @click.argument("output_yaml", type=click.Path(exists=False)) @click.option("--logs/--no-logs", default=True, help="Get butler log datasets for extra information.") -def report(qgraph: str, butler_config: str, output_yaml: str, logs: bool = True) -> None: +def report(repo: str, qgraph: str, output_yaml: str, logs: bool = True) -> None: """Write a yaml file summarizing the produced and missing expected datasets in a quantum graph. + REPO is the location of the butler/registry config file. + QGRAPH is the URL to a serialized Quantum Graph file. OUTPUT_YAML is the URL to store the summary report. """ - script.report(qgraph, butler_config, output_yaml, logs) + script.report(repo, qgraph, output_yaml, logs) diff --git a/python/lsst/ctrl/mpexec/cli/script/report.py b/python/lsst/ctrl/mpexec/cli/script/report.py index b824dea0..81e2a799 100644 --- a/python/lsst/ctrl/mpexec/cli/script/report.py +++ b/python/lsst/ctrl/mpexec/cli/script/report.py @@ -30,7 +30,7 @@ from lsst.pipe.base.execution_reports import QuantumGraphExecutionReport -def report(qgraph_uri: str, butler_config: str, output_yaml: str, logs: bool = True) -> None: +def report(butler_config: str, qgraph_uri: str, output_yaml: str, logs: bool = True) -> None: """Write a yaml file summarizing the produced and missing expected datasets in a quantum graph. @@ -51,7 +51,7 @@ def report(qgraph_uri: str, butler_config: str, output_yaml: str, logs: bool = T lsst.pipe.base.QuantumGraphExecutionReport.make_reports lsst.pipe.base.QuantumGraphExecutionReport.write_summary_yaml """ - qgraph = QuantumGraph.loadUri(qgraph_uri) butler = Butler(butler_config) + qgraph = QuantumGraph.loadUri(qgraph_uri) report = QuantumGraphExecutionReport.make_reports(butler, qgraph) report.write_summary_yaml(butler, output_yaml, logs=logs) diff --git a/tests/test_cliCmdReport.py b/tests/test_cliCmdReport.py index c0fd63c8..ab26dd21 100644 --- a/tests/test_cliCmdReport.py +++ b/tests/test_cliCmdReport.py @@ -71,7 +71,7 @@ def test_report(self): result = self.runner.invoke( pipetask_cli, - ["report", graph_uri, "-b", self.root, test_filename, "--no-logs"], + ["report", self.root, graph_uri, test_filename, "--no-logs"], input="no", )