Repository: fractal-analytics-platform/fractal-client (language: python)

Issue:
Rename image_labeling task in examples
Ref https://github.com/fractal-analytics-platform/fractal-tasks-core/commit/166a97b7b8b8c98afcb6a2fed2644a1263e2f8a6 (now available in `fractal-tasks-core 0.2.3`).


Discussion / hints:

Fix patch:
diff --git a/examples/01_cardio_tiny_dataset/define_and_apply_workflow.sh b/examples/01_cardio_tiny_dataset/define_and_apply_workflow.sh
index 87693e7cb..46e050773 100644
--- a/examples/01_cardio_tiny_dataset/define_and_apply_workflow.sh
+++ b/examples/01_cardio_tiny_dataset/define_and_apply_workflow.sh
@@ -51,7 +51,7 @@ $CMD task add-subtask $WF_ID "Create OME-ZARR structure" --args-file ${TMPDIR}/a
 $CMD task add-subtask $WF_ID "Yokogawa to Zarr"
 
 echo "{\"labeling_level\": 4, \"executor\": \"gpu\"}" > ${TMPDIR}/args_labeling.json
-$CMD task add-subtask $WF_ID "Per-FOV image labeling" --args-file ${TMPDIR}/args_labeling.json
+$CMD task add-subtask $WF_ID "Cellpose Segmentation" --args-file ${TMPDIR}/args_labeling.json
 
 $CMD task add-subtask $WF_ID "Replicate Zarr structure"
 
diff --git a/examples/02_cardio_tiny_dataset_with_gpu/define_and_apply_workflow.sh b/examples/02_cardio_tiny_dataset_with_gpu/define_and_apply_workflow.sh
index feae78b93..b840626b8 100644
--- a/examples/02_cardio_tiny_dataset_with_gpu/define_and_apply_workflow.sh
+++ b/examples/02_cardio_tiny_dataset_with_gpu/define_and_apply_workflow.sh
@@ -51,7 +51,7 @@ $CMD task add-subtask $WF_ID "Create OME-ZARR structure" --args-file ${TMPDIR}/a
 $CMD task add-subtask $WF_ID "Yokogawa to Zarr"
 
 echo "{\"labeling_level\": 1, \"executor\": \"gpu\"}" > ${TMPDIR}/args_labeling.json
-$CMD task add-subtask $WF_ID "Per-FOV image labeling" --args-file ${TMPDIR}/args_labeling.json
+$CMD task add-subtask $WF_ID "Cellpose Segmentation" --args-file ${TMPDIR}/args_labeling.json
 
 $CMD task add-subtask $WF_ID "Replicate Zarr structure"
 
diff --git a/examples/03_cardio_dataset_one_2x2_well_3_channels_10_Z/define_and_apply_workflow.sh b/examples/03_cardio_dataset_one_2x2_well_3_channels_10_Z/define_and_apply_workflow.sh
index da1d9fdc5..492278d97 100644
--- a/examples/03_cardio_dataset_one_2x2_well_3_channels_10_Z/define_and_apply_workflow.sh
+++ b/examples/03_cardio_dataset_one_2x2_well_3_channels_10_Z/define_and_apply_workflow.sh
@@ -50,7 +50,7 @@ $CMD task add-subtask $WF_ID "Create OME-ZARR structure" --args-file ${TMPDIR}/a
 $CMD task add-subtask $WF_ID "Yokogawa to Zarr"
 
 echo "{\"labeling_level\": 3, \"executor\": \"gpu\"}" > ${TMPDIR}/args_labeling.json
-$CMD task add-subtask $WF_ID "Per-FOV image labeling" --args-file ${TMPDIR}/args_labeling.json
+$CMD task add-subtask $WF_ID "Cellpose Segmentation" --args-file ${TMPDIR}/args_labeling.json
 
 $CMD task add-subtask $WF_ID "Replicate Zarr structure"
 
