Skip to content

Commit ebb1e9f

Browse files
authored
Add option to register CompositeAlgorithm.from_list (#118)
1 parent 8e88cc6 commit ebb1e9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cfspopcon/algorithm_class.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,10 @@ def wrapper(**kwargs: Any) -> xr.Dataset:
323323
self.__doc__ = self._make_docstring()
324324

325325
@classmethod
326-
def from_list(cls, keys: list[str]) -> CompositeAlgorithm:
326+
def from_list(cls, keys: list[str], name: Optional[str] = None, register: bool = False) -> CompositeAlgorithm:
327327
"""Build a CompositeAlgorithm from a list of Algorithm names."""
328328
algorithms = [Algorithm.get_algorithm(key) for key in keys]
329-
return CompositeAlgorithm(algorithms=algorithms)
329+
return CompositeAlgorithm(algorithms=algorithms, name=name, register=register)
330330

331331
def _make_docstring(self) -> str:
332332
"""Makes a doc-string detailing the function inputs and outputs."""

0 commit comments

Comments
 (0)