metawards.extractors.extract_custom¶
-
metawards.extractors.
extract_custom
(custom_function: Callable[[…], None], stage: str, **kwargs) → List[Callable[[…], None]][source]¶ This returns the default list of ‘output_XXX’ functions that are called in sequence for each iteration of the model run. This provides a custom extractor that uses ‘custom_function’ passed from the user. This makes sure that if ‘stage’ is not handled by the custom function, then the “extract_default” functions for that stage are correctly called for all stages except “analyse”
- 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]