LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
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.