Skip to content

Commit b345ab1

Browse files
committed
Update manifest for Fractal 2.13 server
1 parent 42a18a5 commit b345ab1

File tree

3 files changed

+9
-69
lines changed

3 files changed

+9
-69
lines changed

.github/workflows/build_and_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
key: pooch-cache
5151

5252
- name: Check if manifest has changed
53-
run: fractal-manifest check --package fractal-helper-tasks
53+
run: fractal-manifest check --package fractal-helper-tasks --fractal-server-2-13
5454

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

README.md

Lines changed: 3 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -9,66 +9,9 @@ Collection of Fractal helper tasks
99

1010
## Development instructions
1111

12-
This instructions are only relevant *after* you completed both the `copier
13-
copy` command and the git/GitLab/GitHub initialization phase - see
14-
[README](https://github.com/fractal-analytics-platform/fractal-tasks-template#readme)
15-
for details.
16-
17-
1. It is recommended to work from an isolated Python virtual environment:
18-
```console
19-
# Create the virtual environment in the folder venv
20-
python -m venv venv
21-
# Activate the Python virtual environment
22-
source venv/bin/activate
23-
# Deactivate the virtual environment, when you don't need it any more
24-
deactivate
12+
To create the manifest:
2513
```
26-
2. You can install your package locally as in:
27-
```console
28-
# Install only fractal_helper_tasks:
29-
python -m pip install -e .
30-
# Install both fractal_helper_tasks and development dependencies (e.g. pytest):
31-
python -m pip install -e ".[dev]"
14+
fractal-manifest create --package fractal_helper_tasks --fractal-server-2-13
3215
```
3316

34-
3. Enjoy developing the package.
35-
36-
4. The template already includes a sample task ("Thresholding Task"). Whenever
37-
you change its input parameters or docstring, re-run
38-
```console
39-
python src/fractal_helper_tasks/dev/create_manifest.py
40-
git add src/fractal_helper_tasks/__FRACTAL_MANIFEST__.json
41-
git commit -m'Update `__FRACTAL_MANIFEST__.json`'
42-
git push origin main
43-
```
44-
45-
5. If you add a new task, you should also add a new item to the `task_list`
46-
property in `src/fractal_helper_tasks/__FRACTAL_MANIFEST__.json`. A minimal example
47-
may look like
48-
```json
49-
{
50-
"name": "My Second Task",
51-
"executable": "my_second_task.py",
52-
"input_type": "zarr",
53-
"output_type": "zarr",
54-
"meta": {
55-
"some-property": "some-value"
56-
},
57-
}
58-
```
59-
Notes:
60-
61-
* After adding a task, you should also update the manifest (see point 4 above).
62-
* The minimal example above also includes the `meta` task property; this is optional, and you can remove it if it is not needed.
63-
64-
6. Run the test suite (with somewhat verbose logging) through
65-
```console
66-
python -m pytest --log-cli-level info -s
67-
```
68-
7. Build the package through
69-
```console
70-
python -m build
71-
```
72-
This command will create the release distribution files in the `dist` folder.
73-
The wheel one (ending with `.whl`) is the one you can use to collect your tasks
74-
within Fractal.
17+
Refer to the developers-guide in the [Fractal template repo](https://github.com/fractal-analytics-platform/fractal-tasks-template/blob/main/DEVELOPERS_GUIDE.md) for more detailed instructions.

src/fractal_helper_tasks/__FRACTAL_MANIFEST__.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
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",
1413
"executable_parallel": "drop_t_dimension.py",
1514
"meta_parallel": {
1615
"cpus_per_task": 2,
@@ -58,7 +57,6 @@
5857
"2D to 3D workflows"
5958
],
6059
"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",
6260
"executable_parallel": "convert_2D_segmentation_to_3D.py",
6361
"meta_parallel": {
6462
"cpus_per_task": 2,
@@ -80,16 +78,16 @@
8078
"level": {
8179
"default": 0,
8280
"title": "Level",
83-
"type": "integer",
81+
"type": "string",
8482
"description": "Level of the 2D OME-Zarr label to copy from"
8583
},
86-
"ROI_tables_to_copy": {
84+
"tables_to_copy": {
8785
"items": {
8886
"type": "string"
8987
},
90-
"title": "Roi Tables To Copy",
88+
"title": "Tables To Copy",
9189
"type": "array",
92-
"description": "List of ROI table names to copy from 2D OME-Zarr to 3D OME-Zarr"
90+
"description": "List of tables to copy from 2D OME-Zarr to 3D OME-Zarr"
9391
},
9492
"new_label_name": {
9593
"title": "New Label Name",
@@ -100,7 +98,7 @@
10098
"items": {},
10199
"title": "New Table Names",
102100
"type": "array",
103-
"description": "Optionally overwriting the names of the ROI tables in the 3D OME-Zarr"
101+
"description": "Optionally overwriting the names of the tables in the 3D OME-Zarr"
104102
},
105103
"plate_suffix": {
106104
"default": "_mip",
@@ -146,7 +144,6 @@
146144
"Many files"
147145
],
148146
"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",
150147
"executable_parallel": "rechunk_zarr.py",
151148
"meta_parallel": {
152149
"cpus_per_task": 1,

0 commit comments

Comments
 (0)