Container object for repository data used by Butler
Parameters
----------
args : RepositoryArgs
The arguments that are used to find or create the RepositoryCfg.
role : string
"input", "output", or "parent", indicating why Butler loaded this repository.
* input: the Repository was passed as a Butler input.
* output: the Repository was passed as a Butler output.
* parent: the Repository was specified in the RepositoryCfg parents list of a readable repository.
Attributes
----------
cfg: RepositoryCfg
The configuration for the Repository.
_cfgOrigin : string
"new", "existing", or "nested". Indicates the origin of the repository and its RepositoryCfg:
* new: it was created by this instance of Butler, and this instance of Butler will generate the
RepositoryCfg file.
* existing: it was found (via the root or cfgRoot argument)
* nested: the full RepositoryCfg was nested in another RepositoryCfg's parents list (this can happen
if parameters of an input specified by RepositoryArgs or dict does not entirely match an existing
RepositoryCfg).
cfgRoot : string
Path or URI to the location of the RepositoryCfg file.
repo : lsst.daf.persistence.Repository
The Repository class instance.
parentRepoDatas : list of RepoData
The parents of this Repository, as indicated this Repository's RepositoryCfg. If this is a new
Repository then these are the inputs to this Butler (and will be saved in the RepositoryCfg). These
RepoData objects are not owned by this RepoData, these are references to peer RepoData objects in the
Butler's RepoDataContainer.
isV1Repository : bool
True if this is an Old Butler repository. In this case the repository does not have a RepositoryCfg
file. It may have a _mapper file and may have a _parent symlink. It will never be treated as a "new"
repository, i.e. even though there is not a RepositoryCfg file, one will not be generated.
If False, this is a New Butler repository and is specified by RepositoryCfg file.
tags : set
These are values that may be used to restrict the search of input repositories. Details are available
in the RepositoryArgs and DataId classes.
role : string
"input", "output", or "parent", indicating why Butler loaded this repository.
* input: the Repository was passed as a Butler input.
* output: the Repository was passed as a Butler output.
* parent: the Repository was specified in the RepositoryCfg parents list of a readable repository.
_repoArgs : RepositoryArgs
Contains the arguments that were used to specify this Repository.
Definition at line 61 of file butler.py.
def lsst.daf.persistence.butler.RepoData.getParentRepoDatas |
( |
|
self, |
|
|
|
context = None |
|
) |
| |
Get the parents & grandparents etc of this repo data, in depth-first search order.
Duplicate entries will be removed in cases where the same parent appears more than once in the parent
graph.
Parameters
----------
context : set, optional
Users should typically omit context and accept the default argument. Context is used to keep a set
of known RepoDatas when calling this function recursively, for duplicate elimination.
Returns
-------
list of RepoData
A list of the parents & grandparents etc of a given repo data, in depth-first search order.
Definition at line 204 of file butler.py.