operations
anom_processing.example
Documentation
A very simple example module; concatenate two strings.
The purpose of this modules is to show the main elements
of a [KiaraModule][kiara.modules.KiaraModule]:
• the (optional) configuration class: must inherit from
[KiaraModuleConfig][kiara.modules.KiaraModuleConfig],
and the config class must be set as the _config_cls
attribute on the KiaraModule class. Configuration
values can be retrieved via the
[self.get_config_value(key)][kiara.modules.KiaraModu…
method
• the inputs description: must return a dictionary,
containing the input name(s) as keys, and another
dictionary containing type_name information and
documentation about the input data as value
• the outputs description: must return a dictionary,
containing the output name(s) as keys, and another
dictionary containing type_name information and
documentation about the output data as value
• the process method: this is where the actual work
gets done. Input data can be accessed via
inputs.get_value_data(key), results can be set with
the outputs.set_value(key, value) method
Example:
This example module can be tested on the commandline
with the ``kiara run`` command:
```
kiara run core_types.example text_1="xxx" text_2="yyy"
```
Author(s)
Mariella De Crouy mariella.decrouychanel@uni.lu
Context
Tags anom_processing
Labels package: kiara_plugin.anom_processing
References source_repo:
https://github.com/DHARPA-Project/kiara_pl…
documentation:
https://DHARPA-Project.github.io/kiara_plu…
Operation details
Documentation A very simple example module;
concatenate two strings.
The purpose of this modules is to show
the main elements of a [`KiaraModule`]:
- ***the (optional) configuration
class***: must inherit from
[`KiaraModuleConfig`], and the config
class must be set as the `_config_cls`
attribute
on the `KiaraModule` class.
Configuration values can be retrieved
via the [`self.get_config_value(key)`]
method
- ***the inputs description***: must
return a dictionary, containing the
input name(s) as keys, and another
dictionary containing type_name
information
and documentation about the input
data as value
- ***the outputs description***: must
return a dictionary, containing the
output name(s) as keys, and another
dictionary containing type_name
information
and documentation about the output
data as value
- ***the ``process`` method***: this is
where the actual work gets done. Input
data can be accessed via
``inputs.get_value_data(key)``, results
can be set with the
``outputs.set_value(key, value)`` method
Example:
This example module can be tested on
the commandline with the ``kiara run``
command:
```
kiara run core_types.example
text_1="xxx" text_2="yyy"
```
Inputs
field
name type desc… Req… Defa…
──────────────────────────────────────
text_ stri… The yes -- no
1 first defa…
text. --
text_ stri… The yes -- no
2 seco… defa…
text. --
Outputs
field name type description
──────────────────────────────────────
text string The
concatenated
text.