Skip to content

Commit d6b1ff9

Browse files
Merge pull request #1 from fractal-analytics-platform/add_task_metadata
Add task metadata
2 parents 4372514 + af01676 commit d6b1ff9

File tree

10 files changed

+62
-18
lines changed

10 files changed

+62
-18
lines changed

.copier-answers.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Do not edit - changes here will be overwritten by Copier
2-
_commit: 0.4.0
2+
_commit: v0.4.2
33
_src_path: gh:fractal-analytics-platform/fractal-tasks-template
44
author_email: [email protected]
55
author_name: Lorenzo Cerrone
66
package_name: ilastik_tasks
77
project_name: ilastik-tasks
8-
project_short_description: Package description.
9-
project_url: ''
8+
project_short_description: Collection of Fractal task to run Headless ilastik workflows
9+
project_url: https://github.com/fractal-analytics-platform/fractal-ilastik-tasks
1010

.github/workflows/build_and_test.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: CI (build and test)
33
on:
44
push:
55
branches: ["main"]
6+
tags:
7+
- "*"
68
pull_request:
79
branches: ["main"]
810

@@ -52,4 +54,42 @@ jobs:
5254
fi
5355
5456
- name: Test core library with pytest
55-
run: micromamba run -n ilastik-tasks python -m pytest tests
57+
run: micromamba run -n ilastik-tasks python -m pytest tests
58+
59+
deploy:
60+
name: Deploy
61+
needs: tests
62+
if: success() && startsWith(github.ref, 'refs/tags/') && github.event_name != 'schedule'
63+
runs-on: ubuntu-latest
64+
65+
permissions:
66+
# IMPORTANT: this permission is mandatory for trusted publishing on PyPi
67+
# see https://docs.pypi.org/trusted-publishers/
68+
id-token: write
69+
# This permission allows writing releases
70+
contents: write
71+
72+
steps:
73+
- uses: actions/checkout@v4
74+
with:
75+
fetch-depth: 0
76+
77+
- name: 🐍 Set up Python
78+
uses: actions/setup-python@v5
79+
with:
80+
python-version: "3.x"
81+
82+
- name: 👷 Build
83+
run: |
84+
python -m pip install build
85+
python -m build
86+
87+
- name: 🚢 Publish to PyPI
88+
# TODO remove the "if: false" line when the package is ready for pypi release
89+
if: false
90+
uses: pypa/gh-action-pypi-publish@release/v1
91+
92+
- uses: softprops/action-gh-release@v2
93+
with:
94+
generate_release_notes: true
95+
files: './dist/*'

create_env_script.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ else
1414
LOCATION="--prefix $ENVPREFIX/$ENVNAME"
1515
fi
1616

17-
echo "Creating environment $ENVNAME with $PYTORCH_PACKAGE"
17+
echo "Creating environment $ENVNAME"
1818
$COMMMAND run $COMMMAND create $LOCATION \
1919
--override-channels \
2020
-c pytorch \
2121
-c ilastik-forge \
2222
-c conda-forge $PYTHON ilastik \
2323
--no-channel-priority --yes
2424

25-
echo "Installing plantseg-tasks version $VERSION"
25+
echo "Installing ilastik-tasks version $VERSION"
2626
$COMMMAND run --name $ENVNAME pip install git+https://github.com/fractal-analytics-platform/fractal-ilastik-tasks@$VERSION
2727

2828
echo "Downloading the __FRACTAL_MANIFEST__.json file file"

pyproject.toml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,19 @@ build-backend = "hatchling.build"
55

66
# https://hatch.pypa.io/latest/config/metadata/
77
[tool.hatch.version]
8-
#path = "src/ilastik_tasks/__init__.py"
98
source = "vcs"
109

1110
# read more about configuring hatch at:
1211
# https://hatch.pypa.io/latest/config/build/
1312
[tool.hatch.build.targets.wheel]
14-
only-include = ["src"]
15-
sources = ["src"]
16-
17-
# Always include the __FRACTAL_MANIFEST__.json file in the package
18-
[tool.hatch.build]
19-
include = ["__FRACTAL_MANIFEST__.json"]
13+
packages = ["src/ilastik_tasks"]
2014

2115

2216
# Project metadata (see https://peps.python.org/pep-0621)
2317
[project]
2418
name = "ilastik-tasks"
2519
dynamic = ["version"]
26-
description = "Package description."
20+
description = "Collection of Fractal task to run Headless ilastik workflows"
2721
readme = "README.md"
2822
license = { text = "BSD-3-Clause" }
2923
authors = [
@@ -32,7 +26,7 @@ authors = [
3226

3327
# Required Python version and dependencies
3428
requires-python = ">=3.9"
35-
dependencies = ["fractal-tasks-core == 1.3.0", "scikit-image"]
29+
dependencies = ["fractal-tasks-core == 1.3.3", "scikit-image", "numpy < 2"]
3630

3731
# Optional dependencies (e.g. for `pip install -e ".[dev]"`, see
3832
# https://peps.python.org/pep-0621/#dependencies-optional-dependencies)

src/ilastik_tasks/__FRACTAL_MANIFEST__.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
"task_list": [
44
{
55
"name": "Ilastik Pixel Classification Segmentation",
6+
"category": "Segmentation",
7+
"tags": [
8+
"Pixel Classifier"
9+
],
610
"executable_parallel": "ilastik_pixel_classification_segmentation.py",
711
"meta_parallel": {
812
"cpus_per_task": 8,
@@ -104,5 +108,6 @@
104108
}
105109
],
106110
"has_args_schemas": true,
107-
"args_schema_version": "pydantic_v2"
111+
"args_schema_version": "pydantic_v2",
112+
"authors": "Lorenzo Cerrone"
108113
}

src/ilastik_tasks/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Package description.
2+
Collection of Fractal task to run Headless ilastik workflows
33
"""
44
from importlib.metadata import PackageNotFoundError, version
55

src/ilastik_tasks/dev/create_manifest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66

77
if __name__ == "__main__":
88
PACKAGE = "ilastik_tasks"
9-
create_manifest(package=PACKAGE)
9+
AUTHORS = "Lorenzo Cerrone"
10+
create_manifest(package=PACKAGE, authors=AUTHORS)

src/ilastik_tasks/dev/task_list.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@
77
name="Ilastik Pixel Classification Segmentation",
88
executable="ilastik_pixel_classification_segmentation.py",
99
meta={"cpus_per_task": 8, "mem": 8000},
10+
category="Segmentation",
11+
tags=[
12+
"Pixel Classifier",
13+
],
1014
),
1115
]
855 KB
Binary file not shown.
227 KB
Binary file not shown.

0 commit comments

Comments
 (0)