From aeee4f24c8476d938f3f2758f0409c033409f6f5 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 10:05:36 +0000 Subject: [PATCH] feat: Add runner scripts for quick start and testing Added launcher scripts (launch.bat, launch.ps1, launch.sh) to make it easier to start the interactive session. They synchronize dependencies with uv, handle errors properly, and launch the application in session mode. Co-authored-by: ivangegovdve-sudo <225339531+ivangegovdve-sudo@users.noreply.github.com> --- launch.bat | 15 +++++++++++++++ launch.ps1 | 20 ++++++++++++++++++++ launch.sh | 23 +++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 launch.bat create mode 100644 launch.ps1 create mode 100755 launch.sh diff --git a/launch.bat b/launch.bat new file mode 100644 index 0000000..277e8fe --- /dev/null +++ b/launch.bat @@ -0,0 +1,15 @@ +@echo off +echo Starting Python Learning App... +echo Syncing dependencies... +call uv sync --group dev +if %errorlevel% neq 0 ( + echo Error syncing dependencies. Make sure 'uv' is installed. + pause + goto :eof +) + +echo Launching app... +call uv run python-learning session +if %errorlevel% neq 0 ( + pause +) diff --git a/launch.ps1 b/launch.ps1 new file mode 100644 index 0000000..9efb393 --- /dev/null +++ b/launch.ps1 @@ -0,0 +1,20 @@ +Write-Host "Starting Python Learning App..." -ForegroundColor Cyan + +Write-Host "Syncing dependencies..." -ForegroundColor Yellow +try { + uv sync --group dev + if ($LASTEXITCODE -ne 0) { + throw "uv sync failed with exit code $LASTEXITCODE" + } +} catch { + Write-Host "Error syncing dependencies. Make sure 'uv' is installed." -ForegroundColor Red + Write-Host $_.Exception.Message -ForegroundColor Red + Read-Host "Press Enter to quit..." + return +} + +Write-Host "Launching app..." -ForegroundColor Green +uv run python-learning session +if ($LASTEXITCODE -ne 0) { + Read-Host "Press Enter to quit..." +} diff --git a/launch.sh b/launch.sh new file mode 100755 index 0000000..89f271c --- /dev/null +++ b/launch.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# Text formatting +CYAN="\033[0;36m" +YELLOW="\033[1;33m" +GREEN="\033[0;32m" +RED="\033[0;31m" +NC="\033[0m" # No Color + +echo -e "${CYAN}Starting Python Learning App...${NC}" + +echo -e "${YELLOW}Syncing dependencies...${NC}" +if ! uv sync --group dev; then + echo -e "${RED}Error syncing dependencies. Make sure 'uv' is installed.${NC}" + read -p "Press Enter to quit..." + kill -INT $$ +fi + +echo -e "${GREEN}Launching app...${NC}" +if ! uv run python-learning session; then + read -p "Press Enter to quit..." + kill -INT $$ +fi