-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (31 loc) · 980 Bytes
/
Copy pathMakefile
File metadata and controls
41 lines (31 loc) · 980 Bytes
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
FRONTEND_DIR := frontend
BACKEND_DIR := backend
API_PROCESSORS ?= ocr pdf-to-png-archive
API_UV_GROUP :=
ifneq (,$(findstring ocr,$(API_PROCESSORS)))
API_UV_GROUP := --group mlx
endif
.PHONY: front-install front-dev front-build front-format api-format format test api-dev api-install
front-install:
cd $(FRONTEND_DIR) && pnpm install --frozen-lockfile
front-dev:
cd $(FRONTEND_DIR) && pnpm run dev
front-build:
cd $(FRONTEND_DIR) && pnpm run build
front-format:
cd $(FRONTEND_DIR) && pnpm run lint
api-format:
cd $(BACKEND_DIR) && \
uv run --with ruff ruff check --fix .; \
uv run --with ruff ruff check --select I --fix .; \
uv run --with ruff ruff format .
format: front-format api-format
test:
cd $(FRONTEND_DIR) && pnpm run test-ci
cd $(BACKEND_DIR) && PYTHONPATH=.. uv run --group dev pytest
api-install:
cd $(BACKEND_DIR) && uv sync
api-dev:
cd $(BACKEND_DIR) && \
PYTHONPATH=.. \
uv run $(API_UV_GROUP) python -m backend.main $(API_PROCESSORS)