lisa.exekall_customize.LISAAdaptor#
- class lisa.exekall_customize.LISAAdaptor(*args, **kwargs)[source]#
Bases:
AdaptorBase
Attributes
Methods
Compare databases listed in
db_list
.Finalize an
exekall.engine.ComputableExpression
right after all its values have been computed.Return a string that is printed right after the list of executed expressions.
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.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 run
exit status.Returns a dictionnary of tag names to their value.
Register CLI parameters for the
compare
subcommand.Register CLI parameters for the
run
subcommand.Register CLI parameters for the
show
subcommand.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.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
.
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:
db (exekall.engine.ValueDB) –
exekall.engine.ValueDB
that 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.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()