DirectButlerRepo#
- class lsst.pipe.base.tests.mocks.DirectButlerRepo(butler: Butler, *args: str | ResourcePath, input_run: str = 'input_run', input_chain: str = 'input_chain', use_import_collections_as_input: bool | str | Iterable[str] = True, data_root: str | ParseResult | ResourcePath | Path | None = 'resource://lsst.daf.butler/tests/registry_data')#
Bases:
MockRepoA test helper for task execution backed by a local direct butler.
Parameters#
- butler
lsst.daf.butler.direct_butler.DirectButler Butler to write to.
- *args
strorlsst.resources.ResourcePath Butler YAML import files to load into the test repository.
- input_run
str, optional Name of a
RUNcollection that will be used as an input to quantum graph generation. Input datasets created by the helper are added to this collection.- input_chain
str, optional Name of a
CHAINEDcollection that will be the direct input to quantum graph generation. This always includesinput_run.- use_import_collections_as_input
bool,str, orIterable[str], optional Additional collections from YAML import files to include in
input_chain, orTrueto include all such collections (in chain-flattened lexicographical order).- data_rootconvertible to
lsst.resources.ResourcePath, optional Root directory to join to each element in
*args. Defaults to thelsst.daf.butler.tests.registry_datapackage.
Notes#
This helper maintains an
pipeline_graph.PipelineGraphand a no-datastore butler backed by an in-memory SQLite database for use in quantum graph generation. It creates a separate in-memory limited butler for execution as needed.Methods Summary
Make a single-quantum executor backed by a new limited butler.
make_temporary(*args[, input_run, ...])Methods Documentation
- make_single_quantum_executor(qg: PredictedQuantumGraph | None = None) tuple[SingleQuantumExecutor, Butler]#
Make a single-quantum executor backed by a new limited butler.
Parameters#
- qg
quantum_graph.PredictedQuantumGraph Ignored by this implementation.
Returns#
- executor
single_quantum_executor.SingleQuantumExecutor An executor for a single quantum.
- butler
lsst.daf.butler.Butler The butler that the executor will write to.
- qg
- classmethod make_temporary(*args: str | ResourcePath, input_run: str = 'input_run', input_chain: str = 'input_chain', use_import_collections_as_input: bool | str | Iterable[str] = True, data_root: str | ParseResult | ResourcePath | Path | None = 'resource://lsst.daf.butler/tests/registry_data', **kwargs: Any) Iterator[tuple[DirectButlerRepo, str]]#
- butler