24 from lsst.daf.butler.cli.opt
import repo_argument, config_option, config_file_option, run_option
25 from lsst.daf.butler.cli.utils
import cli_handle_exception, split_commas
26 from ..opt
import instrument_option, transfer_option
27 from ...
import script
31 @repo_argument(required=
True,
32 help=
"REPO is the URI or path to the gen3 repository. Will be created if it does not already "
34 @instrument_option(required=
True,
35 help=
"The fully-qualified name of the gen3 Instrument subclass for this camera.")
36 @click.option(
"--gen2root", required=
True,
37 help=
"Root path of the gen 2 repo to be converted.")
38 @click.option(
"--skymap-name",
39 help=
"Name of the new gen3 skymap (e.g. 'discrete/ci_hsc').")
40 @click.option(
"--skymap-config",
41 help=
"Path to skymap config file defining the new gen3 skymap.")
42 @click.option(
"--calibs",
43 help=
"Path to the gen 2 calibration repo. It can be absolute or relative to gen2root.")
44 @click.option(
"--reruns", multiple=
True, callback=split_commas,
45 help=
"List of gen 2 reruns to convert.")
46 @transfer_option(help=
"Mode to use to transfer files into the new repository.")
47 @config_file_option(help=
"Path to a `ConvertRepoConfig` override to be included after the Instrument config "
48 "overrides are applied.")
50 """Convert a Butler gen 2 repository into a gen 3 repository."""
51 cli_handle_exception(script.convert, *args, **kwargs)
55 @repo_argument(required=
True)
58 @run_option(required=
True)
59 @click.option(
"-d",
"--dir",
"directory",
60 help=
"The path to the directory containing the raws to ingest.")
61 @click.option(
"-f",
"--file", help=
"The name of a file containing raws to ingest.")
63 @click.option(
"--ingest-task", default=
"lsst.obs.base.RawIngestTask", help=
"The fully qualified class name "
64 "of the ingest task to use.")
66 cli_handle_exception(script.ingestRaws, *args, **kwargs)
70 @repo_argument(required=
True)
71 @instrument_option(required=
True, help=
"The fully-qualified name of an Instrument subclass.")
73 """Add an instrument to the data repository.
75 cli_handle_exception(script.registerInstrument, *args, **kwargs)
79 @repo_argument(required=
True)
80 @instrument_option(required=
True)
81 @run_option(required=
True)
83 """Add an instrument's curated calibrations to the data repository.
85 cli_handle_exception(script.writeCuratedCalibrations, *args, **kwargs)