lsst.daf.persistence  19.0.0-7-gbea9075+7
Public Member Functions | Public Attributes | List of all members
lsst.daf.persistence.butler.RepoData Class Reference

Public Member Functions

def __init__ (self, args, role)
 
def repoArgs (self)
 
def repoData (self)
 
def __repr__ (self)
 
def setCfg (self, cfg, origin, root, isV1Repository)
 
def cfgOrigin (self)
 
def isNewRepository (self)
 
def role (self)
 
def role (self, val)
 
def getParentRepoDatas (self, context=None)
 
def addParentRepoData (self, parentRepoData)
 
def addTags (self, tags)
 

Public Attributes

 cfg
 
 cfgRoot
 
 repo
 
 parentRepoDatas
 
 isV1Repository
 
 tags
 
 role
 
 parentRegistry
 
 cfgOrigin
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

def lsst.daf.persistence.butler.RepoData.__init__ (   self,
  args,
  role 
)

Definition at line 120 of file butler.py.

Member Function Documentation

◆ __repr__()

def lsst.daf.persistence.butler.RepoData.__repr__ (   self)

Definition at line 140 of file butler.py.

◆ addParentRepoData()

def lsst.daf.persistence.butler.RepoData.addParentRepoData (   self,
  parentRepoData 
)

Definition at line 232 of file butler.py.

◆ addTags()

def lsst.daf.persistence.butler.RepoData.addTags (   self,
  tags 
)

Definition at line 235 of file butler.py.

◆ cfgOrigin()

def lsst.daf.persistence.butler.RepoData.cfgOrigin (   self)

Definition at line 187 of file butler.py.

◆ getParentRepoDatas()

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.

◆ isNewRepository()

def lsst.daf.persistence.butler.RepoData.isNewRepository (   self)

Definition at line 191 of file butler.py.

◆ repoArgs()

def lsst.daf.persistence.butler.RepoData.repoArgs (   self)

Definition at line 133 of file butler.py.

◆ repoData()

def lsst.daf.persistence.butler.RepoData.repoData (   self)

Definition at line 137 of file butler.py.

◆ role() [1/2]

def lsst.daf.persistence.butler.RepoData.role (   self)

Definition at line 195 of file butler.py.

◆ role() [2/2]

def lsst.daf.persistence.butler.RepoData.role (   self,
  val 
)

Definition at line 199 of file butler.py.

◆ setCfg()

def lsst.daf.persistence.butler.RepoData.setCfg (   self,
  cfg,
  origin,
  root,
  isV1Repository 
)
Set information about the cfg into the RepoData

Parameters
----------
cfg : RepositoryCfg
    The RepositoryCfg for the repo.
origin : string
    'new', 'existing', or 'nested'
root : string
    URI or absolute path to the location of the RepositoryCfg.yaml file.

Returns
-------
None

Definition at line 163 of file butler.py.

Member Data Documentation

◆ cfg

lsst.daf.persistence.butler.RepoData.cfg

Definition at line 121 of file butler.py.

◆ cfgOrigin

lsst.daf.persistence.butler.RepoData.cfgOrigin

Definition at line 192 of file butler.py.

◆ cfgRoot

lsst.daf.persistence.butler.RepoData.cfgRoot

Definition at line 123 of file butler.py.

◆ isV1Repository

lsst.daf.persistence.butler.RepoData.isV1Repository

Definition at line 126 of file butler.py.

◆ parentRegistry

lsst.daf.persistence.butler.RepoData.parentRegistry

Definition at line 129 of file butler.py.

◆ parentRepoDatas

lsst.daf.persistence.butler.RepoData.parentRepoDatas

Definition at line 125 of file butler.py.

◆ repo

lsst.daf.persistence.butler.RepoData.repo

Definition at line 124 of file butler.py.

◆ role

lsst.daf.persistence.butler.RepoData.role

Definition at line 128 of file butler.py.

◆ tags

lsst.daf.persistence.butler.RepoData.tags

Definition at line 127 of file butler.py.


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