decisionengine_modules.util package

Submodules

decisionengine_modules.util.figure_of_merit module

Calculate figure of merit

decisionengine_modules.util.figure_of_merit.figure_of_merit(performance, running, allowed, idle=None, max_idle=None)[source]

decisionengine_modules.util.retry_function module

decisionengine_modules.util.retry_function.retry_on_error(nretries=1, retry_interval=2, backoff=True)[source]
decisionengine_modules.util.retry_function.retry_wrapper(f, nretries=1, retry_interval=2, backoff=True)[source]

Retry on error with parameters of how many times (nretries) and interval in seconds (retry_interval). If the function to be decorated is an instance method and the values come from a configuration, then this decorator can retrieve these two parameters from instance attributes with the same name. Otherwise, use the default values or pass new values to the decorator.

decisionengine_modules.util.test_retry_function module

class decisionengine_modules.util.test_retry_function.Dummy(name='Dummy')[source]

Bases: object

_func_failure(foo, input2=3)[source]
_func_success(foo, input2=3)[source]
func_failure(foo, input2=3)[source]
func_success(foo, input2=3)[source]
decisionengine_modules.util.test_retry_function.test_all()[source]

decisionengine_modules.util.testutils module

Utils to simplify testing

decisionengine_modules.util.testutils.compare_dfs(df1, df2)[source]

for some reason df.equals does not work here but if I compare cell by cell it works :type df1: pd.DataFrame :arg df1: data frame instance :type df2: pd.DataFrame :arg df2: data frame instance :rtype: bool - True if equal

decisionengine_modules.util.testutils.input_from_file(fname)[source]
decisionengine_modules.util.testutils.raw_input_from_file(fname)[source]

Module contents