-
Notifications
You must be signed in to change notification settings - Fork 1
Initial Implementation of ndev-workflows #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces the initial implementation of ndev-workflows, a modernized fork of napari-workflows. The implementation adds safe YAML loading without arbitrary code execution, a human-readable workflow format, and integration with nbatch for parallel batch processing.
Key changes:
- New core workflow engine with dask-compatible task graph (
_workflow.py) - Safe YAML persistence with legacy format support (
_io.py,_io_legacy.py,_spec.py) - Workflow management with undo/redo capabilities (
_manager.py,_undo_redo.py) - Batch processing integration via nbatch (
_batch.py) - napari widget for interactive and batch workflow execution (
_workflow_container.py) - Comprehensive test suite covering core functionality
Reviewed changes
Copilot reviewed 23 out of 28 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/ndev_workflows/__init__.py |
Package initialization with public API exports (Workflow, load/save functions) |
src/ndev_workflows/_workflow.py |
Core Workflow class implementing dask-compatible task graph with lazy loading support |
src/ndev_workflows/_io.py |
YAML-based workflow persistence with safe loading and legacy format detection |
src/ndev_workflows/_io_legacy.py |
Legacy napari-workflows format loader with CallableRef placeholders |
src/ndev_workflows/_spec.py |
Workflow to/from YAML spec dict conversion logic |
src/ndev_workflows/_manager.py |
WorkflowManager for napari viewer integration with auto-updates and threading |
src/ndev_workflows/_undo_redo.py |
UndoRedoController for workflow state management |
src/ndev_workflows/_batch.py |
Batch processing function decorated with nbatch for parallel execution |
src/ndev_workflows/widgets/_workflow_container.py |
Main widget for workflow management in napari |
src/ndev_workflows/napari.yaml |
Plugin manifest with widget contribution |
tests/test_workflow.py |
Tests for core Workflow class functionality |
tests/test_spec.py |
Tests for workflow<->spec conversion |
tests/test_io.py |
Tests for save/load operations and legacy format support |
tests/test_manager.py |
Tests for WorkflowManager with viewer integration |
tests/test_undo_redo.py |
Tests for undo/redo functionality |
tests/test_batch.py |
Tests for batch processing decorator |
tests/widgets/test_workflow_container.py |
Tests for WorkflowContainer widget |
tests/conftest.py |
Shared test fixtures and helper functions |
tests/resources/Workflow/workflows/*.yaml |
Test workflow files in both legacy and new formats |
pyproject.toml |
Updated dependencies and Python version requirement (3.11+) |
.pre-commit-config.yaml |
Excludes test YAML files from check-yaml hook |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
This is the initial, large not quite MVP implementation of ndev-workflows.
It is backwards compatible with napari-workflows, but is improved with yaml readability, safe loading, missing dependency warnings, and a clear spec-to-workflow interface. It includes the workflow widget from napari-ndev for viewer and batch processing of workflow files
Copilot was used to help set up the architecture, but I did most of the work implementing the actual functionality. Unfortunately, I do not really have the understanding yet for WorkflowManager and UndoRedo to know why it exists, so for now its less validated. Copilot generated most of the tests, but they were at least eye ball checked.