Coverage for python/lsst/ctrl/mpexec/cli/script/pre_exec_init_qbb.py: 43%
7 statements
« prev ^ index » next coverage.py v7.2.3, created at 2023-04-20 10:50 +0000
« prev ^ index » next coverage.py v7.2.3, created at 2023-04-20 10:50 +0000
1# This file is part of ctrl_mpexec.
2#
3# Developed for the LSST Data Management System.
4# This product includes software developed by the LSST Project
5# (http://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 <http://www.gnu.org/licenses/>.
22from types import SimpleNamespace
24from ... import CmdLineFwk, TaskFactory
27def pre_exec_init_qbb(
28 butler_config: str,
29 qgraph: str,
30 qgraph_id: str | None,
31 config_search_path: list[str] | None,
32) -> None:
33 """Implements the command line interface `pipetask pre-exec-init-qbb`
34 subcommand, should only be called by command line tools and unit test code
35 that tests this function.
37 Parameters
38 ----------
39 butler_config : `str`
40 The path location of the gen3 butler/registry config file.
41 qgraph : `str`
42 URI location for a serialized quantum graph definition.
43 qgraph_id : `str` or `None`
44 Quantum graph identifier, if specified must match the identifier of the
45 graph loaded from a file. Ignored if graph is not loaded from a file.
46 config_search_path : `list` [`str`]
47 Additional search paths for butler configuration.
48 """
49 args = SimpleNamespace(
50 butler_config=butler_config,
51 qgraph=qgraph,
52 qgraph_id=qgraph_id,
53 config_search_path=config_search_path,
54 )
56 f = CmdLineFwk()
57 task_factory = TaskFactory()
58 f.preExecInitQBB(task_factory, args)