Skip to content

Conversation

@TimMonko
Copy link
Member

@TimMonko TimMonko commented Dec 22, 2025

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.

Copy link

Copilot AI left a 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.

@codecov
Copy link

codecov bot commented Dec 22, 2025

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 ☂️

@TimMonko TimMonko merged commit 7ff5ad6 into ndev-kit:main Dec 22, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant