Coverage for python/lsst/ctrl/bps/cli/cmd/commands.py : 81%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# This file is part of ctrl_bps.
2#
3# Developed for the LSST Data Management System.
4# This product includes software developed by the LSST Project
5# (https://www.lsst.org).
6# See the COPYRIGHT file at the top-level directory of this distribution
7# for details of code ownership.
8#
9# This program is free software: you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation, either version 3 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program. If not, see <https://www.gnu.org/licenses/>.
21import click
22from lsst.daf.butler.cli.opt import log_level_option
23from lsst.daf.butler.cli.utils import cli_handle_exception
24from .. import opt
25from .. import script
28@click.command()
29@opt.config_file_argument(required=True)
30@log_level_option()
31def transform(*args, **kwargs):
32 """Transform a quantum graph to a workflow graph.
33 """
34 raise NotImplementedError
37@click.command()
38@opt.config_file_argument(required=True)
39@log_level_option()
40def prepare(*args, **kwargs):
41 """Prepare a workflow for submission.
42 """
43 cli_handle_exception(script.prepare, *args, **kwargs)
46@click.command()
47@opt.config_file_argument(required=True)
48@log_level_option()
49def submit(*args, **kwargs):
50 """Submit a workflow for execution.
51 """
52 config, workflow = cli_handle_exception(script.prepare, *args, **kwargs)
53 cli_handle_exception(script.submit, config=config, workflow=workflow,
54 **kwargs)
57@click.command()
58@log_level_option()
59@click.option("--wms", "wms_service",
60 default="lsst.ctrl.bps.wms.htcondor.htcondor_service.HTCondorService",
61 help="Workload Management System service class")
62@click.option("--user",
63 help="Restrict report to specific user.")
64@click.option("--id", "run_id",
65 help="Restrict report to specific WMS run id.")
66@click.option("--hist", "hist_days",
67 default=0.0,
68 help="Search WMS history X days for completed info.")
69@click.option("--pass-thru",
70 help="Pass the given string to the WMS service class")
71def report(*args, **kwargs):
72 """Display execution status for submitted workflows.
73 """
74 cli_handle_exception(script.report, *args, **kwargs)