Skip to content

Commit 1158a58

Browse files
committed
Added make.ps1 to emulate make commands on Windows
1 parent cb75e06 commit 1158a58

File tree

2 files changed

+102
-0
lines changed

2 files changed

+102
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ See our paper in [Multi-Agent Collaboration via Evolving Orchestration](https://
130130
* **YAML placeholders**: Use `${VAR}`(e.g., `${API_KEY}`)in configuration files to reference these variables.
131131

132132
### ⚡️ Run the Application
133+
**Important:** For native windows (not WSL), use `./make.ps1` instead of `make` for all commands. IE: `./make.ps1 dev`
133134

134135
#### Using Makefile (Recommended)
135136

make.ps1

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
param (
2+
[Parameter(Position=0)]
3+
[string]$Command = "help"
4+
)
5+
6+
function Show-Help {
7+
$makefile = Join-Path $PSScriptRoot "Makefile"
8+
if (-not (Test-Path $makefile)) {
9+
Write-Host "Makefile not found." -ForegroundColor Yellow
10+
return
11+
}
12+
13+
$commands = @()
14+
foreach ($line in Get-Content $makefile) {
15+
if ($line -match '^([a-zA-Z_-]+):.*?## (.*)$') {
16+
$commands += [PSCustomObject]@{
17+
Name = $matches[1]
18+
Desc = $matches[2]
19+
}
20+
}
21+
}
22+
23+
foreach ($cmd in ($commands | Sort-Object Name)) {
24+
Write-Host ("{0,-20} {1}" -f $cmd.Name, $cmd.Desc)
25+
}
26+
}
27+
28+
function Start-Server {
29+
Write-Host "Starting server in background..."
30+
Start-Process -NoNewWindow uv -ArgumentList "run", "python", "server_main.py", "--port", "6400"
31+
}
32+
33+
function Start-Client {
34+
Write-Host "Starting frontend server..."
35+
$env:VITE_API_BASE_URL="http://localhost:6400"
36+
npm run dev --prefix frontend
37+
}
38+
39+
function Stop-Servers {
40+
pushd frontend
41+
Write-Host "Stopping backend server (port 6400)..."
42+
npx kill-port 6400
43+
Write-Host "Stopping frontend server (port 5173)..."
44+
npx kill-port 5173
45+
popd
46+
}
47+
48+
function Sync-Graphs {
49+
uv run python tools/sync_vuegraphs.py
50+
}
51+
52+
function Validate-Yamls {
53+
uv run python tools/validate_all_yamls.py
54+
}
55+
56+
function Test-Backend {
57+
uv run pytest -v
58+
}
59+
60+
function Lint-Backend {
61+
uvx ruff check .
62+
}
63+
64+
switch ($Command) {
65+
"dev" {
66+
Start-Server
67+
Start-Client
68+
}
69+
"server" {
70+
Start-Server
71+
}
72+
"client" {
73+
Start-Client
74+
}
75+
"stop" {
76+
Stop-Servers
77+
}
78+
"sync" {
79+
Sync-Graphs
80+
}
81+
"validate-yamls" {
82+
Validate-Yamls
83+
}
84+
"check-backend" {
85+
Test-Backend
86+
Lint-Backend
87+
}
88+
"backend-tests" {
89+
Test-Backend
90+
}
91+
"backend-lint" {
92+
Lint-Backend
93+
}
94+
"help" {
95+
Show-Help
96+
}
97+
default {
98+
Write-Host "Unknown command: $Command" -ForegroundColor Red
99+
Show-Help
100+
}
101+
}

0 commit comments

Comments
 (0)