There is a non-trivial requirement if you would like to use the functionality of loading magda's pipeline from the config file. Every madga Module.Runtime has to be registered with ModuleFactory.register function. A convenient alternative to do that is using @register decorator. However, this @register decorator has to be invoked somehow before loading the pipeline. A very easy workaround for this is to import all modules that you have implemented with one line of import:
This assumes that you imported all modules in modules/__init__.py file.
I propose to add two small changes. First one is to mention this suggestion in the documentation here or in this section. The second thing that could be very useful is to change the error message by adding a question: 'Didn't you forget to import this module with @register decorator?'
There is a non-trivial requirement if you would like to use the functionality of loading magda's pipeline from the config file. Every
madga Module.Runtimehas to be registered withModuleFactory.registerfunction. A convenient alternative to do that is using@registerdecorator. However, this@registerdecorator has to be invoked somehow before loading the pipeline. A very easy workaround for this is to import all modules that you have implemented with one line of import:This assumes that you imported all modules in
modules/__init__.pyfile.I propose to add two small changes. First one is to mention this suggestion in the documentation here or in this section. The second thing that could be very useful is to change the error message by adding a question: 'Didn't you forget to import this module with
@registerdecorator?'