Split the opencv-plot viewer into its own dataflow #19

Merged
cristhian merged 1 commits from split-plot-dataflow into main 2026-09-08 17:23:15 +00:00
Owner

dataflow.yml is now the camera alone, so running it no longer pulls dora-hub over pip or needs a display. dataflow_plot.yml adds the viewer on image_bgr for when the stream should be looked at.

File Contents Run
dataflow.yml The camera alone dora run dataflow.yml
dataflow_plot.yml Camera plus opencv-plot on image_bgr dora run dataflow_plot.yml

Why the camera node is duplicated

dora 1.0 resolves an input's source only within the same descriptor (libraries/core/src/descriptor/validate.rs:521), so there is no cross-dataflow wiring and no include mechanism. The camera node is therefore declared in both files, and the two are run one at a time. CI validates both, which is what catches an output rename that breaks only the viewer.

Verified

$ dora validate dataflow.yml
  node "zed-camera": injected 6 contract type(s) from .../dora-node.yml
All type annotations OK.                                    exit=0

$ dora validate dataflow_plot.yml
  node "zed-camera": injected 6 contract type(s) from .../dora-node.yml
  inferred std/core/v1/UInt8 on plot/image (from zed-camera/image_bgr)
All type annotations OK.                                    exit=0

Run against dora-cli 1.0.1. No camera was attached — dora validate never runs a node.

Docs updated: README gains a Runnable examples section, AGENTS.md documents the new file and the run-one-at-a-time constraint.

🤖 Generated with Claude Code

https://claude.ai/code/session_01A65jaxrPXMN9EhBDMmMWb2

`dataflow.yml` is now the camera alone, so running it no longer pulls dora-hub over `pip` or needs a display. `dataflow_plot.yml` adds the viewer on `image_bgr` for when the stream should be looked at. | File | Contents | Run | |---|---|---| | `dataflow.yml` | The camera alone | `dora run dataflow.yml` | | `dataflow_plot.yml` | Camera plus `opencv-plot` on `image_bgr` | `dora run dataflow_plot.yml` | ### Why the camera node is duplicated dora 1.0 resolves an input's `source` only within the same descriptor (`libraries/core/src/descriptor/validate.rs:521`), so there is no cross-dataflow wiring and no include mechanism. The camera node is therefore declared in both files, and the two are run one at a time. CI validates both, which is what catches an output rename that breaks only the viewer. ### Verified ``` $ dora validate dataflow.yml node "zed-camera": injected 6 contract type(s) from .../dora-node.yml All type annotations OK. exit=0 $ dora validate dataflow_plot.yml node "zed-camera": injected 6 contract type(s) from .../dora-node.yml inferred std/core/v1/UInt8 on plot/image (from zed-camera/image_bgr) All type annotations OK. exit=0 ``` Run against `dora-cli 1.0.1`. No camera was attached — `dora validate` never runs a node. Docs updated: README gains a *Runnable examples* section, AGENTS.md documents the new file and the run-one-at-a-time constraint. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01A65jaxrPXMN9EhBDMmMWb2
cristhian added 1 commit 2026-09-08 17:22:50 +00:00
refactor: split the opencv-plot viewer into its own dataflow
validate / validate (push) Successful in 59m2s
validate / validate (pull_request) Successful in 59m0s
483da05a98
dataflow.yml is now the camera alone, so running it no longer pulls
dora-hub over pip or needs a display. dataflow_plot.yml adds the viewer
on image_bgr for when the stream should be looked at.

dora 1.0 resolves an input's source only within the same descriptor, so
the camera node is declared in both files rather than shared, and the two
are run one at a time. CI validates both, which is what catches an output
rename that breaks only the viewer.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A65jaxrPXMN9EhBDMmMWb2
cristhian merged commit d4c9f153c1 into main 2026-09-08 17:23:15 +00:00
Sign in to join this conversation.