Loading [MathJax]/extensions/tex2jax.js
LSST Applications g04a91732dc+7fec47d7bc,g07dc498a13+5ab4d22ec3,g0fba68d861+565de8e5d5,g1409bbee79+5ab4d22ec3,g1a7e361dbc+5ab4d22ec3,g1fd858c14a+11200c7927,g20f46db602+25d63fd678,g35bb328faa+fcb1d3bbc8,g4d2262a081+61302e889d,g4d39ba7253+d05e267ece,g4e0f332c67+5d362be553,g53246c7159+fcb1d3bbc8,g60b5630c4e+d05e267ece,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g7b71ed6315+fcb1d3bbc8,g8048e755c2+a1301e4c20,g8852436030+163ceb82d8,g89139ef638+5ab4d22ec3,g89e1512fd8+fbb808ebce,g8d6b6b353c+d05e267ece,g9125e01d80+fcb1d3bbc8,g989de1cb63+5ab4d22ec3,g9f33ca652e+8abe617c77,ga9baa6287d+d05e267ece,gaaedd4e678+5ab4d22ec3,gabe3b4be73+1e0a283bba,gb1101e3267+fefe9ce5b1,gb58c049af0+f03b321e39,gb90eeb9370+824c420ec4,gc741bbaa4f+77ddc33078,gcf25f946ba+163ceb82d8,gd315a588df+0f88d5218e,gd6cbbdb0b4+c8606af20c,gd9a9a58781+fcb1d3bbc8,gde0f65d7ad+e6bd566e97,ge278dab8ac+932305ba37,ge82c20c137+76d20ab76d,w.2025.10
LSST Data Management Base Package
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
lsst.pex.config.registry Namespace Reference

Classes

class  ConfigurableWrapper
 
class  Registry
 
class  RegistryAdaptor
 
class  RegistryField
 
class  RegistryInstanceDict
 

Functions

 makeRegistry (doc, configBaseType=Config)
 
 registerConfigurable (name, registry, ConfigClass=None)
 
 registerConfig (name, registry, target)
 

Function Documentation

◆ makeRegistry()

lsst.pex.config.registry.makeRegistry ( doc,
configBaseType = Config )
Create a `Registry`.

Parameters
----------
doc : `str`
    Docstring for the created `Registry` (this is set as the ``__doc__``
    attribute of the `Registry` instance.
configBaseType : `lsst.pex.config.Config`-type
    Base type of config classes in the `Registry`.

Returns
-------
registry : `Registry`
    Registry with ``__doc__`` and ``_configBaseType`` attributes
    set.

Definition at line 399 of file registry.py.

399def makeRegistry(doc, configBaseType=Config):
400 """Create a `Registry`.
401
402 Parameters
403 ----------
404 doc : `str`
405 Docstring for the created `Registry` (this is set as the ``__doc__``
406 attribute of the `Registry` instance.
407 configBaseType : `lsst.pex.config.Config`-type
408 Base type of config classes in the `Registry`.
409
410 Returns
411 -------
412 registry : `Registry`
413 Registry with ``__doc__`` and ``_configBaseType`` attributes
414 set.
415 """
416 cls = type("Registry", (Registry,), {"__doc__": doc})
417 return cls(configBaseType=configBaseType)
418
419

◆ registerConfig()

lsst.pex.config.registry.registerConfig ( name,
registry,
target )
Add a class as a ``ConfigClass`` in a `Registry` and
associate it with the given configurable.

Parameters
----------
name : `str`
    Name of the ``target`` in the ``registry``.
registry : `Registry`
    The registry containing the ``target``.
target : obj
    A configurable type, such as a subclass of `lsst.pipe.base.Task`.

See Also
--------
registerConfigurable

Notes
-----
Internally, this decorator runs `Registry.register`.

Definition at line 449 of file registry.py.

449def registerConfig(name, registry, target):
450 """Add a class as a ``ConfigClass`` in a `Registry` and
451 associate it with the given configurable.
452
453 Parameters
454 ----------
455 name : `str`
456 Name of the ``target`` in the ``registry``.
457 registry : `Registry`
458 The registry containing the ``target``.
459 target : obj
460 A configurable type, such as a subclass of `lsst.pipe.base.Task`.
461
462 See Also
463 --------
464 registerConfigurable
465
466 Notes
467 -----
468 Internally, this decorator runs `Registry.register`.
469 """
470
471 def decorate(cls):
472 registry.register(name, target=target, ConfigClass=cls)
473 return cls
474
475 return decorate

◆ registerConfigurable()

lsst.pex.config.registry.registerConfigurable ( name,
registry,
ConfigClass = None )
Add a class as a configurable in a `Registry` instance.

Parameters
----------
name : `str`
    Name of the target (the decorated class) in the ``registry``.
registry : `Registry`
    The `Registry` instance that the decorated class is added to.
ConfigClass : `lsst.pex.config.Config`-type, optional
    Config class associated with the configurable. If `None`, the class's
    ``ConfigClass`` attribute is used instead.

See Also
--------
registerConfig

Notes
-----
Internally, this decorator runs `Registry.register`.

Definition at line 420 of file registry.py.

420def registerConfigurable(name, registry, ConfigClass=None):
421 """Add a class as a configurable in a `Registry` instance.
422
423 Parameters
424 ----------
425 name : `str`
426 Name of the target (the decorated class) in the ``registry``.
427 registry : `Registry`
428 The `Registry` instance that the decorated class is added to.
429 ConfigClass : `lsst.pex.config.Config`-type, optional
430 Config class associated with the configurable. If `None`, the class's
431 ``ConfigClass`` attribute is used instead.
432
433 See Also
434 --------
435 registerConfig
436
437 Notes
438 -----
439 Internally, this decorator runs `Registry.register`.
440 """
441
442 def decorate(cls):
443 registry.register(name, target=cls, ConfigClass=ConfigClass)
444 return cls
445
446 return decorate
447
448