-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (34 loc) · 1.32 KB
/
Copy pathMakefile
File metadata and controls
45 lines (34 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
MAMBA ?= /opt/homebrew/Caskroom/miniconda/base/condabin/mamba
ENV ?= ai_infra
HOST ?= 127.0.0.1
BACKEND_PORT ?= 8010
.PHONY: help backend backend-reload frontend dev install-backend install-frontend test build health
help:
@echo "PulseGraph commands:"
@echo " make backend Start backend on $(HOST):$(BACKEND_PORT)"
@echo " make backend-reload Start backend with reload"
@echo " make frontend Start Vite frontend"
@echo " make dev Start backend + frontend together"
@echo " make test Run backend and frontend tests"
@echo " make build Build frontend"
@echo " make health Check backend health"
backend:
$(MAMBA) run -n $(ENV) python -m uvicorn app.main:app --app-dir backend --host $(HOST) --port $(BACKEND_PORT)
backend-reload:
$(MAMBA) run -n $(ENV) python -m uvicorn app.main:app --app-dir backend --reload --host $(HOST) --port $(BACKEND_PORT)
frontend:
cd frontend && npm run dev
dev:
$(MAKE) backend-reload & $(MAKE) frontend
install-backend:
$(MAMBA) run -n $(ENV) python -m pip install -r backend/requirements.txt
install-frontend:
cd frontend && npm install
test:
$(MAMBA) run -n $(ENV) python -m pytest backend/tests
cd frontend && npm test -- --run
build:
cd frontend && npm run build
health:
curl -s http://$(HOST):$(BACKEND_PORT)/health
@printf "\n"