|
def | __init__ (self, *str datasetTypeName, str template, Dict[str, type] keys, StorageClass storageClass, DimensionUniverse universe, FormatterParameter formatter, TranslatorFactory translatorFactory, Optional[PathElementHandler] targetHandler=None, **Any kwargs) |
|
PathElementHandler | build (self, PathElementParser parser, Dict[str, type] allKeys, Dict[str, type] cumulativeKeys, *Optional[re.Pattern] fileIgnoreRegEx, Optional[re.Pattern] dirIgnoreRegEx) |
|
Tuple[BuilderNode, List[str], bool] | prune (self) |
|
An input to a `RepoWalker` that matches files that correspond to
datasets that we want to extract.
BuilderTargetInputs can never be pruned, and always build
`TargetFileHandler` instances.
Parameters
----------
datasetTypeName : `str`
Name of the dataset type.
template : `str`
Full Gen2 filename template.
keys : `dict` [`str`, `type`]
Dictionary that maps Gen2 data ID key to the type of its value.
storageClass : `StorageClass`
`StorageClass` for the Gen3 dataset type.
universe : `DimensionUniverse`
All candidate dimensions for the Gen3 dataset type.
formatter : `lsst.daf.butler.Formatter` or `str`, optional
A Gen 3 formatter class or fully-qualified name.
translatorFactory : `TranslatorFactory`
Object that can be used to construct data ID translators.
targetHandler : `PathElementHandler`, optional
Override target handler for this dataset type.
**kwargs:
Additional keyword arguments are passed to `Translator.makeMatching`,
in along with ``datasetTypeName`` and ``keys``.
Definition at line 176 of file builders.py.
PathElementHandler lsst.obs.base.gen2to3.repoWalker.builders.BuilderTargetInput.build |
( |
|
self, |
|
|
PathElementParser |
parser, |
|
|
Dict[str, type] |
allKeys, |
|
|
Dict[str, type] |
cumulativeKeys, |
|
|
*Optional[re.Pattern] |
fileIgnoreRegEx, |
|
|
Optional[re.Pattern]
|
dirIgnoreRegEx |
|
) |
| |
Transform this node in the build tree into a corresponding
`PathElementHandler`, recursing to any children.
Must be called after `prune`.
Parameters
----------
parser : `PathElementParser`
An object that matches the path element the new handler is
responsible for and extracts a (partial) Gen2 data ID from it.
allKeys : `dict` [`str`, `type`]
A mapping from Gen2 data ID key to the type of its value. Will
contain all keys that may be extracted by the given parser, and
possibly others.
cumulativeKeys : `dict` [`str`, `type`], optional
A dictionary containing key strings and types for Gen2 data ID keys
that have been extracted from previous path elements for this
template, including those extracted by ``parser``.
Returns
-------
handler : `PathElementHandler`
A new handler object.
Reimplemented from lsst.obs.base.gen2to3.repoWalker.builders.BuilderNode.
Definition at line 223 of file builders.py.