reproducible processing workflows with napari
Project description
ndev-workflows
Reproducible processing workflows with napari
A re-implementation of napari-workflows with backwards compatibility.
This [napari] plugin was generated with [copier] using the [napari-plugin-template] (2.0.1).
What is ndev-workflows?
ndev-workflows is the workflow backend for napari image processing pipelines. It's a drop-in replacement for napari-workflows by Robert Haase, with these key improvements:
- Safe YAML loading — Uses
yaml.safe_load()(no arbitrary code execution) - Backwards compatible — Automatically loads and migrates legacy napari-workflows files, and detects missing dependencies
- Same API — Most code works without changes
- Future-ready — Designed for upcoming npe2 workflow contributions (WIP), without relying on npe1, napari-time-slicer, and napari-tools-menu for interactivity
Installation
pip install ndev-workflows
If napari is not already installed, you can install ndev-workflows with napari and Qt via:
pip install "ndev-workflows[all]"
Quick Start
from ndev_workflows import Workflow, save_workflow, load_workflow
from skimage.filters import gaussian
# Create workflow
workflow = Workflow()
workflow.set("blurred", gaussian, "input_image", sigma=2.0)
workflow.set("input_image", my_image)
# Execute
result = workflow.get("blurred")
# Save
save_workflow("pipeline.yaml", workflow, name="My Pipeline")
# Load and reuse
loaded = load_workflow("pipeline.yaml")
loaded.set("input_image", new_image)
result = loaded.get("blurred")
YAML Format
Saved workflows use a safe, human-readable format:
name: Nucleus Segmentation
description: Gaussian blur and thresholding
modified: '2025-12-22'
inputs:
- raw_image
outputs:
- labels
tasks:
blurred:
function: skimage.filters.gaussian
params:
arg0: raw_image
sigma: 2.0
labels:
function: skimage.measure.label
params:
arg0: blurred
Key features:
- No
!python/objecttags (safe to share) - Functions imported by module path
- Params use
arg0,arg1, etc. for positional args and keyword names for kwargs
Legacy format: Old napari-workflows YAML files are automatically detected and migrated when loaded.
Important Notes
Function Dependencies
⚠️ Workflows don't bundle functions — they only store module paths. Recipients need the same packages installed.
If loading fails with WorkflowNotRunnableError, install the missing package:
pip install scikit-image # for skimage functions
pip install napari-segment-blobs-and-things-with-membranes # for that plugin
Lazy Loading
Inspect workflows without importing functions:
workflow = load_workflow("untrusted.yaml", lazy=True)
print(workflow.tasks) # Safe - doesn't execute
Integration
Front-end plugins for interactive workflow building:
Works with processing plugins:
Contributing
git clone https://github.com/ndev-kit/ndev-workflows.git
cd ndev-workflows
uv venv
.venv\Scripts\activate
uv pip install -e . --group dev
pytest
License
Distributed under the terms of the [BSD-3] license, "ndev-workflows" is free and open source software Fork of napari-workflows by Robert Haase.
Issues
File an issue with your environment details, YAML file (if applicable), and error messages.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ndev_workflows-0.0.1.tar.gz.
File metadata
- Download URL: ndev_workflows-0.0.1.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5744e08e95bde60c7acda2082a3b7496647bc43c406564d85b18b93d5eb1a8cc
|
|
| MD5 |
7278838502c2e748886e6595a31bede5
|
|
| BLAKE2b-256 |
67b8409e20f1338a9a14db7e667c67628da9ce421c3b526d1678be63ba0cb7c6
|
Provenance
The following attestation bundles were made for ndev_workflows-0.0.1.tar.gz:
Publisher:
test_and_deploy.yml on ndev-kit/ndev-workflows
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ndev_workflows-0.0.1.tar.gz -
Subject digest:
5744e08e95bde60c7acda2082a3b7496647bc43c406564d85b18b93d5eb1a8cc - Sigstore transparency entry: 775137267
- Sigstore integration time:
-
Permalink:
ndev-kit/ndev-workflows@7ff5ad661a3caab525f4f96110e598a1595a3dcd -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/ndev-kit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test_and_deploy.yml@7ff5ad661a3caab525f4f96110e598a1595a3dcd -
Trigger Event:
push
-
Statement type:
File details
Details for the file ndev_workflows-0.0.1-py3-none-any.whl.
File metadata
- Download URL: ndev_workflows-0.0.1-py3-none-any.whl
- Upload date:
- Size: 27.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfc597666f5126760ad31dda062b3e76675cd7f75989a5f31882e67e4a0191d3
|
|
| MD5 |
a0bee4097b6ac7b6b9e8efc3505559c4
|
|
| BLAKE2b-256 |
b936974b88b4b379e3ac03e3a8da2986223bce0007cedf8492742c6ebbdada74
|
Provenance
The following attestation bundles were made for ndev_workflows-0.0.1-py3-none-any.whl:
Publisher:
test_and_deploy.yml on ndev-kit/ndev-workflows
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ndev_workflows-0.0.1-py3-none-any.whl -
Subject digest:
bfc597666f5126760ad31dda062b3e76675cd7f75989a5f31882e67e4a0191d3 - Sigstore transparency entry: 775137269
- Sigstore integration time:
-
Permalink:
ndev-kit/ndev-workflows@7ff5ad661a3caab525f4f96110e598a1595a3dcd -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/ndev-kit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test_and_deploy.yml@7ff5ad661a3caab525f4f96110e598a1595a3dcd -
Trigger Event:
push
-
Statement type: