lisa.exekall_customize.LISAAdaptor#

class lisa.exekall_customize.LISAAdaptor(*args, **kwargs)[source]#

Bases: AdaptorBase

Attributes

Methods

compare_db_list()

Compare databases listed in db_list.

finalize_expr()

Finalize an exekall.engine.ComputableExpression right after all its values have been computed.

format_expr_list()

Return a string that is printed right after the list of executed expressions.

format_result()

Format an exekall.engine.ExprVal that is the result of an expression. It should return a (short) string that will be displayed at the end of the computation.

get_default_type_goal_pattern_set()

Returns a set of patterns that will be used as the default value for exekall run --goal.

get_hidden_op_set()

Returns the set of hidden exekall.engine.Operator.

get_non_reusable_type_set()

Return a set of non-reusable types.

get_prebuilt_op_set()

Returns a set of exekall.engine.PrebuiltOperator.

get_run_exit_code()

Return an integer used as exekall run exit status.

get_tags()

Returns a dictionnary of tag names to their value.

register_compare_param()

Register CLI parameters for the compare subcommand.

register_run_param()

Register CLI parameters for the run subcommand.

register_show_param()

Register CLI parameters for the show subcommand.

reload_db()

Hook called when reloading a serialized exekall.engine.ValueDB. The returned database will be used.

show_db()

Show the content of the database.

filter_op_set() inherited

See exekall.customization.AdaptorBase.filter_op_set()

get_adaptor_cls() inherited

See exekall.customization.AdaptorBase.get_adaptor_cls()

get_summary() inherited

See exekall.customization.AdaptorBase.get_summary()

Attributes#

LISAAdaptor.name = 'LISA'#

Methods#

LISAAdaptor.compare_db_list(db_list)[source]#

Compare databases listed in db_list.

Parameters:

db_list (list(exekall.engine.ValueDB)) – List of exekall.engine.ValueDB to compare.

This is called by exekall compare to actually do something useful.

LISAAdaptor.finalize_expr(expr)[source]#

Finalize an exekall.engine.ComputableExpression right after all its values have been computed.

LISAAdaptor.format_expr_list(expr_list, verbose=0)[source]#

Return a string that is printed right after the list of executed expressions.

Parameters:

expr_list (list(exekall.engine.ExpressionBase)) – List of exekall.engine.ExpressionBase that will be executed. Note that this list has not yet undergone CSE, cloning for multiple iterations or other transformations.

This can be used to add some information about the expressions that are about to be executed.

LISAAdaptor.format_result(expr_val)[source]#

Format an exekall.engine.ExprVal that is the result of an expression. It should return a (short) string that will be displayed at the end of the computation.

static LISAAdaptor.get_default_type_goal_pattern_set()[source]#

Returns a set of patterns that will be used as the default value for exekall run --goal.

LISAAdaptor.get_hidden_op_set(op_set)[source]#

Returns the set of hidden exekall.engine.Operator.

This allows hiding parts of the IDs that would not add much information but clutter them.

LISAAdaptor.get_non_reusable_type_set()[source]#

Return a set of non-reusable types.

Defaults to an empty set.

LISAAdaptor.get_prebuilt_op_set()[source]#

Returns a set of exekall.engine.PrebuiltOperator.

This allows injecting any “spark” value that is needed to build the expressions, like configuration objects. These values are usually built out of the custom CLI parameters added by the adaptor.

LISAAdaptor.get_run_exit_code(result_map)[source]#

Return an integer used as exekall run exit status.

Parameters:

result_map (dict(exekall.engine.ComputableExpression, exekall.engine.ExprVal)) – Dictionary of expressions to the list of their values.

classmethod LISAAdaptor.get_tags(value)[source]#

Returns a dictionnary of tag names to their value.

Default to empty set of tags, unless value is a numbers.Number in which case the value of the number is used.

static LISAAdaptor.register_compare_param(parser)[source]#

Register CLI parameters for the compare subcommand.

Parameters:

parser (argparse.ArgumentParser) – Parser of the compare subcommand to add arguments onto.

static LISAAdaptor.register_run_param(parser)[source]#

Register CLI parameters for the run subcommand.

Parameters:

parser (argparse.ArgumentParser) – Parser of the run subcommand to add arguments onto.

classmethod LISAAdaptor.register_show_param(parser)[source]#

Register CLI parameters for the show subcommand.

Parameters:

parser (argparse.ArgumentParser) – Parser of the show subcommand to add arguments onto.

classmethod LISAAdaptor.reload_db(db, path=None)[source]#

Hook called when reloading a serialized exekall.engine.ValueDB. The returned database will be used.

Parameters:
LISAAdaptor.show_db(db)[source]#

Show the content of the database.

Parameters:

db (exekall.engine.ValueDB) – exekall.engine.ValueDB to show.

This is called by exekall show to actually do something useful.

LISAAdaptor.filter_op_set()#

Inherited method, see exekall.customization.AdaptorBase.filter_op_set()

classmethod LISAAdaptor.get_adaptor_cls()#

Inherited method, see exekall.customization.AdaptorBase.get_adaptor_cls()

LISAAdaptor.get_summary()#

Inherited method, see exekall.customization.AdaptorBase.get_summary()