Coverage for python/lsst/ctrl/bps/cli/bps.py: 94%

18 statements  

« prev     ^ index     » next       coverage.py v7.3.0, created at 2023-08-23 10:45 +0000

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/>. 

21"""Definition of Batch Production Service command-line interface. 

22""" 

23import click 

24from lsst.daf.butler.cli.butler import LoaderCLI 

25from lsst.daf.butler.cli.opt import ( 

26 log_file_option, 

27 log_label_option, 

28 log_level_option, 

29 log_tty_option, 

30 long_log_option, 

31) 

32from lsst.daf.butler.cli.utils import unwrap 

33 

34epilog = unwrap( 

35 """Note: 

36 

37Commands 'acquire', 'cluster', 'transform', and 'prepare' halt the submission 

38process at different points prior to submitting the workflow for execution. See 

39the help for individual command for more details. 

40 

41However, the current version does not support starting the submission process 

42from any of these intermediate points. 

43""" 

44) 

45 

46 

47class BpsCli(LoaderCLI): 

48 """Specialized command loader implementing the ``bps`` command.""" 

49 

50 localCmdPkg = "lsst.ctrl.bps.cli.cmd" 

51 

52 

53@click.command(cls=BpsCli, context_settings={"help_option_names": ["-h", "--help"]}, epilog=epilog) 

54@log_level_option(default=["INFO"]) 

55@long_log_option() 

56@log_file_option() 

57@log_tty_option() 

58@log_label_option() 

59def cli(log_level, long_log, log_file, log_tty, log_label): 

60 """Command line interface for BPS.""" 

61 pass 

62 

63 

64def main(): 

65 """Return main entry point for command-line.""" 

66 return cli()