Skip to content

Commit

Permalink
Fix argument and init for v2
Browse files Browse the repository at this point in the history
  • Loading branch information
eigerx committed Jun 27, 2024
1 parent 8dae196 commit a6c4f8d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions python/lsst/ctrl/mpexec/cli/cmd/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def update_graph_run(

@click.command(cls=PipetaskCommand)
@repo_argument()
@click.argument()
@click.argument("qgraphs", nargs=-1)
@click.option("--collections", default=None, help="Collections to resolve duplicate datasets in.")
@click.option("--where", default="", help="where")
@click.option("--full-output-filename", default="", help="Output report as a yaml file with this name.")
Expand Down Expand Up @@ -389,4 +389,5 @@ def report(
repo, qgraphs, collections, where, full_output_filename, logs, show_errors, curse_failed_logs
)
else:
script.report(repo, qgraphs, full_output_filename, logs, show_errors)
assert(len(qgraphs) == 1, "Cannot make a report without a quantum graph.")

Check failure on line 392 in python/lsst/ctrl/mpexec/cli/cmd/commands.py

View workflow job for this annotation

GitHub Actions / call-workflow / lint

F631

assertion is always true, perhaps remove parentheses?

Check failure on line 392 in python/lsst/ctrl/mpexec/cli/cmd/commands.py

View workflow job for this annotation

GitHub Actions / call-workflow / lint

E275

missing whitespace after keyword
script.report(repo, qgraphs[0], full_output_filename, logs, show_errors)
2 changes: 1 addition & 1 deletion python/lsst/ctrl/mpexec/cli/script/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from .pre_exec_init_qbb import pre_exec_init_qbb
from .purge import PurgeResult, purge
from .qgraph import qgraph
from .report import report
from .report import report, report_v2
from .run import run
from .run_qbb import run_qbb
from .update_graph_run import update_graph_run
2 changes: 1 addition & 1 deletion python/lsst/ctrl/mpexec/cli/script/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def report_v2(
qpg.resolve_duplicates(butler, collections=collections, where=where, curse_failed_logs=curse_failed_logs)
summary = qpg.to_summary(butler, do_store_logs=logs)
summary_dict = summary.model_dump()

Check warning on line 145 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#L142-L145

Added lines #L142 - L145 were not covered by tests
if full_output_filename is not None:
if full_output_filename:
with open(full_output_filename, "w") as stream:
yaml.safe_dump(summary_dict, stream)

Check warning on line 148 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#L148

Added line #L148 was not covered by tests
elif not full_output_filename:
Expand Down

0 comments on commit a6c4f8d

Please sign in to comment.