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.
28 lines
938 B
YAML
28 lines
938 B
YAML
# The camera alone, and the CI gate: with CI=true a failed read publishes a
|
|
# placeholder frame rather than raising, so this runs on a machine with no
|
|
# camera.
|
|
strict_types: true
|
|
|
|
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:
|
|
- image
|
|
|
|
# Nothing consumes the frames: the point is that the node opens, encodes and
|
|
# publishes. Set PREVIEW=true to watch them in a local window instead of
|
|
# wiring a viewer node.
|