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