diff --git a/examples/04_cardio_multiwell/define_and_apply_workflow.sh b/examples/04_cardio_multiwell/define_and_apply_workflow.sh
index 481b32cd6..76ff6c9a6 100644
--- a/examples/04_cardio_multiwell/define_and_apply_workflow.sh
+++ b/examples/04_cardio_multiwell/define_and_apply_workflow.sh
@@ -52,7 +52,7 @@ $CMD task add-subtask $WF_ID $SUBTASK_ID --args-file ${TMPDIR}/args_create.json
 SUBTASK_ID=`$CMD_CORE_TASKS "Yokogawa to Zarr"`
 $CMD task add-subtask $WF_ID $SUBTASK_ID
 
-SUBTASK_ID=`$CMD_CORE_TASKS "Per-FOV image labeling"`
+SUBTASK_ID=`$CMD_CORE_TASKS "Cellpose Segmentation"`
 echo "{\"labeling_level\": 1, \"executor\": \"gpu\"}" > ${TMPDIR}/args_labeling.json
 $CMD task add-subtask $WF_ID $SUBTASK_ID --args-file ${TMPDIR}/args_labeling.json
 
diff --git a/examples/05_cardio_10wells/define_and_apply_workflow.sh b/examples/05_cardio_10wells/define_and_apply_workflow.sh
index 35ea45b86..82e837c8e 100644
--- a/examples/05_cardio_10wells/define_and_apply_workflow.sh
+++ b/examples/05_cardio_10wells/define_and_apply_workflow.sh
@@ -54,7 +54,7 @@ $CMD task add-subtask $WF_ID $SUBTASK_ID --args-file ${TMPDIR}/args_create.json
 SUBTASK_ID=`$CMD_CORE_TASKS "Yokogawa to Zarr"`
 $CMD task add-subtask $WF_ID $SUBTASK_ID
 
-#SUBTASK_ID=`$CMD_CORE_TASKS "Per-FOV image labeling"`
+#SUBTASK_ID=`$CMD_CORE_TASKS "Cellpose Segmentation"`
 #echo "{\"labeling_level\": 1, \"executor\": \"gpu\"}" > ${TMPDIR}/args_labeling.json
 #$CMD task add-subtask $WF_ID $SUBTASK_ID --args-file ${TMPDIR}/args_labeling.json
 
diff --git a/examples/07_cardio_1well_9x8/define_and_apply_workflow.sh b/examples/07_cardio_1well_9x8/define_and_apply_workflow.sh
index ff6ba2e98..c503e9296 100644
--- a/examples/07_cardio_1well_9x8/define_and_apply_workflow.sh
+++ b/examples/07_cardio_1well_9x8/define_and_apply_workflow.sh
@@ -54,7 +54,7 @@ $CMD task add-subtask $WF_ID $SUBTASK_ID --args-file ${TMPDIR}/args_create.json
 SUBTASK_ID=`$CMD_CORE_TASKS "Yokogawa to Zarr"`
 $CMD task add-subtask $WF_ID $SUBTASK_ID
 
-#SUBTASK_ID=`$CMD_CORE_TASKS "Per-FOV image labeling"`
+#SUBTASK_ID=`$CMD_CORE_TASKS "Cellpose Segmentation"`
 #echo "{\"labeling_level\": 1, \"executor\": \"gpu\"}" > ${TMPDIR}/args_labeling.json
 #$CMD task add-subtask $WF_ID $SUBTASK_ID --args-file ${TMPDIR}/args_labeling.json
 
diff --git a/examples/08_cardio_2x2_dataset_processing_zenodo/run_fractal_demo.sh b/examples/08_cardio_2x2_dataset_processing_zenodo/run_fractal_demo.sh
index 40be6a1a1..bf967a8e8 100755
--- a/examples/08_cardio_2x2_dataset_processing_zenodo/run_fractal_demo.sh
+++ b/examples/08_cardio_2x2_dataset_processing_zenodo/run_fractal_demo.sh
@@ -68,7 +68,7 @@ SUBTASK_ID=`$CMD_CORE_TASKS "Maximum Intensity Projection"`
 echo "{\"executor\": \"cpu-mid\"}" > ${TMPDIR}/args_mip.json
 fractal task add-subtask $WF_ID $SUBTASK_ID --args-file ${TMPDIR}/args_mip.json
 
