-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (40 loc) · 1.28 KB
/
Makefile
File metadata and controls
50 lines (40 loc) · 1.28 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
UNAME_S := $(shell uname -s)
EXTRAS := sae_lens
ifeq ($(UNAME_S),Linux)
EXTRAS := $(EXTRAS),triton,npu
endif
.PHONY: install test lint clean docs-serve docs-build ui-dev ui-build help
install:
uv sync --all-groups --extra $(EXTRAS)
cd ui && bun install
uv run pre-commit install
ui-dev:
cd ui && bun run dev
ui-build:
cd ui && bun run build
test:
uv run pytest
lint:
uv run ruff format .
uv run ruff check --fix .
uv run basedpyright
cd ui && bun run lint
docs-serve:
uv run mkdocs serve --livereload
docs-build:
uv run mkdocs build
clean:
rm -rf dist build .coverage .pytest_cache .ruff_cache site
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type d -name "*.egg-info" -exec rm -rf {} +
rm -rf ui/node_modules
help:
@echo "Available commands:"
@echo " make install - Install all dependencies (backend, frontend, pre-commit)"
@echo " make test - Run backend tests"
@echo " make lint - Run all linters and formatters (backend, frontend)"
@echo " make clean - Clean build artifacts and node_modules"
@echo " make docs-serve - Serve documentation locally"
@echo " make docs-build - Build documentation"
@echo " make ui-dev - Run ui in development mode"
@echo " make ui-build - Build ui for production"