A source that documents itself through a specific downstream node depends on that node to be understood, and that node already depends on this one for frames. The README pointed at one by name and the CI workflow still carried a comment about the dataflow that wired it, which no longer exists. The output is documented by its type instead: wire `image` into anything that takes std/media/v1/Image. PREVIEW covers seeing the frames without naming anyone. Generic words like "a viewer" or "a consumer" stay, since they describe a role rather than a repository.
This commit is contained in:
@@ -75,8 +75,6 @@ jobs:
|
||||
- name: Validate the dataflow
|
||||
run: dora validate dataflow.yml
|
||||
|
||||
# dataflow_view.yml is deliberately not run: it fetches dora-image-view
|
||||
# over the network and needs a tag to exist there.
|
||||
# CAPTURE_FRAMES bounds the run so it ends on its own; CI=true is already
|
||||
# set by the runner, which makes a failed capture publish a placeholder
|
||||
# frame rather than raising on a machine with no camera.
|
||||
|
||||
@@ -48,8 +48,9 @@ A window opens showing the frames as they are published. Press `q` to stop. That
|
||||
enough to check a camera, an encoding or a flip without wiring a second node — which is
|
||||
why there is one dataflow here rather than one per consumer.
|
||||
|
||||
For a real pipeline, wire `image` into a viewer such as `dora-image-view` from your own
|
||||
dataflow.
|
||||
For a real pipeline, wire `image` into any node that takes `std/media/v1/Image`, from
|
||||
your own dataflow. This repository names no consumer: it is a source, and depending on
|
||||
something downstream of it only to demonstrate it would be a cycle.
|
||||
|
||||
## Output
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"""Packing a frame as std/media/v1/Image.
|
||||
|
||||
The struct is respelled here rather than imported from the viewer: node
|
||||
repositories share no source package, so the manifest and this schema are the
|
||||
whole contract between them.
|
||||
The struct is respelled here rather than imported: node repositories share no
|
||||
source package, so the manifest and this schema are the whole contract a
|
||||
consumer has.
|
||||
"""
|
||||
|
||||
import numpy as np
|
||||
|
||||
@@ -137,8 +137,8 @@ def test_a_good_read_is_returned_as_is():
|
||||
assert frame.shape == (4, 4, 3)
|
||||
|
||||
|
||||
def test_the_struct_matches_what_the_viewer_expects():
|
||||
# The viewer respells this schema in its own repository; they share no
|
||||
def test_the_struct_matches_the_published_type():
|
||||
# A consumer respells this schema in its own repository; they share no
|
||||
# package, so the field names and types are the entire contract.
|
||||
assert image.IMAGE_TYPE == pa.struct([
|
||||
("width", pa.uint32()),
|
||||
|
||||
Reference in New Issue
Block a user