From 9648594650da1d4074187fb72824dbba02fd9949 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:21:53 +0200 Subject: [PATCH 1/6] Add `fractal-task-tools` dependency --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 382698d..fdaeef1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -118,3 +118,4 @@ docstring_parser = "==0.15" ilastik-core = ">=1.4.2a1,<2" vigra = ">=1.12.1,<2" fractal-tasks-core = "==1.4.3" +fractal-task-tools = "==0.0.12" From 971cd28bf65e47d040cb440da44d7daef85396aa Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:22:41 +0200 Subject: [PATCH 2/6] Update `dev` folder --- src/ilastik_tasks/dev/create_manifest.py | 9 --------- src/ilastik_tasks/dev/task_list.py | 5 ++++- 2 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 src/ilastik_tasks/dev/create_manifest.py diff --git a/src/ilastik_tasks/dev/create_manifest.py b/src/ilastik_tasks/dev/create_manifest.py deleted file mode 100644 index 9b15f5e..0000000 --- a/src/ilastik_tasks/dev/create_manifest.py +++ /dev/null @@ -1,9 +0,0 @@ -"""Generate JSON schemas for task arguments.""" - -from fractal_tasks_core.dev.create_manifest import create_manifest - -if __name__ == "__main__": - PACKAGE = "ilastik_tasks" - AUTHORS = "Lorenzo Cerrone" - docs_link = "https://github.com/fractal-analytics-platform/fractal-ilastik-tasks" - create_manifest(package=PACKAGE, authors=AUTHORS, docs_link=docs_link) diff --git a/src/ilastik_tasks/dev/task_list.py b/src/ilastik_tasks/dev/task_list.py index 7a4a76c..be5a9f1 100644 --- a/src/ilastik_tasks/dev/task_list.py +++ b/src/ilastik_tasks/dev/task_list.py @@ -1,6 +1,9 @@ """Contains the list of tasks available to fractal.""" -from fractal_tasks_core.dev.task_models import ParallelTask +from fractal_task_tools.task_models import ParallelTask + +AUTHORS = "Lorenzo Cerrone" +DOCS_LINK = "https://github.com/fractal-analytics-platform/fractal-ilastik-tasks" TASK_LIST = [ ParallelTask( From 9aa8434aa11c691f1122be98d3d2ea5de7c28568 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:22:54 +0200 Subject: [PATCH 3/6] Update GHA --- .github/workflows/build_and_test.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 6a05e36..8be76a2 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -31,18 +31,9 @@ jobs: with: pixi-version: v0.44.0 - - name: re-create manifest - run: pixi run -e dev python src/ilastik_tasks/dev/create_manifest.py - - name: Check if manifest has changed - run: | - if [ -n "$(git diff --exit-code ./src/ilastik_tasks/__FRACTAL_MANIFEST__.json)" ]; then - echo "__FRACTAL_MANIFEST__.json has changed. Please run 'python src/ilastik_tasks/dev/create_manifest.py' and commit the changes." - exit 1 - else - echo "__FRACTAL_MANIFEST__.json has not changed." - fi - + run: pixi run fractal-manifest check --package ilastik-tasks + - name: Run tests run: pixi run -e dev pytest From 17eda576b00a8a714618dfb7c52079d6fc971bcb Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:23:07 +0200 Subject: [PATCH 4/6] Use new task wrapper --- src/ilastik_tasks/ilastik_pixel_classification_segmentation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ilastik_tasks/ilastik_pixel_classification_segmentation.py b/src/ilastik_tasks/ilastik_pixel_classification_segmentation.py index 924f6e0..8e67980 100644 --- a/src/ilastik_tasks/ilastik_pixel_classification_segmentation.py +++ b/src/ilastik_tasks/ilastik_pixel_classification_segmentation.py @@ -576,7 +576,7 @@ def check_ilastik_model_channels(shell) -> int: 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=ilastik_pixel_classification_segmentation, From c93025dda2828ef6b6322d56703242a8fd503981 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:23:15 +0200 Subject: [PATCH 5/6] Re-create manifest --- src/ilastik_tasks/__FRACTAL_MANIFEST__.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ilastik_tasks/__FRACTAL_MANIFEST__.json b/src/ilastik_tasks/__FRACTAL_MANIFEST__.json index 9f8f0d2..5513a42 100644 --- a/src/ilastik_tasks/__FRACTAL_MANIFEST__.json +++ b/src/ilastik_tasks/__FRACTAL_MANIFEST__.json @@ -8,6 +8,7 @@ "Pixel Classifier" ], "docs_info": "### Purpose\n\nThis task is used to apply a ilastik pixel classifier to an image.\n\n### Outputs\n\n- The `ilastik_pixel_classification_segmentation`: Generates a new label image named `output_label_name`.\n\n### Limitations\n\n- The task can only be used with single and dual channels pixel classifiers models.", + "type": "parallel", "executable_parallel": "ilastik_pixel_classification_segmentation.py", "meta_parallel": { "cpus_per_task": 8, From b0d34887bc954594e882be729ebc2447e0f168a6 Mon Sep 17 00:00:00 2001 From: Tommaso Comparin <3862206+tcompa@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:25:38 +0200 Subject: [PATCH 6/6] Switch to `fractal-tasks-core` 1.5.3 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fdaeef1..74b669f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -117,5 +117,5 @@ pydantic = "==2.8.2" docstring_parser = "==0.15" ilastik-core = ">=1.4.2a1,<2" vigra = ">=1.12.1,<2" -fractal-tasks-core = "==1.4.3" +fractal-tasks-core = "==1.5.3" fractal-task-tools = "==0.0.12"