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, config, overrides, butler):
39 """Create new PipelineTask instance from its class. 44 `PipelineTask` sub-class. 45 config : `pex.Config` or `None` 46 Configuration object, if `None` then use task-defined 47 configuration class (``taskClass.ConfigClass``) to create new 49 overrides : `ConfigOverrides` or `None` 50 Configuration overrides, this should contain all overrides to be 51 applied to a default task config, including instrument-specific, 52 obs-package specific, and possibly command-line overrides. This 53 parameter is exclusive with ``config``, only one of the two can be 54 specified as not-`None`. 55 butler : `~lsst.daf.butler.Butler` or None 56 Butler instance used to obtain initialization inputs for 57 PipelineTasks. If `None`, some PipelineTasks will not be usable 62 Instance of a `PipelineTask` class or `None` on errors. 66 Any exceptions that are raised by PipelineTask constructor or its 67 configuration class are propagated back to caller. def makeTask(self, taskClass, config, overrides, butler)