From 21b8eab3cb873a0c08842a9663a2f0f165eaf5b1 Mon Sep 17 00:00:00 2001 From: buenosairesam Date: Wed, 31 Dec 2025 08:42:03 -0300 Subject: [PATCH] spr standalone --- ctrl/build.sh | 22 ++++++++++++++++++++++ ctrl/logs.sh | 7 +++++++ ctrl/start.sh | 28 ++++++++++++++++++++++++++++ ctrl/stop.sh | 7 +++++++ soleprint/requirements.txt | 18 ++++++++++++++++++ 5 files changed, 82 insertions(+) create mode 100755 ctrl/build.sh create mode 100755 ctrl/logs.sh create mode 100755 ctrl/start.sh create mode 100755 ctrl/stop.sh diff --git a/ctrl/build.sh b/ctrl/build.sh new file mode 100755 index 0000000..65b5146 --- /dev/null +++ b/ctrl/build.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Build soleprint for local development +# +# Usage: +# ./build.sh # Build gen/ with default config +# ./build.sh amar # Build gen/ with amar room config + +set -e +cd "$(dirname "$0")/.." + +CFG="${1:-}" + +if [ -n "$CFG" ]; then + echo "Building with --cfg $CFG..." + python build.py dev --cfg "$CFG" +else + echo "Building soleprint..." + python build.py dev +fi + +echo "" +echo "Done. Run with: ./ctrl/start.sh" diff --git a/ctrl/logs.sh b/ctrl/logs.sh new file mode 100755 index 0000000..3c3ba44 --- /dev/null +++ b/ctrl/logs.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# View soleprint logs + +set -e +cd "$(dirname "$0")/../gen" + +docker compose logs -f "$@" diff --git a/ctrl/start.sh b/ctrl/start.sh new file mode 100755 index 0000000..e48ce1e --- /dev/null +++ b/ctrl/start.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# Start soleprint with Docker (for network access to other services) +# +# Usage: +# ./start.sh # Start in foreground +# ./start.sh -d # Start detached +# ./start.sh --build # Rebuild image first + +set -e +cd "$(dirname "$0")/.." + +# Ensure gen/ exists +if [ ! -d "gen" ]; then + echo "gen/ not found. Run ./ctrl/build.sh first" + exit 1 +fi + +cd gen + +ARGS="" +for arg in "$@"; do + case $arg in + -d|--detach) ARGS="$ARGS -d" ;; + --build) ARGS="$ARGS --build" ;; + esac +done + +docker compose up $ARGS diff --git a/ctrl/stop.sh b/ctrl/stop.sh new file mode 100755 index 0000000..71cd1d6 --- /dev/null +++ b/ctrl/stop.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Stop soleprint Docker container + +set -e +cd "$(dirname "$0")/../gen" + +docker compose down diff --git a/soleprint/requirements.txt b/soleprint/requirements.txt index 19fa8fa..c66a860 100644 --- a/soleprint/requirements.txt +++ b/soleprint/requirements.txt @@ -1,5 +1,23 @@ +# Soleprint core fastapi>=0.104.0 uvicorn[standard]>=0.24.0 pydantic>=2.5.0 +pydantic-settings>=2.0.0 httpx>=0.25.0 jinja2>=3.1.0 + +# Database (databrowse) +sqlalchemy>=2.0.0 +psycopg2-binary>=2.9.0 + +# Veins - Jira +jira>=3.5.0 + +# Veins - Slack +slack_sdk>=3.23.0 + +# Veins - Google +google-auth>=2.23.0 +google-auth-oauthlib>=1.1.0 +google-auth-httplib2>=0.1.1 +google-api-python-client>=2.100.0