Pumping-station demo overhaul + cross-node test harness + bumps
Some checks failed
CI / lint-and-test (push) Has been cancelled
Some checks failed
CI / lint-and-test (push) Has been cancelled
Submodule bumps land the deadlock fix (state.js residue unpark + MGC optimalControl dispatch reorder) and pumpingStation stopLevel hysteresis. - Renames examples/pumpingstation-3pumps-dashboard → pumpingstation-complete-example with regenerated flow.json. New dashboard groups, demand-broadcast wiring, S88 placement rule applied, ui-chart trend-split and link-channel naming follow .claude/rules/node-red-flow-layout.md. - New cross-node test harness under test/: end-to-end-pumpingstation drives PS + MGC + 3 pumps + physics simulator end-to-end and verifies the ~5/15 min cycle. - Adds Grafana provisioning dashboards (pumping-station.json) and a helper sync-example.sh script for export/import to live Node-RED. - Docker entrypoint + settings + compose tweaks for the persistent user dir layout used by the demo. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
36
scripts/sync-example.sh
Executable file
36
scripts/sync-example.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
# Copy examples/<name>/flow.json into the running Node-RED project's
|
||||
# flow.json. Use this after regenerating flow.json from build_flow.py
|
||||
# when you want the runtime to reload the canonical source.
|
||||
#
|
||||
# Usage:
|
||||
# scripts/sync-example.sh <project-name>
|
||||
#
|
||||
# Example:
|
||||
# scripts/sync-example.sh pumpingstation-complete-example
|
||||
set -e
|
||||
|
||||
NAME="${1:-pumpingstation-complete-example}"
|
||||
SRC="examples/$NAME/flow.json"
|
||||
CONTAINER="evolv-nodered"
|
||||
DST="/data/projects/$NAME/flow.json"
|
||||
|
||||
if [ ! -f "$SRC" ]; then
|
||||
echo "error: $SRC not found (run from EVOLV repo root)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! docker ps --format '{{.Names}}' | grep -q "^$CONTAINER$"; then
|
||||
echo "error: $CONTAINER is not running" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Copying $SRC → $CONTAINER:$DST"
|
||||
docker cp "$SRC" "$CONTAINER:$DST"
|
||||
|
||||
echo "Reloading flows..."
|
||||
curl -s -X POST "http://localhost:1880/flows" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Node-RED-Deployment-Type: full" \
|
||||
--data-binary "@$SRC" \
|
||||
-w 'HTTP %{http_code}\n'
|
||||
Reference in New Issue
Block a user