-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from lorenzocerrone/update_to_fractal_task_cor…
…e_1_2 Update to fractal task core 1.3
- Loading branch information
Showing
11 changed files
with
263 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: CI (build and test) | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
|
||
jobs: | ||
tests: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04, macos-latest] | ||
python-version: ["3.9", "3.10", "3.11"] | ||
exclude: | ||
- os: macos-latest | ||
python-version: '3.9' | ||
- os: macos-latest | ||
python-version: '3.10' | ||
name: "Core, Python ${{ '{{' }} matrix.python-version {{ '}}' }}, ${{ '{{' }} matrix.os {{ '}}' }}" | ||
runs-on: ${{ '{{' }} matrix.os {{ '}}' }} | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Set up Python ${{ '{{' }} matrix.python-version {{ '}}' }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ '{{' }} matrix.python-version {{ '}}' }} | ||
cache: "pip" | ||
|
||
- name: Install package | ||
run: python -m pip install -e .[dev] | ||
|
||
- name: Regenerate the manifest | ||
run: python src/{{package_name}}/dev/create_manifest.py | ||
|
||
- name: Check if manifest has changed | ||
run: | | ||
if [ -n "$(git diff --exit-code ./src/{{package_name}}/__FRACTAL_MANIFEST__.json)" ]; then | ||
echo "__FRACTAL_MANIFEST__.json has changed. Please run 'python src/{{package_name}}/dev/create_manifest.py' and commit the changes." | ||
exit 1 | ||
else | ||
echo "__FRACTAL_MANIFEST__.json has not changed." | ||
fi | ||
|
||
- name: Test core library with pytest | ||
run: python -m pytest tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# Git ignored is sourced from https://github.com/pydev-guide/pyrepo-copier/blob/main/LICENSE | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
.DS_Store | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# dotenv | ||
.env | ||
|
||
# virtualenv | ||
.venv | ||
venv/ | ||
ENV/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
# ruff | ||
.ruff_cache/ | ||
|
||
# IDE settings | ||
.vscode/ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"manifest_version": "2", | ||
"task_list": [ | ||
{ | ||
"name": "Thresholding Label Task", | ||
"executable_parallel": "thresholding_label_task.py", | ||
"meta_parallel": { | ||
"cpus_per_task": 1, | ||
"mem": 4000 | ||
}, | ||
"args_schema_parallel": { | ||
"$defs": { | ||
"ChannelInputModel": { | ||
"description": "A channel which is specified by either `wavelength_id` or `label`.", | ||
"properties": { | ||
"wavelength_id": { | ||
"title": "Wavelength Id", | ||
"type": "string", | ||
"description": "Unique ID for the channel wavelength, e.g. `A01_C01`. Can only be specified if label is not set." | ||
}, | ||
"label": { | ||
"title": "Label", | ||
"type": "string", | ||
"description": "Name of the channel. Can only be specified if wavelength_id is not set." | ||
} | ||
}, | ||
"title": "ChannelInputModel", | ||
"type": "object" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"properties": { | ||
"zarr_url": { | ||
"title": "Zarr Url", | ||
"type": "string", | ||
"description": "Absolute path to the OME-Zarr image." | ||
}, | ||
"threshold": { | ||
"title": "Threshold", | ||
"type": "integer", | ||
"description": "Threshold value to be applied." | ||
}, | ||
"channel": { | ||
"$ref": "#/$defs/ChannelInputModel", | ||
"title": "Channel", | ||
"description": "Channel to be thresholded." | ||
}, | ||
"label_name": { | ||
"title": "Label Name", | ||
"type": "string", | ||
"description": "Name of the resulting label image" | ||
}, | ||
"min_size": { | ||
"default": 50, | ||
"title": "Min Size", | ||
"type": "integer", | ||
"description": "Minimum size of objects. Smaller objects are filtered out." | ||
}, | ||
"overwrite": { | ||
"default": true, | ||
"title": "Overwrite", | ||
"type": "boolean", | ||
"description": "Whether to overwrite an existing label image" | ||
} | ||
}, | ||
"required": [ | ||
"zarr_url", | ||
"threshold", | ||
"channel" | ||
], | ||
"type": "object", | ||
"title": "ThresholdingLabelTask" | ||
}, | ||
"docs_info": "## thresholding_label_task\nThreshold an image and find connected components.\n" | ||
} | ||
], | ||
"has_args_schemas": true, | ||
"args_schema_version": "pydantic_v2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import json | ||
|
||
import requests | ||
from jsonschema import validate | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters