add an in-repo synthetic source so the example needs no network
The example dataflow pulled opencv-video-capture and pyarrow-sender from dora-hub, needed a webcam, and left `bbox` unwired because every bbox source is a detector. examples/source.py emits an animated frame, the box around the square in it, and a caption, so the dataflow exercises all three inputs with nothing outside this checkout. SOURCE_FRAMES bounds the run, which lets CI run the dataflow headless rather than only validate it. Drops the dora-zed and dora-yolo wirings from the README and trims AGENTS.md to what the code and README do not already say. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018WLVZCFFcCH1EpTXGfS9aD
This commit is contained in:
+19
-26
@@ -1,41 +1,34 @@
|
||||
# The repository's own example: a webcam and a fixed caption feeding the viewer.
|
||||
# The plot node is built from this checkout with `path:` + `build:`, so
|
||||
# `dora validate` picks up the typed contract in dora-node.yml next to it.
|
||||
# The repository's own example, and its end-to-end test: a synthetic source
|
||||
# feeding the viewer. Everything it needs is in this checkout -- no camera, no
|
||||
# detector, no network -- so it is also what CI runs.
|
||||
#
|
||||
# Run it with `--uv` so every Python node gets its own managed environment.
|
||||
# A consumer wires the node from a tag instead — see README.md.
|
||||
# Both nodes are built from the checkout with `path:` + `build:`, which is what
|
||||
# lets `dora validate` pick up the typed contract in dora-node.yml. A consumer
|
||||
# wires the viewer from a tag instead -- see README.md.
|
||||
#
|
||||
# `bbox` is left unwired: every bbox source is a detector, and pulling one in
|
||||
# would put a model download in the way of a webcam preview. README.md shows
|
||||
# the wiring.
|
||||
# Run it with `--uv` so every node gets its own managed environment.
|
||||
strict_types: true
|
||||
|
||||
nodes:
|
||||
- id: camera
|
||||
git: https://github.com/dora-rs/dora-hub.git
|
||||
build: pip install ./node-hub/opencv-video-capture
|
||||
path: opencv-video-capture
|
||||
- id: source
|
||||
path: examples/source.py
|
||||
# The source needs dora-rs, numpy and pyarrow; installing the project gives
|
||||
# it exactly the versions pinned in uv.lock.
|
||||
build: pip install .
|
||||
inputs:
|
||||
tick: dora/timer/millis/100
|
||||
tick: dora/timer/millis/33
|
||||
outputs:
|
||||
- image
|
||||
- bbox
|
||||
- text
|
||||
output_types:
|
||||
image: std/core/v1/UInt8
|
||||
|
||||
- id: caption
|
||||
git: https://github.com/dora-rs/dora-hub.git
|
||||
build: pip install ./node-hub/pyarrow-sender
|
||||
path: pyarrow-sender
|
||||
env:
|
||||
DATA: "'dora-plot'"
|
||||
outputs:
|
||||
- data
|
||||
output_types:
|
||||
data: std/core/v1/String
|
||||
text: std/core/v1/String
|
||||
|
||||
- id: plot
|
||||
path: dora-plot
|
||||
build: pip install .
|
||||
inputs:
|
||||
image: camera/image
|
||||
text: caption/data
|
||||
image: source/image
|
||||
bbox: source/bbox
|
||||
text: source/text
|
||||
|
||||
Reference in New Issue
Block a user