lisa.exekall_customize.LISAAdaptor#
- class lisa.exekall_customize.LISAAdaptor(*args, **kwargs)[source]#
Bases:
AdaptorBaseAttributes
Methods
Compare databases listed in
db_list.Finalize an
exekall.engine.ComputableExpressionright after all its values have been computed.Return a string that is printed right after the list of executed expressions.
Format an
exekall.engine.ExprValthat is the result of an expression. It should return a (short) string that will be displayed at the end of the computation.Returns a set of patterns that will be used as the default value for
exekall run --goal.Returns the set of hidden
exekall.engine.Operator.Return a set of non-reusable types.
Returns a set of
exekall.engine.PrebuiltOperator.Return an integer used as
exekall runexit status.Returns a dictionnary of tag names to their value.
Register CLI parameters for the
comparesubcommand.Register CLI parameters for the
runsubcommand.Register CLI parameters for the
showsubcommand.Hook called when reloading a serialized
exekall.engine.ValueDB. The returned database will be used.Show the content of the database.
filter_op_set()inheritedget_adaptor_cls()inheritedget_summary()inherited
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.ValueDBto compare.
This is called by
exekall compareto actually do something useful.
- LISAAdaptor.finalize_expr(expr)[source]#
Finalize an
exekall.engine.ComputableExpressionright 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.ExpressionBasethat 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.ExprValthat 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.
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 runexit 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.Numberin which case the value of the number is used.
- static LISAAdaptor.register_compare_param(parser)[source]#
Register CLI parameters for the
comparesubcommand.- Parameters:
parser (argparse.ArgumentParser) – Parser of the
comparesubcommand to add arguments onto.
- static LISAAdaptor.register_run_param(parser)[source]#
Register CLI parameters for the
runsubcommand.- Parameters:
parser (argparse.ArgumentParser) – Parser of the
runsubcommand to add arguments onto.
- classmethod LISAAdaptor.register_show_param(parser)[source]#
Register CLI parameters for the
showsubcommand.- Parameters:
parser (argparse.ArgumentParser) – Parser of the
showsubcommand 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:
db (exekall.engine.ValueDB) –
exekall.engine.ValueDBthat has just been deserialized.path (str or None) – Path of the file of the serialized database if available.
- LISAAdaptor.show_db(db)[source]#
Show the content of the database.
- Parameters:
db (exekall.engine.ValueDB) –
exekall.engine.ValueDBto show.
This is called by
exekall showto 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()