Skip to content

Commit 42a18a5

Browse files
authored
Merge branch 'main' into ngio_02
2 parents 80bc87c + 646b348 commit 42a18a5

File tree

8 files changed

+11
-29
lines changed

8 files changed

+11
-29
lines changed

.github/workflows/build_and_test.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ jobs:
4242
- name: Install some testing dependencies (hard-coded)
4343
run: python -m pip install pytest pytest-cov devtools jsonschema requests wget pooch
4444

45-
- name: Regenerate the manifest
46-
run: python src/fractal_helper_tasks/dev/create_manifest.py
47-
4845
- name: Cache Pooch folder
4946
id: cache-pooch-folder
5047
uses: actions/cache@v3
@@ -53,13 +50,7 @@ jobs:
5350
key: pooch-cache
5451

5552
- name: Check if manifest has changed
56-
run: |
57-
if [ -n "$(git diff --exit-code ./src/fractal_helper_tasks/__FRACTAL_MANIFEST__.json)" ]; then
58-
echo "__FRACTAL_MANIFEST__.json has changed. Please run 'python src/fractal_helper_tasks/dev/create_manifest.py' and commit the changes."
59-
exit 1
60-
else
61-
echo "__FRACTAL_MANIFEST__.json has not changed."
62-
fi
53+
run: fractal-manifest check --package fractal-helper-tasks
6354

6455
- name: Test tasks with pytest
6556
run: pytest --color=yes --cov --cov-report=xml --cov-report=term-missing -s --log-cli-level debug

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ authors = [
2828
requires-python = ">=3.11"
2929
dependencies = [
3030
"ngio>=0.2.2,<0.3.0",
31+
"fractal-task-tools==0.0.12",
3132
]
3233

3334
# Optional dependencies (e.g. for `pip install -e ".[dev]"`, see

src/fractal_helper_tasks/__FRACTAL_MANIFEST__.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"Singleton time dimension"
1111
],
1212
"docs_info": "### Purpose\n- Removes a **singleton time (T) dimension** from an OME-Zarr image. \n- Creates a new OME-Zarr image with updated metadata and dimensions.\n- Optionally overwrites the input image if `overwrite_input` is set to True.\n\n### Outputs\n- A **new Zarr image** without the singleton T-dimension, stored with a configurable suffix. \n\n### Limitations\n- Only processes OME-Zarr images where the **T-axis is the first axis**. \n- Assumes the T-dimension is **singleton**; does not process non-singleton time axes. \n- Does not copy associated **label images** or **ROI tables** to the new Zarr structure. ",
13+
"type": "parallel",
1314
"executable_parallel": "drop_t_dimension.py",
1415
"meta_parallel": {
1516
"cpus_per_task": 2,
@@ -57,6 +58,7 @@
5758
"2D to 3D workflows"
5859
],
5960
"docs_info": "### Purpose\n- Converts a **2D segmentation** image into a **3D segmentation** by replicating the 2D segmentation across Z-slices. \n- Supports OME-Zarr datasets where **2D and 3D images** share the same base name but differ by suffixes. \n- Optionally copies associated ROI tables and adjusts them to align with the replicated Z-dimensions. \n\n### Outputs\n- A **3D segmentation label image** saved with a new name. \n- Updated **ROI tables** adjusted for Z-dimensions (optional). \n\n### Limitations\n- Only supports **same-base 2D and 3D Zarr names**; full flexibility in file names is not yet implemented. \n- Assumes **2D OME-Zarr images** and corresponding 3D images are stored in the same base folder and just differ with a suffix before the .zarr. \n",
61+
"type": "parallel",
6062
"executable_parallel": "convert_2D_segmentation_to_3D.py",
6163
"meta_parallel": {
6264
"cpus_per_task": 2,
@@ -144,6 +146,7 @@
144146
"Many files"
145147
],
146148
"docs_info": "### Purpose\n- Rechunks OME-Zarr to new chunking parameters: Changes whether the array is stored as many small files or few larger files.\n- Optionally applies the same rechunking to label images.\n\n### Outputs\n- A **new Zarr image** that is rechunked.\n",
149+
"type": "parallel",
147150
"executable_parallel": "rechunk_zarr.py",
148151
"meta_parallel": {
149152
"cpus_per_task": 1,

src/fractal_helper_tasks/convert_2D_segmentation_to_3D.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def convert_2D_segmentation_to_3D(
211211

212212

213213
if __name__ == "__main__":
214-
from fractal_tasks_core.tasks._utils import run_fractal_task
214+
from fractal_task_tools.task_wrapper import run_fractal_task
215215

216216
run_fractal_task(
217217
task_function=convert_2D_segmentation_to_3D,

src/fractal_helper_tasks/dev/create_manifest.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/fractal_helper_tasks/dev/task_list.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
"""Fractal Task list for Fractal Helper Tasks."""
22

3-
from fractal_tasks_core.dev.task_models import ParallelTask
3+
from fractal_task_tools.task_models import ParallelTask
44

5+
AUTHORS = "Joel Luethi"
6+
DOCS_LINK = "https://github.com/jluethi/fractal-helper-tasks"
57
TASK_LIST = [
68
ParallelTask(
79
name="Drop T Dimension",

src/fractal_helper_tasks/drop_t_dimension.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def drop_t_dimension(
8686

8787

8888
if __name__ == "__main__":
89-
from fractal_tasks_core.tasks._utils import run_fractal_task
89+
from fractal_task_tools.task_wrapper import run_fractal_task
9090

9191
run_fractal_task(
9292
task_function=drop_t_dimension,

src/fractal_helper_tasks/rechunk_zarr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def rechunk_zarr(
163163

164164

165165
if __name__ == "__main__":
166-
from fractal_tasks_core.tasks._utils import run_fractal_task
166+
from fractal_task_tools.task_wrapper import run_fractal_task
167167

168168
run_fractal_task(
169169
task_function=rechunk_zarr,

0 commit comments

Comments
 (0)