metawards.mixers.mix_custom

metawards.mixers.mix_custom(custom_function: Callable[[...], None], stage: str, **kwargs) List[Callable[[...], None]][source]

This returns the default list of ‘merge_XXX’ functions that are called in sequence for each iteration of the model run. This provides a custom mixer that uses ‘custom_function’ passed from the user. This makes sure that if ‘stage’ is not handled by the custom function, then the “mix_default” functions for that stage are correctly called for all stages except “foi”

Parameters
  • custom_function (MetaFunction) – A custom user-supplied function that returns the functions that the user would like to be called for each step.

  • stage (str) – The stage of the day/model

Returns

funcs – The list of functions that will be called in sequence

Return type

List[MetaFunction]