-SUBTASK_ID=`$CMD_CORE_TASKS "Per-FOV image labeling"`
+SUBTASK_ID=`$CMD_CORE_TASKS "Cellpose Segmentation"`
 echo "{\"labeling_level\": 2, \"executor\": \"cpu-mid\", \"ROI_table_name\": \"well_ROI_table\"}" > ${TMPDIR}/args_labeling.json
 fractal task add-subtask $WF_ID $SUBTASK_ID --args-file ${TMPDIR}/args_labeling.json
 
@@ -78,4 +78,3 @@ fractal task add-subtask $WF_ID $SUBTASK_ID --args-file ${TMPDIR}/args_measureme
 
 # Apply workflow
 fractal task apply $PRJ_ID $DS_IN_ID $DS_OUT_ID $WF_ID
-
diff --git a/examples/09_search_first_1_well_15_fields_20_planes/define_and_apply_workflow.sh b/examples/09_search_first_1_well_15_fields_20_planes/define_and_apply_workflow.sh
index dfbae8543..5f863c896 100755
--- a/examples/09_search_first_1_well_15_fields_20_planes/define_and_apply_workflow.sh
+++ b/examples/09_search_first_1_well_15_fields_20_planes/define_and_apply_workflow.sh
@@ -66,7 +66,7 @@ SUBTASK_ID=`$CMD_CORE_TASKS "Maximum Intensity Projection"`
 echo "{\"executor\": \"cpu-mid\"}" > ${TMPDIR}/args_mip.json
 $CMD task add-subtask $WF_ID $SUBTASK_ID --args-file ${TMPDIR}/args_mip.json
 
-SUBTASK_ID=`$CMD_CORE_TASKS "Per-FOV image labeling"`
+SUBTASK_ID=`$CMD_CORE_TASKS "Cellpose Segmentation"`
 echo "{\"labeling_level\": 3, \"executor\": \"cpu-mid\", \"ROI_table_name\": \"well_ROI_table\", \"diameter_level0\": 1200.0, \"cellprob_threshold\": -1.0, \"flow_threshold\":  0.6}" > ${TMPDIR}/args_labeling.json
 $CMD task add-subtask $WF_ID $SUBTASK_ID --args-file ${TMPDIR}/args_labeling.json
 
diff --git a/examples/12_23_well_cardiomyocytes/define_and_apply_workflow.sh b/examples/12_23_well_cardiomyocytes/define_and_apply_workflow.sh
index 97314cf5f..f392a4d7a 100755
--- a/examples/12_23_well_cardiomyocytes/define_and_apply_workflow.sh
+++ b/examples/12_23_well_cardiomyocytes/define_and_apply_workflow.sh
@@ -67,7 +67,7 @@ SUBTASK_ID=`$CMD_CORE_TASKS "Maximum Intensity Projection"`
 echo "{\"executor\": \"cpu-mid\"}" > ${TMPDIR}/args_mip.json
 $CMD task add-subtask $WF_ID $SUBTASK_ID --args-file ${TMPDIR}/args_mip.json
 
-SUBTASK_ID=`$CMD_CORE_TASKS "Per-FOV image labeling"`
+SUBTASK_ID=`$CMD_CORE_TASKS "Cellpose Segmentation"`
 echo "{\"labeling_level\": 2, \"executor\": \"cpu-high\", \"ROI_table_name\": \"well_ROI_table\"}" > ${TMPDIR}/args_labeling.json
 $CMD task add-subtask $WF_ID $SUBTASK_ID --args-file ${TMPDIR}/args_labeling.json
 
