hydroflows.workflow.ExpandMethod#

class hydroflows.workflow.ExpandMethod[source]#

Bases: Method, ABC

Base class for methods that expand on a wildcard.

Methods

get_output_for_wildcards

Get the output paths for a specific wildcard configuration.

set_expand_wildcard

Set wildcard key and values.

Attributes

expand_wildcards

Return a dict with a list of expand values per wildcard key.

output_expanded

Output dict with wildcards in output path evaluated.

set_expand_wildcard(wildcard: str, values: List[str]) None[source]#

Set wildcard key and values.

Parameters:
  • wildcard (str) – The wildcard key.

  • values (List[str]) – The list of expand values for the wildcard.

property expand_wildcards: Dict[str, List[str]]#

Return a dict with a list of expand values per wildcard key.

property output_expanded: Dict[str, Path | List[Path]]#

Output dict with wildcards in output path evaluated.

get_output_for_wildcards(wildcards: dict[str, str]) dict[str, Path][source]#

Get the output paths for a specific wildcard configuration.

Parameters:

wildcards (dict[str, str]) – The wildcard configuration. Note that the wildcard values should be single strings.

Returns:

The output paths for the wildcard configuration.

Return type:

dict[str, Path]