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:
@@ -1,5 +1,6 @@
|
||||
# Two gates, neither of which needs a camera or a display: the dataflow still
|
||||
# matches the typed contract in dora-node.yml, and the node's own tests pass.
|
||||
# Two gates, neither of which needs a camera or a display: the example dataflow
|
||||
# still matches the typed contract in dora-node.yml and still runs end to end,
|
||||
# and the node's own unit tests pass.
|
||||
name: validate
|
||||
|
||||
# A pull request would otherwise run this twice on the same commit: once for
|
||||
@@ -14,11 +15,22 @@ env:
|
||||
DORA_TARGET: x86_64-unknown-linux-gnu
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
dataflow:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# The opencv-python wheel links against libGL at import time, so cv2
|
||||
# cannot even be imported on the bare runner image.
|
||||
- name: Install the OpenCV shared libraries
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends libgl1 libglib2.0-0
|
||||
|
||||
- uses: astral-sh/setup-uv@v5
|
||||
with:
|
||||
enable-cache: true
|
||||
|
||||
- name: Install the dora CLI
|
||||
run: |
|
||||
curl -fsSL -o dora-cli.tar.gz \
|
||||
@@ -36,13 +48,19 @@ jobs:
|
||||
- name: Validate the dataflow
|
||||
run: dora validate dataflow.yml
|
||||
|
||||
# CI=true is already set by the runner, which keeps the viewer from trying
|
||||
# to open a window; SOURCE_FRAMES bounds the source so the run ends on its
|
||||
# own. Everything the dataflow needs is in the checkout.
|
||||
- name: Run the dataflow headless
|
||||
env:
|
||||
SOURCE_FRAMES: 30
|
||||
run: dora run dataflow.yml --uv
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# The opencv-python wheel links against libGL at import time, so cv2
|
||||
# cannot even be imported on the bare runner image.
|
||||
- name: Install the OpenCV shared libraries
|
||||
run: |
|
||||
sudo apt-get update
|
||||
@@ -59,6 +77,4 @@ jobs:
|
||||
|
||||
- run: uv run ruff check .
|
||||
|
||||
# CI=true is already set by the runner, which is what keeps the node from
|
||||
# trying to open a window on a headless machine.
|
||||
- run: uv run pytest -q
|
||||
|
||||
Reference in New Issue
Block a user