Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ jobs:
- name: Install some testing dependencies (hard-coded)
run: python -m pip install pytest pytest-cov devtools jsonschema requests wget pooch

- name: Regenerate the manifest
run: python src/fractal_helper_tasks/dev/create_manifest.py

- name: Cache Pooch folder
id: cache-pooch-folder
uses: actions/cache@v3
Expand All @@ -53,13 +50,7 @@ jobs:
key: pooch-cache

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

- name: Test tasks with pytest
run: pytest --color=yes --cov --cov-report=xml --cov-report=term-missing -s --log-cli-level debug
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ authors = [
# Required Python version and dependencies
requires-python = ">=3.10"
dependencies = [
"fractal-tasks-core==1.4.2","ngio==0.1.6",
"fractal-tasks-core==1.4.2",
"ngio==0.1.6",
"fractal-task-tools==0.0.12",
]

# Optional dependencies (e.g. for `pip install -e ".[dev]"`, see
Expand Down
3 changes: 3 additions & 0 deletions src/fractal_helper_tasks/__FRACTAL_MANIFEST__.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"Singleton time dimension"
],
"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. ",
"type": "parallel",
"executable_parallel": "drop_t_dimension.py",
"meta_parallel": {
"cpus_per_task": 2,
Expand Down Expand Up @@ -57,6 +58,7 @@
"2D to 3D workflows"
],
"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",
"type": "parallel",
"executable_parallel": "convert_2D_segmentation_to_3D.py",
"meta_parallel": {
"cpus_per_task": 2,
Expand Down Expand Up @@ -144,6 +146,7 @@
"Many files"
],
"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",
"type": "parallel",
"executable_parallel": "rechunk_zarr.py",
"meta_parallel": {
"cpus_per_task": 1,
Expand Down
2 changes: 1 addition & 1 deletion src/fractal_helper_tasks/convert_2D_segmentation_to_3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def convert_2D_segmentation_to_3D(


if __name__ == "__main__":
from fractal_tasks_core.tasks._utils import run_fractal_task
from fractal_task_tools.task_wrapper import run_fractal_task

run_fractal_task(
task_function=convert_2D_segmentation_to_3D,
Expand Down
15 changes: 0 additions & 15 deletions src/fractal_helper_tasks/dev/create_manifest.py

This file was deleted.

4 changes: 3 additions & 1 deletion src/fractal_helper_tasks/dev/task_list.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
"""Fractal Task list for Fractal Helper Tasks."""

from fractal_tasks_core.dev.task_models import ParallelTask
from fractal_task_tools.task_models import ParallelTask

AUTHORS = "Joel Luethi"
DOCS_LINK = "https://github.com/jluethi/fractal-helper-tasks"
TASK_LIST = [
ParallelTask(
name="Drop T Dimension",
Expand Down
2 changes: 1 addition & 1 deletion src/fractal_helper_tasks/drop_t_dimension.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def drop_t_dimension(


if __name__ == "__main__":
from fractal_tasks_core.tasks._utils import run_fractal_task
from fractal_task_tools.task_wrapper import run_fractal_task

run_fractal_task(
task_function=drop_t_dimension,
Expand Down
2 changes: 1 addition & 1 deletion src/fractal_helper_tasks/rechunk_zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def rechunk_zarr(


if __name__ == "__main__":
from fractal_tasks_core.tasks._utils import run_fractal_task
from fractal_task_tools.task_wrapper import run_fractal_task

run_fractal_task(
task_function=rechunk_zarr,
Expand Down