|
22 | 22 | import pandas as pd
|
23 | 23 | import zarr
|
24 | 24 | from napari_workflows._io_yaml_v1 import load_workflow
|
25 |
| -from pydantic.decorator import validate_arguments |
| 25 | +from pydantic.v1.decorator import validate_arguments |
26 | 26 |
|
27 | 27 | import fractal_tasks_core
|
28 | 28 | from fractal_tasks_core.channels import get_channel_from_image_zarr
|
@@ -208,7 +208,7 @@ def napari_workflows_wrapper(
|
208 | 208 | if image_inputs:
|
209 | 209 | img_array = da.from_zarr(f"{zarr_url}/{level}")
|
210 | 210 | # Loop over image inputs and assign corresponding channel of the image
|
211 |
| - for (name, params) in image_inputs: |
| 211 | + for name, params in image_inputs: |
212 | 212 | channel = get_channel_from_image_zarr(
|
213 | 213 | image_zarr_path=zarr_url,
|
214 | 214 | wavelength_id=params.channel.wavelength_id,
|
@@ -261,7 +261,7 @@ def napari_workflows_wrapper(
|
261 | 261 | upscale_labels = True
|
262 | 262 | # Loop over label inputs and load corresponding (upscaled) image
|
263 | 263 | input_label_arrays = {}
|
264 |
| - for (name, params) in label_inputs: |
| 264 | + for name, params in label_inputs: |
265 | 265 | label_name = params.label_name
|
266 | 266 | label_array_raw = da.from_zarr(
|
267 | 267 | f"{zarr_url}/labels/{label_name}/{level}"
|
@@ -393,7 +393,7 @@ def napari_workflows_wrapper(
|
393 | 393 |
|
394 | 394 | # Loop over label outputs and (1) set zattrs, (2) create zarr group
|
395 | 395 | output_label_zarr_groups: dict[str, Any] = {}
|
396 |
| - for (name, out_params) in label_outputs: |
| 396 | + for name, out_params in label_outputs: |
397 | 397 |
|
398 | 398 | # (1a) Rescale OME-NGFF datasets (relevant for level>0)
|
399 | 399 | if not ngff_image_meta.multiscale.axes[0].name == "c":
|
@@ -467,7 +467,7 @@ def napari_workflows_wrapper(
|
467 | 467 | if out_params.type == "dataframe"
|
468 | 468 | ]
|
469 | 469 | output_dataframe_lists: dict[str, list] = {}
|
470 |
| - for (name, out_params) in dataframe_outputs: |
| 470 | + for name, out_params in dataframe_outputs: |
471 | 471 | output_dataframe_lists[name] = []
|
472 | 472 | logger.info(f"Prepared output with {name=} and {out_params=}")
|
473 | 473 | logger.info(f"{output_dataframe_lists=}")
|
@@ -581,7 +581,7 @@ def napari_workflows_wrapper(
|
581 | 581 |
|
582 | 582 | # Output handling: "dataframe" type (for each output, concatenate ROI
|
583 | 583 | # dataframes, clean up, and store in a AnnData table on-disk)
|
584 |
| - for (name, out_params) in dataframe_outputs: |
| 584 | + for name, out_params in dataframe_outputs: |
585 | 585 | table_name = out_params.table_name
|
586 | 586 | # Concatenate all FOV dataframes
|
587 | 587 | list_dfs = output_dataframe_lists[name]
|
@@ -617,7 +617,7 @@ def napari_workflows_wrapper(
|
617 | 617 |
|
618 | 618 | # Output handling: "label" type (for each output, build and write to disk
|
619 | 619 | # pyramid of coarser levels)
|
620 |
| - for (name, out_params) in label_outputs: |
| 620 | + for name, out_params in label_outputs: |
621 | 621 | label_name = out_params.label_name
|
622 | 622 | build_pyramid(
|
623 | 623 | zarrurl=f"{zarr_url}/labels/{label_name}",
|
|
0 commit comments