NeuroSYS-pl/magda

Support custom pipeline name in ConfigReader

jamebs opened this issue · 0 comments

What?
We would like to provide a custom name for pipelines created by ConfigReader (via code or configuration file).

Why?
Currently, only pipelines created manually can have a defined name.

How?

  1. By handling the name provided in the configuration file:
name: MyPipeline
modules: ...
groups: ...
shared_parameters: ...

In the above example, the pipeline will be called MyPipeline.

  1. By handling the name provided as an argument for ConfigReader:
with open(config_file, 'r') as config:
    self.pipeline = await ConfigReader.read(
        config,
        ModuleFactory,
        name="SuperPipeline",
        **rest_kwargs,
    )

In the above example, the pipeline will be called SuperPipeline.

  1. In case the names are provided both in the configuration file and as an argument, the name given as an argument has higher priority. So in the above example, the name SuperPipeline will be used instead MyPipeline.