Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: write

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: prefix-dev/setup-pixi@v0.8.0
with:
pixi-version: latest
env:
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.ref_name }}
- name: Build package
env:
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.ref_name }}
run: pixi run build-package
- name: Generate JSON schema
run: pixi run json-schema > biomero-schema.json
- name: Upload schema to release
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload ${{ github.ref_name }} biomero-schema.json --clobber
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Tests

on:
push:
pull_request:

jobs:
test:
runs-on: windows-latest
env:
PYTHONUTF8: "1"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: prefix-dev/setup-pixi@v0.8.0
with:
pixi-version: latest
- run: pixi run test
- run: pixi run test-validate
- run: pixi run test-parse
- run: pixi run test-pparse
- run: pixi run test-jparse
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/

# Ruff stuff:
.ruff_cache/
Expand Down
61 changes: 41 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,23 @@ schema =
{
"name": "string", // Required. GitHub workflow repository name (without prefix). E.g. NucleiTracking-ImageJ
"description": "string" // Required. Description of workflow.
"schema-version": "string" // Required. Semver of schema version.
"schema-version": "string" // Required. Schema format identifier. Use the current schema version constant, e.g. "biomero-0.1".
"authors": // Optional. Authors list.
[
{
"name": "string", // Required. Full name of author.
"email": "optional", // Optional. Email address of author.
"affiliations": "string[]" // Optional. List of affiliations matching "id" of an instituttion in instititions list.
"email": "string", // Optional. Email address of author.
"affiliations": "string[]" // Optional. List of affiliations matching "id" of an institution in institutions list.
}
],
"institutions": // Optional. Institutions list.
[
{
"id": "string", // Required. Unique institute identifier.
"name": "string" // Optional. Name of the institions. Defaults to id.
"name": "string" // Optional. Name of the institution. Defaults to id.
}
],
"citations": // Optional. List of citations for the tool. Defaults to empty list.
"citations": // Required. List of citations for the tool. At least one citation required.
[
{
"name": "string", // Required. Name of the tool being cited.
Expand All @@ -127,16 +127,16 @@ schema =
],
// corresponding to: https://neubias-wg5.github.io/problem_class_ground_truth.html#steps-section
"problem-class": // Optional. Biaflows problem class ("object-segmentation" | "pixel-classification" | "object-counting" | "object-detection" | "filament-tree-tracing" | "filament-networks-tracing" | "landmark-detection" | "particle-tracking" | "object-tracking").
"container-image": // Required. Base cotnainer description.
"container-image": // Required. Base container description.
{
"image": "string", // Required. Image to match the name of your workflow GitHub repository (lower case only). E.g. neubiaswg5/w_nucleitracking-imagej:1.0.0
"type": "string", // Required. "oci" | "singularity" (lower case only).
"type": "string", // Required. "oci" | "singularity" | "docker" (lower case only).
"platforms": "string"[] // Optional. Build-time multi-platform targets.
},
"configuration": // Optional. Technical configuration.
{
"input_folder": "string", // Optional. Full path where the input folder must be mounted in the container. Defaults to "/inputs".
"output_folder": "string", // Optional. Full path where teh output folder must be mounted in the container. Defaults to "/outputs".
"output_folder": "string", // Optional. Full path where the output folder must be mounted in the container. Defaults to "/outputs".
"resources": // Optional.
{
"networking": "boolean", // Optional. Whether internet connection is needed. Defaults to False.
Expand All @@ -158,14 +158,22 @@ schema =
// references to "@id" get the value of "id" in lowercase
// references to "@ID" get the value of "id" in uppercase
"id": "string", // Required. Unique parameter identifier.
"type": "string", // Required. Data type of the parameter (Number|String|ineger|flaot|boolean|string|file|image|array).
"name": "string", // Optional. Human-readable display name appearing in BIAFLOWS UI (paramater dialog box). Defaults to "@id".
"description": "string", // Optional. Description of paramater. Context help in BIAFLOWS UI (paramater dialog box). Soft Defaults to "".
"type": "string", // Required. Data type of the parameter (Number|String|integer|float|boolean|string|file|image|array|measurement|executable).
"name": "string", // Optional. Human-readable display name appearing in BIAFLOWS UI (parameter dialog box). Defaults to "@id".
"description": "string", // Optional. Description of parameter. Context help in BIAFLOWS UI (parameter dialog box). Soft Defaults to "".
"value-key": "string", // Optional. Substitution key in CLI. Defaults to "[@ID]".
"command-line-flag": "string", // Optional. CLI flag. Defaults to "--@id".
"default-value": "string|number|boolean", // Optional. Default value in BIAFLOWS UI (paramater dialog box). Soft Defaults to empty string.
"default-value": "string|number|boolean", // Optional. Default value in BIAFLOWS UI (parameter dialog box). Soft Defaults to empty string.
"optional": "boolean", // Optional. If true, parameter not required. Soft Defaults to False.
"set-by-server": "boolean", // Optional. If true, parameter is server-assigned. Soft Defaults to False.
"value-choices": "array", // Optional. List of allowed values for this parameter.
"value-choices-labels": "string[]", // Optional. Display labels for value-choices, index-aligned. When null, value is used as label.
"mode": "string", // Optional. UI display mode — "beginner" | "advanced". Advanced params are collapsed by default in the UI.
"file-count": "string", // Optional. For file-type inputs: "single" | "multiple".
"format": "string|string[]", // Optional. Type-specific. File extension(s) — see file/image/array sections below.
"sub-type": "string|string[]", // Optional. Type-specific. Image sub-type(s) — see image section below.
"output-dir-set": "boolean", // Optional. If true, this parameter specifies the output directory. Biomero will supply the data/out path.
"file-attachment": "boolean", // Optional. If true, this is a user-supplied OMERO file-attachment input (annotation ID). Biomero will download the file from OMERO and transfer it to the HPC at runtime, then inject the resolved path as the CLI argument.
}
]
"outputs": // Optional. List of output parameter descriptors.
Expand All @@ -174,32 +182,45 @@ schema =
// references to "@id" get the value of "id" in lowercase
// references to "@ID" get the value of "id" in uppercase
"id": "string", // Required. Unique parameter identifier.
"type": "string", // Required. Data type of the parameter (Number|String).
"name": "string", // Optional. Human-readable display name appearing in BIAFLOWS UI (paramater dialog box). Defaults to "@id".
"description": "string", // Optional. Description of paramater. Context help in BIAFLOWS UI (paramater dialog box). Soft Defaults to "".
"type": "string", // Required. Data type of the parameter (Number|String|integer|float|boolean|string|file|image|array|measurement|executable).
"name": "string", // Optional. Human-readable display name appearing in BIAFLOWS UI (parameter dialog box). Defaults to "@id".
"description": "string", // Optional. Description of parameter. Context help in BIAFLOWS UI (parameter dialog box). Soft Defaults to "".
"value-key": "string", // Optional. Substitution key in CLI. Defaults to "[@ID]".
"command-line-flag": "string", // Optional. CLI flag. Defaults to "--@id".
"default-value": "string|number|boolean", // Optional. Default value in BIAFLOWS UI (paramater dialog box). Soft Defaults to empty string.
"default-value": "string|number|boolean", // Optional. Default value in BIAFLOWS UI (parameter dialog box). Soft Defaults to empty string.
"optional": "boolean", // Optional. If true, parameter not required. Soft Defaults to False.
"set-by-server": "boolean", // Optional. If true, parameter is server-assigned. Soft Defaults to False.
"value-choices": "array", // Optional. List of allowed values for this parameter.
"value-choices-labels": "string[]", // Optional. Display labels for value-choices, index-aligned. When null, value is used as label.
"mode": "string", // Optional. UI display mode — "beginner" | "advanced". Advanced params are collapsed by default in the UI.
"file-count": "string", // Optional. For file-type outputs: "single" | "multiple".
"format": "string|string[]", // Optional. Type-specific. File extension(s) — see file/image/array sections below.
"sub-type": "string|string[]", // Optional. Type-specific. Image sub-type(s) — see image section below.
}
]
"command-line": "string" // Required. e.g. "python wrapper.py CYTOMINE_HOST CYTOMINE_PUBLIC_KEY CYTOMINE_PRIVATE_KEY CYTOMINE_ID_PROJECT CYTOMINE_ID_SOFTWARE IJ_RADIUS IJ_THRESHOLD".
}

file =
{
"format": "string" // Required. Extension of the file type (.csv).
"format": "string" // Optional. Extension of the file type (e.g. .csv).
}

image =
{
"sub-type": "string", // Required. Image type (grayscale|color|binary|labeled|class).
"format": "string" // Required. Extension of the image type (tif, png, jpg, jpeg, tiff, ometiff).
"sub-type": "string|string[]", // Optional. Image type (grayscale|color|binary|labeled|class|plate). Can be a single value or list.
"format": "string|string[]" // Optional. Extension of the image type (tif|png|jpg|jpeg|tiff|ometiff|zarr|omezarr|ome.zarr|ome-zarr). Can be a single value or list.
}

array =
{
"format": "string" // Required. Extension of the file type (npy, npz)
"format": "string" // Optional. Extension of the file type (npy, npz)
}
```

## Computed Fields

The following fields are automatically computed from the schema and included in the JSON output:

- **`requires-zarr`** (`boolean`): `true` when any image input uses a ZARR format (`zarr`, `omezarr`, `ome.zarr`, `ome-zarr`) or has `plate` sub-type.
- **`requires-plate`** (`boolean`): `true` when any image input has `plate` sub-type.
Loading
Loading