fractal-analytics-platform / fractal-tasks-core

Main tasks for the Fractal analytics platform
https://fractal-analytics-platform.github.io/fractal-tasks-core/
BSD 3-Clause "New" or "Revised" License
14 stars 6 forks source link

Fail fast for overwrite-related errors in cellpose/napari-workflows tasks #505

Open tcompa opened 11 months ago

tcompa commented 11 months ago

(branching from #491 and #499, since this issue has lower priority)

For cellpose/napari-workflows, we should try to fail as early as possible if overwrite=False and some output already exists.

For instance we could:

  1. Verify that prepare_label_group is always called before actual processing.
  2. Perform some parts of the write_table checks before actual processing. Should we split write_table into prepare_table_group and write_table? I'm not sure yet that the additional complexity is worth it.. Maybe we can simply have a preliminary_check_for_write_table (random name..) function, and keep write_table as is. TBD.
jluethi commented 11 months ago

Good point. I'd prefer the preliminary_check_for_write_table option over splitting write_table :)