-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (44 loc) · 1.25 KB
/
Makefile
File metadata and controls
55 lines (44 loc) · 1.25 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
46
47
48
49
50
51
52
53
54
55
.PHONY: install dev test lint type-check format build docker-build docker-up clean audit
install:
npm ci
pip install -r requirements.txt
dev:
@echo "Starting all services..."
npm run dev --workspace=src/frontend & \
npm run dev --workspace=src/backend & \
python -m uvicorn src.ml.api:app --host 0.0.0.0 --port 8000 --reload & \
wait
test:
npm run test --workspaces --if-present
python -m pytest src/ml/ --tb=short -q --cov=src/ml --cov-report=xml --cov-fail-under=70
lint:
npm run lint
python -m flake8 src/ml/ --max-line-length=120
python -m black --check src/ml/
python -m mypy src/ml/ --ignore-missing-imports
type-check:
npx tsc --noEmit
python -m mypy src/ml/ --ignore-missing-imports
format:
npx prettier --write 'src/**/*.{ts,tsx,json,css}'
python -m black src/ml/
build:
npm run build --workspace=src/frontend
npm run build --workspace=src/backend
docker-build:
docker compose build
docker-up:
docker compose up
clean:
rm -rf dist/
rm -rf src/frontend/dist/
rm -rf src/backend/dist/
rm -rf coverage/
rm -rf .pytest_cache/
rm -rf htmlcov/
rm -f coverage.xml
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type f -name '*.pyc' -delete 2>/dev/null || true
audit:
npm audit
pip-audit -r requirements.txt