:: @echo off
setlocal

REM --- Proxy settings (if needed) ---
REM If you are behind a proxy, uncomment(Remove 'REM') and edit the following lines:
REM set HTTP_PROXY=http://your.proxy.server:port
REM set HTTPS_PROXY=http://your.proxy.server:port
REM pip config set global.proxy http://your.proxy.server:port

cd /d %~dp0

REM create python virtual environment
echo Creating virtual environment...

python -m venv ..\SRC\Handson_venv

REM activate virtual environment
call ..\SRC\Handson_venv\Scripts\activate

REM install python packages
echo Installing dependencies...
python -m pip install --upgrade pip
python -m pip install -r ..\requirements.txt
if errorlevel 1 (
    echo Failed to install dependencies.
    exit /b 1
)

endlocal

echo Setup complete!
pause
