Skip to content

Commit a538c7c

Browse files
Merge pull request #5 from fractal-analytics-platform/template_update
Template update
2 parents 033253b + 27d9880 commit a538c7c

File tree

8 files changed

+45
-20
lines changed

8 files changed

+45
-20
lines changed

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Do not edit - changes here will be overwritten by Copier
2-
_commit: v0.4.2
2+
_commit: v0.4.5
33
_src_path: gh:fractal-analytics-platform/fractal-tasks-template
44
author_email: [email protected]
55
author_name: Lorenzo Cerrone

.github/workflows/build_and_test.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@ name: CI (build and test)
22

33
on:
44
push:
5-
branches: ["main"]
5+
branches:
6+
- main
67
tags:
78
- "*"
89
pull_request:
9-
branches: ["main"]
10+
workflow_dispatch:
11+
release:
12+
types: [published]
1013

1114

1215
jobs:
1316
tests:
1417
strategy:
1518
matrix:
16-
#os: [ubuntu-22.04, macos-latest]
17-
os: [macos-latest]
18-
python-version: ["3.9"]
19+
os: [ubuntu-22.04, macos-latest]
20+
python-version: ["3.10"]
1921
name: "Core, Python ${{ matrix.python-version }}, ${{ matrix.os }}"
2022
runs-on: ${{ matrix.os }}
2123
timeout-minutes: 10
@@ -27,13 +29,15 @@ jobs:
2729

2830
- uses: mamba-org/setup-micromamba@v1
2931
with:
32+
# Using the newest version of micromamba
33+
# causes a weird bug in the manifest generation
3034
micromamba-version: '1.5.6-0' # any version from https://github.com/mamba-org/micromamba-releases
3135
environment-name: 'ilastik-tasks'
3236
create-args: >-
3337
--override-channels
3438
-c pytorch
35-
-c ilastik-forge
36-
-c conda-forge python=${{ matrix.python-version }} ilastik
39+
-c ilastik-forge
40+
-c conda-forge python=${{ matrix.python-version }} ilastik-core
3741
--no-channel-priority
3842
3943
post-cleanup: 'all'

create_env_script.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ENVPREFIX="NULL"
66

77
# Do NOT change the following lines
88
ENVNAME=ilastik-tasks-$VERSION
9-
PYTHON="python=3.9"
9+
PYTHON="python=3.10"
1010

1111
if [ "$ENVPREFIX" == "NULL" ]; then
1212
LOCATION="--name $ENVNAME"
@@ -19,7 +19,7 @@ $COMMMAND run $COMMMAND create $LOCATION \
1919
--override-channels \
2020
-c pytorch \
2121
-c ilastik-forge \
22-
-c conda-forge $PYTHON ilastik vigra \
22+
-c conda-forge $PYTHON ilastik-core vigra \
2323
--no-channel-priority --yes
2424

2525
echo "Installing ilastik-tasks version $VERSION"

pyproject.toml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,30 @@ dynamic = ["version"]
2020
description = "Collection of Fractal task to run Headless ilastik workflows"
2121
readme = "README.md"
2222
license = { text = "BSD-3-Clause" }
23-
authors = [
24-
{ name = "Lorenzo Cerrone", email = "[email protected]" },
25-
]
23+
authors = [{ name = "Lorenzo Cerrone", email = "[email protected]" }]
2624

2725
# Required Python version and dependencies
28-
requires-python = ">=3.9"
29-
dependencies = ["fractal-tasks-core == 1.3.3", "scikit-image", "numpy < 2"]
26+
requires-python = ">=3.10"
27+
dependencies = ["fractal-tasks-core == 1.4.3"]
3028

3129
# Optional dependencies (e.g. for `pip install -e ".[dev]"`, see
3230
# https://peps.python.org/pep-0621/#dependencies-optional-dependencies)
3331
[project.optional-dependencies]
34-
dev = ["devtools", "hatch", "pytest", "requests", "jsonschema", "ruff", "pre-commit"]
32+
dev = [
33+
"devtools",
34+
"pooch",
35+
"hatch",
36+
"pytest",
37+
"requests",
38+
"jsonschema",
39+
"ruff",
40+
"pre-commit",
41+
]
3542

3643
# https://docs.astral.sh/ruff
3744
[tool.ruff]
3845
line-length = 88
39-
target-version = "py39"
46+
target-version = "py311"
4047
src = ["src"]
4148

4249
# https://docs.astral.sh/ruff/rules
@@ -69,4 +76,4 @@ ignore = [
6976
[tool.ruff.format]
7077
docstring-code-format = true
7178
docstring-code-line-length = 89
72-
skip-magic-trailing-comma = false # default is false
79+
skip-magic-trailing-comma = false # default is false

src/ilastik_tasks/__FRACTAL_MANIFEST__.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"tags": [
88
"Pixel Classifier"
99
],
10+
"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.",
1011
"executable_parallel": "ilastik_pixel_classification_segmentation.py",
1112
"meta_parallel": {
1213
"cpus_per_task": 8,
@@ -119,7 +120,7 @@
119120
"type": "object",
120121
"title": "IlastikPixelClassificationSegmentation"
121122
},
122-
"docs_info": "## ilastik_pixel_classification_segmentation\nRun Ilastik Pixel Classification on a Zarr image.\n"
123+
"docs_link": "https://github.com/fractal-analytics-platform/fractal-ilastik-tasks"
123124
}
124125
],
125126
"has_args_schemas": true,

src/ilastik_tasks/dev/create_manifest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
if __name__ == "__main__":
66
PACKAGE = "ilastik_tasks"
77
AUTHORS = "Lorenzo Cerrone"
8-
create_manifest(package=PACKAGE, authors=AUTHORS)
8+
docs_link = "https://github.com/fractal-analytics-platform/fractal-ilastik-tasks"
9+
create_manifest(package=PACKAGE, authors=AUTHORS, docs_link=docs_link)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Purpose
2+
3+
This task is used to apply a ilastik pixel classifier to an image.
4+
5+
### Outputs
6+
7+
- The `ilastik_pixel_classification_segmentation`: Generates a new label image named `output_label_name`.
8+
9+
### Limitations
10+
11+
- The task can only be used with single and dual channels pixel classifiers models.

src/ilastik_tasks/dev/task_list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
tags=[
1212
"Pixel Classifier",
1313
],
14+
docs_info="file:docs_info/ilastik_pixel_classifier.md"
1415
),
1516
]

0 commit comments

Comments
 (0)