From f2fff47d22645342c38c82e4f16e8abe006dc80c Mon Sep 17 00:00:00 2001 From: Mo Date: Tue, 2 Apr 2024 17:43:51 +0200 Subject: [PATCH] minor issues in doc --- src/evaluation_system/api/parameters.py | 2 +- src/evaluation_system/api/plugin.py | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/evaluation_system/api/parameters.py b/src/evaluation_system/api/parameters.py index 9c2b8700..84185d9f 100644 --- a/src/evaluation_system/api/parameters.py +++ b/src/evaluation_system/api/parameters.py @@ -1117,7 +1117,7 @@ class MyPlugin(plugin.PluginAbstract): parameters.SelectField( name="options", default="first", - options={1: "first", 2: "second"} + options={1: "first", 2: "second"}, help="Select from options", ), ) diff --git a/src/evaluation_system/api/plugin.py b/src/evaluation_system/api/plugin.py index 945954cb..7def4c87 100644 --- a/src/evaluation_system/api/plugin.py +++ b/src/evaluation_system/api/plugin.py @@ -111,28 +111,31 @@ class MyPlugin(plugin.PluginAbstract): __parameters__ = parameters.ParameterDictionary( parameters.Integer( name="count", - default=1, + default=5, help=("This is an optional configurable " "int variable named number without " "default value and this description") ), parameters.Float( name="number", + default=6.4, mandatory=True, help="Required float value without default" ), parameters.Bool( name="overwrite", - default=False, + default=True, help=("a boolean parameter " "with default value of false") ), - parameters.String(name='str') + parameters.String( + name='name', + default='Test',) ) def run_tool( self, config_dict: dict[str, str|int|bool] ) -> None: - '''Definition of the tool the is running the cli. + '''Definition of the tool that runs the cli. Parameters: ----------- @@ -143,7 +146,7 @@ def run_tool( self.call( ( f"cli/calculate -c {config_dict['count']} " - f"-n {config_dict['number']} --name={config_dict['name']} + f"-n {config_dict['number']} --name={config_dict['name']}" ) ) print("MyPlugin was run with", config_dict) @@ -163,7 +166,7 @@ def run_tool( ``/mnt/freva/plugins/my_plugin/plugin_module.py``), you would tell the system how to find the plugin by issuing the following command (bash & co):: - export EVALUATION_SYSTEM_PLUGINS=/mnt/freva/plugins/my_plugin,plugin + export EVALUATION_SYSTEM_PLUGINS=/mnt/freva/plugins/my_plugin,plugin_module Use a colon to separate multiple items::