pepkit / looper

A job submitter for Portable Encapsulated Projects
http://looper.databio.org
BSD 2-Clause "Simplified" License
20 stars 7 forks source link

validate the output of the pre-submission hooks #319

Closed stolarczyk closed 4 months ago

stolarczyk commented 3 years ago

I think we should also validate the output of the pre-submission hooks. I think it only checks if the class is dict now.

This way the error message can be more informative.

Originally posted by @stolarczyk in https://github.com/pepkit/looper/issues/318#issuecomment-802817157

donaldcampbelljr commented 4 months ago

I added a simple check to see if the json keys are in the looper namespaces (i.e. allowable keys). This is in addition to the checks already in place (checking if its a dict, and during template rendering via jinja_render_template_strictly). Is something else desired?

donaldcampbelljr commented 4 months ago

After this morning's discussion, we decided that we don't want to add the above check because it would create inflexibility for users wishing to create a new namespace (not simply add to existing ones). We decided to instead add the updated namespaces to the debugger to inform the plugin developers. However, I realized we actually are already doing just that: https://github.com/pepkit/looper/blob/ac8cd2b6cdb1d44a507cffdee32e76b184cedeb4/looper/conductor.py#L714

So I will close this issue.