document configuring the node from the dataflow
validate / validate (push) Successful in 59m14s

Every setting is an environment variable, which reads fine for one and badly
for six: the README's table implied the only way to set them was to export them
around `dora run`. A node takes an `env:` map in the dataflow, applied to both
the build and the run, which keeps configuration with the wiring rather than in
whatever shell happened to start it. The README now shows a populated node.

A node's `env:` wins over the environment the dataflow was started in, and a
variable it does not set still passes through. That is why the block in
dataflow.yml is present but commented out: CI passes CAPTURE_FRAMES in through
the shell, and pinning it there would silently override the runner.
This commit is contained in:
2026-09-15 06:18:38 -03:00
parent 7628a8515b
commit 69ad074a79
2 changed files with 45 additions and 0 deletions
+10
View File
@@ -7,6 +7,16 @@ nodes:
- id: camera
path: dora-webcam
build: uv pip install .
# Settings belong here rather than in the environment of whatever starts the
# dataflow. Deliberately empty: a node's `env:` wins over the shell, and CI
# passes CAPTURE_FRAMES in through the shell, so pinning one here would
# silently override it. See the README for a populated example.
#
# env:
# CAMERA_ID: usb-Acme_Webcam
# IMAGE_WIDTH: 1280
# IMAGE_HEIGHT: 720
# ENCODING: jpeg
inputs:
tick: dora/timer/millis/33
outputs: