-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
EDIT: The most compelling specific issue is now part of fractal-analytics-platform/fractal-tasks-core#448. This issue is now to track the broader discussion on how to proceed regarding:
- scope setting: which use cases will be supported in fractal-web? Where will this information be documented?
- fractal_tasks_core development: will there be an automated check of scope compliance
- custom task packages: the requirements from point 1 should be made extremely clear
(coming from discussions with @rkpasia)
Consider this task
def task_function(x: Optional[list[str]] = None) -> str:
if x is None:
return "A"
elif len(x) == 0:
return "B"
else:
return "C"which has a different behavior for x=None and x=[]. I think this is a bad practice, and should be avoided.
The reason for this issue comes from fractal-analytics-platform/fractal-web#205. Depending on how we proceed in fractal-web, it's not clear whether setting x=[] will be allowed. In general, it's better to stay on the safe side and make sure that tasks are robust.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
TODO