pepkit / pipestat

Pipeline results reporting package
https://pep.databio.org/pipestat/
BSD 2-Clause "Simplified" License
4 stars 2 forks source link

Check if required fields are checked if they actually required #170

Closed khoroshevskyi closed 3 months ago

khoroshevskyi commented 4 months ago

Write a test and check if required pipeline fields are actually required

nsheff commented 4 months ago

Can you clarify this issue? I can't understand it based on the comment fragment.

khoroshevskyi commented 3 months ago

I don't remember exactly what was that. But I think that pipestat doesn't show error or doesn't show what keys and values are missing. e.g. result id is a file. File is a dict with 2 fields: {name: ..., path: ...} . Two of this fields are required! But user provided only name. Pipestat won't fail, or won't show where is the issue.

donaldcampbelljr commented 3 months ago

The backends raise SchemaValidationErrorDuringReport:

E               pipestat.exceptions.SchemaValidationErrorDuringReport: 'path' is a required property
E               
E               Failed validating 'required' in schema:
E                   {'description': 'This a path to the output image',
E                    'object_type': 'image',
E                    'properties': {'path': {'type': 'string'},
E                                   'thumbnail_path': {'type': 'string'},
E                                   'title': {'type': 'string'}},
E                    'required': ['path', 'thumbnail_path', 'title'],
E                    'type': 'object'}
E               
E               On instance:
E                   {'thumbnail_path': 'thumbnail_path_string', 'title': 'title_string'}
E               Record identifier constant_record_id 
E               Result_identifier {'description': 'This a path to the output image', 'type': 'object', 'object_type': 'image', 'properties': {'path': {'type': 'string'}, 'thumbnail_path': {'type': 'string'}, 'title': {'type': 'string'}}, 'required': ['path', 'thumbnail_path', 'title']} 
E               Reported result: {'thumbnail_path': 'thumbnail_path_string', 'title': 'title_string'}

And it reports the problematic field, and the associated record_identifier, and result_identifier. So, I don't think this is actually still an issue.