59 def makeConfig(self, funcOptions):
60 """
61 Parameters
62 ----------
63 funcOptions: dict
64 dictionary containing options for the algorithm read from the YAML file
65
66 Returns
67 -------
68 configSequence, and the names of the arguments passed to the algorithm
69 """
70 configSeq = ConfigSequence()
71
72 func = self.alg
73 funcName = self.algName
74 funcDefaults = getDefaultArgs(func)
75 defaults = self.defaults
76
77 args = {}
78
79 for arg in getFuncArgs(func):
80
81 if arg in funcOptions:
82 args[arg] = funcOptions[arg]
83
84 elif arg in funcDefaults:
85 args[arg] = funcDefaults[arg]
86
87 elif defaults is not None and arg in defaults:
88 args[arg] = defaults[arg]
89 elif arg == 'seq':
90
91 args[arg] = configSeq
92 elif arg == 'kwargs':
93
94 continue
95 else:
96 raise ValueError(f"{arg} is required for {funcName}")
97 if inspect.isclass(func):
98 configSeq.append(func(**args))
99 else:
100 func(**args)
101 configSeq.setFactoryName(self.factoryName)
102 return configSeq, args.keys()
103
104