/
gr.ev.vl
/
TestGen
Обзор
Документация
Войти
/
gr.ev.vl
/
TestGen
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
scripts/setup_dev.cmd
106 строк
2 KB
gr.ev.vl
Initial commit
06 июн 2026, 02:41
06 июн 2026, 02:41
02fb1fb
Код
Авторство
О чём код?
@echo off chcp 1251 >nul setlocal enabledelayedexpansion title TestGen � ��������� ��������� cd /d "E:\_GEV\_My_project\TestGen" echo ============================================ echo ��������� ��������� ���������� TestGen echo ============================================ echo. :: �������� Python echo [1/5] �������� Python... where python >nul if %errorlevel% neq 0 ( echo [X] Python �� ������. ���������� Python 3.12+ pause exit /b 1 ) for /f "tokens=2" %%v in ('python --version ') do echo [OK] Python %%v :: �������� Node.js echo [2/5] �������� Node.js... where node >nul if %errorlevel% neq 0 ( echo [X] Node.js �� ������. ���������� Node.js 20+ pause exit /b 1 ) for /f "tokens=2" %%v in ('node --version ') do echo [OK] Node.js %%v :: Backend echo [3/5] ��������� backend... cd backend if exist ".venv" ( echo [OK] ����������� ��������� ����������. ) else ( echo �������� ������������ ���������... python -m venv .venv echo [OK] ����������� ��������� �������. ) echo ��������� ������������... call .venv\Scripts\activate.bat python -m pip install --upgrade pip --quiet :: ������� ����� uv where uv >nul if %errorlevel% equ 0 ( echo ������������ uv... uv sync --group dev ) else ( echo ������������ pip... if exist "requirements.txt" pip install -r requirements.txt --quiet ) :: �������� .env if not exist ".env" ( if exist ".env.example" ( copy /y ".env.example" ".env" >nul echo [OK] ������ .env �� .env.example ) ) cd .. :: Frontend echo [4/5] ��������� frontend... cd frontend if exist "node_modules" ( echo [OK] node_modules ����������. ) else ( echo ��������� npm-������������... call npm install echo [OK] ����������� �����������. ) cd .. :: ������ echo [5/5] ������������� ������... if not exist "backend\datas" ( echo �������� ��������� ������... cd backend call .venv\Scripts\python.exe -c "from src.testgen.infrastructure.storage.file_db import init_file_db; db = init_file_db('./datas'); print(f'Created {len(db.get_all_tables())} tables')" cd .. echo [OK] ��������� ������ �������. ) else ( echo [OK] ���������� datas ����������. ) echo ============================================ echo ��������� ��������� echo. echo ��� �������: echo scripts\run_backend.cmd echo scripts\run_frontend.cmd echo. echo ��� �� �����: echo scripts\run_all.cmd echo ============================================ pause