LSSTApplications  8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
Classes | Functions | Variables
lsst.pex.config.registry Namespace Reference

Classes

class  ConfigurableWrapper
 
class  Registry
 
class  RegistryAdaptor
 
class  RegistryInstanceDict
 
class  RegistryField
 

Functions

def makeRegistry
 
def registerConfigurable
 
def registerConfig
 

Variables

tuple __all__ = ("Registry", "makeRegistry", "RegistryField", "registerConfig", "registerConfigurable")
 

Function Documentation

def lsst.pex.config.registry.makeRegistry (   doc,
  configBaseType = Config 
)
A convenience function to create a new registry.

The returned value is an instance of a trivial subclass of Registry whose only purpose is to
customize its doc string and set attrList.

Definition at line 192 of file registry.py.

193 def makeRegistry(doc, configBaseType=Config):
194  """A convenience function to create a new registry.
195 
196  The returned value is an instance of a trivial subclass of Registry whose only purpose is to
197  customize its doc string and set attrList.
198  """
199  cls = type("Registry", (Registry,), {"__doc__": doc})
200  return cls(configBaseType=configBaseType)
def lsst.pex.config.registry.registerConfig (   name,
  registry,
  target 
)
A decorator that adds a class as a ConfigClass in a Registry, and associates it with the given
configurable.

Definition at line 211 of file registry.py.

212 def registerConfig(name, registry, target):
213  """A decorator that adds a class as a ConfigClass in a Registry, and associates it with the given
214  configurable.
215  """
216  def decorate(cls):
217  registry.register(name, target=target, ConfigClass=cls)
218  return cls
219  return decorate
def lsst.pex.config.registry.registerConfigurable (   name,
  registry,
  ConfigClass = None 
)
A decorator that adds a class as a configurable in a Registry.

If the 'ConfigClass' argument is None, the class's ConfigClass attribute will be used.

Definition at line 201 of file registry.py.

202 def registerConfigurable(name, registry, ConfigClass=None):
203  """A decorator that adds a class as a configurable in a Registry.
204 
205  If the 'ConfigClass' argument is None, the class's ConfigClass attribute will be used.
206  """
207  def decorate(cls):
208  registry.register(name, target=cls, ConfigClass=ConfigClass)
209  return cls
210  return decorate

Variable Documentation

tuple lsst.pex.config.registry.__all__ = ("Registry", "makeRegistry", "RegistryField", "registerConfig", "registerConfigurable")

Definition at line 28 of file registry.py.