22 """Module defining TaskFactory interface.
25 __all__ = [
"TaskFactory"]
27 from abc
import ABCMeta, abstractmethod
31 """Abstract base class for task factory.
33 Task factory is responsible for creating instances of PipelineTask
38 def makeTask(self, taskClass, name, config, overrides, butler):
39 """Create new PipelineTask instance from its class.
44 `PipelineTask` sub-class.
45 name : `str` or `None`
46 The name of the new task; if `None` then use
47 ``taskClass._DefaultName``.
48 config : `pex.Config` or `None`
49 Configuration object, if `None` then use task-defined
50 configuration class (``taskClass.ConfigClass``) to create new
52 overrides : `ConfigOverrides` or `None`
53 Configuration overrides, this should contain all overrides to be
54 applied to a default task config, including instrument-specific,
55 obs-package specific, and possibly command-line overrides. This
56 parameter is exclusive with ``config``, only one of the two can be
57 specified as not-`None`.
58 butler : `~lsst.daf.butler.Butler` or None
59 Butler instance used to obtain initialization inputs for
60 PipelineTasks. If `None`, some PipelineTasks will not be usable
65 Instance of a `PipelineTask` class or `None` on errors.
69 Any exceptions that are raised by PipelineTask constructor or its
70 configuration class are propagated back to caller.
def makeTask(self, taskClass, name, config, overrides, butler)