This merge request is adds the
lbexec command proposed in #198 (closed) and the associated
Options class. After
DaVinci are adapted I'll make a follow-up merge request to remove the
ApplicationOptions class and start cleaning up/adapating the tests.
This turned into quite a lot of code when compared to the prototype to however the majority of it is test code and error handling. In particular it tries to give people a more helpful message when the application is already doomed to fail (expand below for examples).
usage: lbexec [-h] [--dry-run] [--export EXPORT] function options [extra_args ...] positional arguments: function Function to call with the options that will return the configuration. Given in the form 'my_module:function_name'. options YAML data to populate the Application.Options object with. Multiple files can merged using 'file1.yaml+file2.yaml'. extra_args optional arguments: -h, --help show this help message and exit --dry-run Do not run the application, just generate the configuration. --export EXPORT Write a file containing the full options (use "-" for stdout)
Error handling examples
Wrong specification of the function to run
Bad contents of the
Tracebacks don't include
lbexec's implementation details