|
|
|
|
@ -171,7 +171,6 @@ def compile_config(default_config_path):
|
|
|
|
|
|
|
|
|
|
@click.group(invoke_without_command=True)
|
|
|
|
|
#help="Path to default config TOML file"
|
|
|
|
|
|
|
|
|
|
@click.argument('default_config', default="shepherd-default.toml", type=click.Path())
|
|
|
|
|
@click.pass_context
|
|
|
|
|
def cli(ctx, default_config):
|
|
|
|
|
@ -191,8 +190,8 @@ def cli(ctx, default_config):
|
|
|
|
|
|
|
|
|
|
core_conf, plugin_classes, plugin_configs = compile_config(default_config)
|
|
|
|
|
|
|
|
|
|
if args.test is None:
|
|
|
|
|
control.init_control(core_conf, plugin_configs)
|
|
|
|
|
# if args.test is None:
|
|
|
|
|
# control.init_control(core_conf, plugin_configs)
|
|
|
|
|
|
|
|
|
|
scheduler.init_scheduler(core_conf)
|
|
|
|
|
plugin.init_plugins(plugin_classes, plugin_configs, core_conf)
|
|
|
|
|
@ -209,11 +208,11 @@ def cli(ctx, default_config):
|
|
|
|
|
except (KeyboardInterrupt, SystemExit):
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@click.argument('plugin_function')
|
|
|
|
|
@cli.command()
|
|
|
|
|
def test():
|
|
|
|
|
if args.test is not None:
|
|
|
|
|
(test_plugin, test_func) = args.test.split(':')
|
|
|
|
|
func = getattr(shepherd.plugin.plugin_functions[test_plugin], test_func)
|
|
|
|
|
def test(plugin_function):
|
|
|
|
|
(test_plugin, test_func) = plugin_function.split(':')
|
|
|
|
|
func = getattr(plugin.plugin_functions[test_plugin], test_func)
|
|
|
|
|
print(func())
|
|
|
|
|
return
|