From 6f76074709d5bb9cd4554031602692c9e9347494 Mon Sep 17 00:00:00 2001 From: Cristhian Date: Tue, 15 Sep 2026 06:13:06 -0300 Subject: [PATCH] name no consumer of this node 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. --- .gitea/workflows/validate.yml | 2 -- README.md | 5 +++-- dora_webcam/image.py | 6 +++--- tests/test_dora_webcam.py | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/validate.yml b/.gitea/workflows/validate.yml index 37d6a3b..a54662d 100644 --- a/.gitea/workflows/validate.yml +++ b/.gitea/workflows/validate.yml @@ -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. diff --git a/README.md b/README.md index 6150568..c6eae67 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/dora_webcam/image.py b/dora_webcam/image.py index 3c3c77d..7cad7eb 100644 --- a/dora_webcam/image.py +++ b/dora_webcam/image.py @@ -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 diff --git a/tests/test_dora_webcam.py b/tests/test_dora_webcam.py index e7026df..13f372e 100644 --- a/tests/test_dora_webcam.py +++ b/tests/test_dora_webcam.py @@ -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()),