LSST Applications  21.0.0+75b29a8a7f,21.0.0+e70536a077,21.0.0-1-ga51b5d4+62c747d40b,21.0.0-10-gbfb87ad6+3307648ee3,21.0.0-15-gedb9d5423+47cba9fc36,21.0.0-2-g103fe59+fdf0863a2a,21.0.0-2-g1367e85+d38a93257c,21.0.0-2-g45278ab+e70536a077,21.0.0-2-g5242d73+d38a93257c,21.0.0-2-g7f82c8f+e682ffb718,21.0.0-2-g8dde007+d179fbfa6a,21.0.0-2-g8f08a60+9402881886,21.0.0-2-ga326454+e682ffb718,21.0.0-2-ga63a54e+08647d4b1b,21.0.0-2-gde069b7+26c92b3210,21.0.0-2-gecfae73+0445ed2f95,21.0.0-2-gfc62afb+d38a93257c,21.0.0-27-gbbd0d29+ae871e0f33,21.0.0-28-g5fc5e037+feb0e9397b,21.0.0-3-g21c7a62+f4b9c0ff5c,21.0.0-3-g357aad2+57b0bddf0b,21.0.0-3-g4be5c26+d38a93257c,21.0.0-3-g65f322c+3f454acf5d,21.0.0-3-g7d9da8d+75b29a8a7f,21.0.0-3-gaa929c8+9e4ef6332c,21.0.0-3-ge02ed75+4b120a55c4,21.0.0-4-g3300ddd+e70536a077,21.0.0-4-g591bb35+4b120a55c4,21.0.0-4-gc004bbf+4911b9cd27,21.0.0-4-gccdca77+f94adcd104,21.0.0-4-ge8fba5a+2b3a696ff9,21.0.0-5-gb155db7+2c5429117a,21.0.0-5-gdf36809+637e4641ee,21.0.0-6-g00874e7+c9fd7f7160,21.0.0-6-g4e60332+4b120a55c4,21.0.0-7-gc8ca178+40eb9cf840,21.0.0-8-gfbe0b4b+9e4ef6332c,21.0.0-9-g2fd488a+d83b7cd606,w.2021.05
LSST Data Management Base Package
Public Member Functions | List of all members
lsst.obs.base.gen2to3.repoWalker.builders.BuilderNode Class Reference
Inheritance diagram for lsst.obs.base.gen2to3.repoWalker.builders.BuilderNode:
lsst.obs.base.gen2to3.repoWalker.builders.BuilderDuplicateInputs lsst.obs.base.gen2to3.repoWalker.builders.BuilderInput lsst.obs.base.gen2to3.repoWalker.builders.BuilderPrunedTree lsst.obs.base.gen2to3.repoWalker.builders.BuilderTree lsst.obs.base.gen2to3.repoWalker.builders.BuilderSkipInput lsst.obs.base.gen2to3.repoWalker.builders.BuilderTargetInput

Public Member Functions

Tuple[BuilderNode, List[str], bool] prune (self)
 
PathElementHandler build (self, PathElementParser parser, Dict[str, type] allKeys, Dict[str, type] cumulativeKeys, *Optional[re.Pattern] fileIgnoreRegEx, Optional[re.Pattern] dirIgnoreRegEx)
 

Detailed Description

Abstract interface for nodes in the temporary tree that is used to
construct a `RepoWalker`.

Definition at line 50 of file builders.py.

Member Function Documentation

◆ build()

PathElementHandler lsst.obs.base.gen2to3.repoWalker.builders.BuilderNode.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 in lsst.obs.base.gen2to3.repoWalker.builders.BuilderTree, lsst.obs.base.gen2to3.repoWalker.builders.BuilderDuplicateInputs, lsst.obs.base.gen2to3.repoWalker.builders.BuilderPrunedTree, lsst.obs.base.gen2to3.repoWalker.builders.BuilderTargetInput, and lsst.obs.base.gen2to3.repoWalker.builders.BuilderSkipInput.

Definition at line 74 of file builders.py.

76  ) -> PathElementHandler:
77  """Transform this node in the build tree into a corresponding
78  `PathElementHandler`, recursing to any children.
79 
80  Must be called after `prune`.
81 
82  Parameters
83  ----------
84  parser : `PathElementParser`
85  An object that matches the path element the new handler is
86  responsible for and extracts a (partial) Gen2 data ID from it.
87  allKeys : `dict` [`str`, `type`]
88  A mapping from Gen2 data ID key to the type of its value. Will
89  contain all keys that may be extracted by the given parser, and
90  possibly others.
91  cumulativeKeys : `dict` [`str`, `type`], optional
92  A dictionary containing key strings and types for Gen2 data ID keys
93  that have been extracted from previous path elements for this
94  template, including those extracted by ``parser``.
95 
96  Returns
97  -------
98  handler : `PathElementHandler`
99  A new handler object.
100  """
101  raise NotImplementedError()
102 
103 

◆ prune()

Tuple[BuilderNode, List[str], bool] lsst.obs.base.gen2to3.repoWalker.builders.BuilderNode.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 in lsst.obs.base.gen2to3.repoWalker.builders.BuilderTree, lsst.obs.base.gen2to3.repoWalker.builders.BuilderDuplicateInputs, lsst.obs.base.gen2to3.repoWalker.builders.BuilderPrunedTree, lsst.obs.base.gen2to3.repoWalker.builders.BuilderTargetInput, and lsst.obs.base.gen2to3.repoWalker.builders.BuilderSkipInput.

Definition at line 56 of file builders.py.

56  def prune(self) -> Tuple[BuilderNode, List[str], bool]:
57  """Attempt to prune this node and its children from the tree.
58 
59  Returns
60  -------
61  replacement : `BuilderNode`
62  The result of recursively pruning child nodes; often just ``self``.
63  messages : `list` [`str`]
64  Warning messages that should be logged by a parent node when a
65  matching path element is encountered, if this node is pruned.
66  prune : `bool`
67  If `True`, this node may be pruned from the tree (but will not
68  necessarily be - it may correspond to a path element that should
69  be skipped with siblings that should not be).
70  """
71  raise NotImplementedError()
72 

The documentation for this class was generated from the following file: