|
lsst.obs.base
20.0.0-69-g8f355a9+701c885a11
|
Public Member Functions | |
| def | __init__ (self, List[str] messages) |
| 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) |
A `BuilderNode` that represents a subdirectory to be skipped,
created by pruning `BuilderTree` that contained only `BuilderSkipInput`
instances.
BuilderPrunedTrees can be pruned. When they are not pruned, they
build `SkipHandler` instances.
Parameters
----------
messages : `list` [`str`]
A list of warning messages to be printed when the handler produced by
this builder matches a subdirectory.
Definition at line 240 of file builders.py.
| def lsst.obs.base.gen2to3.repoWalker.builders.BuilderPrunedTree.__init__ | ( | self, | |
| List[str] | messages | ||
| ) |
Definition at line 255 of file builders.py.
| PathElementHandler lsst.obs.base.gen2to3.repoWalker.builders.BuilderPrunedTree.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 258 of file builders.py.
| Tuple[BuilderNode, List[str], bool] lsst.obs.base.gen2to3.repoWalker.builders.BuilderPrunedTree.prune | ( | self | ) |
Attempt to prune this node and its children from the tree.
Returns
-------
replacement : `BuilderNode`
The result of recursively pruning child nodes; often just ``self``.
messages : `list` [`str`]
Warning messages that should be logged by a parent node when a
matching path element is encountered, if this node is pruned.
prune : `bool`
If `True`, this node may be pruned from the tree (but will not
necessarily be - it may correspond to a path element that should
be skipped with siblings that should not be).
Reimplemented from lsst.obs.base.gen2to3.repoWalker.builders.BuilderNode.
Definition at line 265 of file builders.py.
1.8.18