DHARPA-Project / kiara

Data orchestration and management.
Mozilla Public License 2.0
11 stars 2 forks source link

Bad function definition in modules fails silently #27

Closed stakats closed 2 years ago

stakats commented 2 years ago

When defining input function with create_input_schema instead of create_inputs_schema, kiara won't register the module but also does not provide any warning, even when DEBUG=true. Same issue with outputs.

makkus commented 2 years ago

Hm, I think there should be a debug log for cases like this, but it's probably easy to miss. I get something like:

2022-06-30 10:06.48 [debug    ] ignore.subclass                base_class=<class 'kiara.modules.KiaraModule'> reason=subclass is abstract sub_class=<class 'kiara_plugin.develop.develop.ExampleModule'>

I can look into ways to make it more explicit for when KiaraModule classes are concerned I guess, but it's kinda hard to do, because in some cases this is not a bug because the class you implement might be meant as an abstract class. I don't want to explicitly test for the old function names if I can avoid it, because I think there should not be (m)any in existence, I can only test for KiaraModule classes that miss one of the required methods. Need to think about what could be done...

makkus commented 2 years ago

This should be fixed now with the addition of the 'develop-mode' in the latest version of kiara. That mode can be enabled by setting the DEV environment variable to true (or a profile name, like for example full -- this will be documented), something like:

export DEV=true
kiara run logic.xor a=true b=true

or

DEV=true kiara run logic.xor a=true b=true
DEV=full kiara run logic.xor a=true b=true