diff --git a/examples/13_zenodo_3D_Segmentation/run_fractal_demo.sh b/examples/13_zenodo_3D_Segmentation/run_fractal_demo.sh
index 58959b8b6..a4e4777f9 100755
--- a/examples/13_zenodo_3D_Segmentation/run_fractal_demo.sh
+++ b/examples/13_zenodo_3D_Segmentation/run_fractal_demo.sh
@@ -67,7 +67,7 @@ echo "{\"executor\": \"cpu-low\"}" > ${TMPDIR}/args_yoko.json
 fractal task add-subtask $WF_ID "Yokogawa to Zarr" > ${TMPDIR}/args_yoko.json
 
 echo "{\"labeling_level\": 1, \"executor\": \"gpu\", \"ROI_table_name\": \"FOV_ROI_table\"}" > ${TMPDIR}/args_labeling_FOV.json
-fractal task add-subtask $WF_ID "Per-FOV image labeling" --args-file ${TMPDIR}/args_labeling_FOV.json
+fractal task add-subtask $WF_ID "Cellpose Segmentation" --args-file ${TMPDIR}/args_labeling_FOV.json
 
 echo "{\"level\": 0, \"measurement_table_name\": \"nuclei_3D\", \"executor\": \"cpu-high\", \"ROI_table_name\": \"FOV_ROI_table\",\"workflow_file\": \"$TMPDIR/../regionprops_from_existing_labels_feature.yaml\"}" > ${TMPDIR}/args_measurement_FOV.json
 fractal task add-subtask $WF_ID "Measurement" --args-file ${TMPDIR}/args_measurement_FOV.json
@@ -84,11 +84,10 @@ echo "{\"executor\": \"cpu-low\"}" > ${TMPDIR}/args_mip.json
 fractal task add-subtask $WF_ID "Maximum Intensity Projection" --args-file ${TMPDIR}/args_mip.json
 
 echo "{\"labeling_level\": 2, \"executor\": \"cpu-low\", \"ROI_table_name\": \"well_ROI_table\"}" > ${TMPDIR}/args_labeling.json
-fractal task add-subtask $WF_ID "Per-FOV image labeling" --args-file ${TMPDIR}/args_labeling.json
+fractal task add-subtask $WF_ID "Cellpose Segmentation" --args-file ${TMPDIR}/args_labeling.json
 
 echo "{\"level\": 0, \"measurement_table_name\": \"nuclei\", \"executor\": \"cpu-low\", \"ROI_table_name\": \"well_ROI_table\",\"workflow_file\": \"$TMPDIR/../regionprops_from_existing_labels_feature.yaml\"}" > ${TMPDIR}/args_measurement.json
 fractal task add-subtask $WF_ID "Measurement" --args-file ${TMPDIR}/args_measurement.json
 
 # Apply workflow
 fractal task apply $PRJ_ID $DS_IN_ID $DS_OUT_ID $WF_ID
-


Test patch:
diff --git a/tests/data/parameters_workflow_on_fake_data/wf_params.json b/tests/data/parameters_workflow_on_fake_data/wf_params.json
deleted file mode 100755
index bdd612fec..000000000
--- a/tests/data/parameters_workflow_on_fake_data/wf_params.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-    "workflow_name": "test_workflow",
-    "dims": [1, 2],
-    "coarsening_xy": 2,
-    "coarsening_z": 1,
-    "num_levels": 2,
-    "channel_file": "tests/data/parameters_workflow_on_fake_data/wf_params_channels.json",
-    "illumination_correction": {
-        "path_dict_corr": "tests/data/parameters_workflow_on_fake_data/wf_params_illumination.json",
-        "overwrite": true,
-        "num_threads": 10
-    },
-    "image_labeling": {
-        "coarsening_xy": 2,
-        "labeling_level": 1,
-        "labeling_channel": "A01_C01",
-        "num_threads": 2,
-        "relabeling": 1,
-        "diameter_level0": 80.0,
-        "cellprob_threshold": 1.0
-    },
-    "image_labeling_whole_well": {
-        "coarsening_xy": 2,
-        "labeling_level": 2,
-        "labeling_channel": "A01_C01",
-        "diameter_level0": 80.0,
-        "cellprob_threshold": -1.5
-    }
-}