Migrate from legacy¶
- Add
fractal-task-toolsas a required dependency for your task package. -
In the
task_list.pyfile of your package, import task models fromfractal_task_tools.task_models(rather thanfractal_tasks_core.dev.task_models), as infrom fractal_task_tools.task_models import CompoundTask from fractal_task_tools.task_models import NonParallelTask from fractal_task_tools.task_models import ConverterCompoundTask from fractal_task_tools.task_models import ConverterNonParallelTask from fractal_task_tools.task_models import ParallelTask -
If some of your tasks are converters (that is, they create OME-Zarr images but do not take any OME-Zarr image as an input), you can now use one of the new available task types (
ConverterCompoundTaskandConverterNonParallelTask). -
In the
task_list.pyfile of your package, optionally include variables forAUTHORS,DOCS_LINKandINPUT_MODELS(if applicable), as in this example:AUTHORS = "Fractal Core Team" DOCS_LINK = "https://fractal-analytics-platform.github.io/fractal-tasks-core" INPUT_MODELS = [ ["fractal_tasks_core", "channels.py", "OmeroChannel"], ["fractal_tasks_core", "channels.py", "Window"], ["fractal_tasks_core", "channels.py", "ChannelInputModel"], ... ] -
In order to create the manifest for your package and write it to disk (within the root directory of the installed package), use
This command replaces the customfractal-manifest create --package my-fractal-tasks-packagecreate_manifest.pyscript, that you can now delete. -
In order to check that the manifest for your package is up to date (e.g. from within the CI), use
This command replaces the custom logic often included in GitHub Actions, which re-creates the manifest and then run afractal-manifest check --package my-fractal-tasks-packagegit diffto see if it changed. -
For each one of your tasks' modules, replace the
importfromfractal_tasks_core.tasks._utilswithfrom fractal_task_tools.task_wrapper import run_fractal_task