Definition at line 46 of file ConfigFactory.py.
◆ __init__()
def python.ConfigFactory.FactoryBlock.__init__ |
( |
|
self, |
|
|
|
alg, |
|
|
|
algName, |
|
|
|
options, |
|
|
|
defaults, |
|
|
|
subAlgs = None |
|
) |
| |
Definition at line 49 of file ConfigFactory.py.
49 def __init__(self, alg, algName, options, defaults, subAlgs=None):
51 self.algName = algName
52 self.options = options
53 self.defaults = defaults
57 self.subAlgs = subAlgs
◆ makeConfig()
def python.ConfigFactory.FactoryBlock.makeConfig |
( |
|
self, |
|
|
|
funcOptions |
|
) |
| |
Parameters
----------
funcName: str
name associated with the algorithm. This name must have been added to the
list of available algorithms
funcOptions: dict
dictionary containing options for the algorithm read from the YAML file
Returns
-------
configSequence
Definition at line 60 of file ConfigFactory.py.
60 def makeConfig(self, funcOptions):
65 name associated with the algorithm. This name must have been added to the
66 list of available algorithms
68 dictionary containing options for the algorithm read from the YAML file
74 configSeq = ConfigSequence()
77 funcName = self.algName
79 defaults = self.defaults
85 if arg
in funcOptions:
86 args[arg] = funcOptions[arg]
88 elif arg
in funcDefaults:
89 args[arg] = funcDefaults[arg]
91 elif defaults
is not None and arg
in defaults:
92 args[arg] = defaults[arg]
100 raise ValueError(f
"{arg} is required for {funcName}")
101 if inspect.isclass(func):
102 configSeq.append(func(**args))
105 return configSeq, args.keys()
◆ alg
python.ConfigFactory.FactoryBlock.alg |
◆ algName
python.ConfigFactory.FactoryBlock.algName |
◆ defaults
python.ConfigFactory.FactoryBlock.defaults |
◆ options
python.ConfigFactory.FactoryBlock.options |
◆ subAlgs
python.ConfigFactory.FactoryBlock.subAlgs |
The documentation for this class was generated from the following file: