-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (53 loc) · 1.54 KB
/
Makefile
File metadata and controls
68 lines (53 loc) · 1.54 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
56
57
58
59
60
61
62
63
64
65
66
67
68
.PHONY: install
install: ## Create the virtual environment and install dependencies
@echo "Creating virtual environment using uv"
@uv sync
@uv run prek install
.PHONY: lock
lock: ## Update uv.lock
@echo "Updating uv.lock"
@uv lock
.PHONY: export
export: ## Export requirements.txt from uv.lock
@echo "Exporting requirements.txt"
@uv export -o requirements.txt --format requirements.txt
.PHONY: run
run: ## Run the Gradio app
@uv run python app.py
.PHONY: test
test: ## Run tests
@uv run pytest
.PHONY: check
check: ## Run code quality checks
@echo "Checking lock file consistency with 'pyproject.toml'"
@uv lock --locked
@echo "Running pre-commit hooks via prek"
@uv run prek run -a
.PHONY: lint
lint: ## Run ruff lint
@uv run ruff check .
.PHONY: fmt
fmt: ## Run ruff formatter
@uv run ruff format .
.PHONY: docs-test
docs-test: ## Build docs with mkdocs
@uv run mkdocs build -s
.PHONY: docs
docs: ## Serve docs locally
@uv run mkdocs serve
.PHONY: help
help:
@awk -F '## ' '/^[A-Za-z_-]+:.*##/ { target = $$1; sub(/:.*/, "", target); printf "\033[36m%-20s\033[0m %s\n", target, $$2 }' $(MAKEFILE_LIST)
.PHONY: compose-up
compose-up: ## Build and start app + seekdb with docker compose
@docker compose up --build
.PHONY: compose-down
compose-down: ## Stop docker compose
@docker compose down
.PHONY: compose-logs
compose-logs: ## Tail docker compose logs
@docker compose logs -f
.PHONY: docker-build
docker-build: ## Build a single-container image for ModelScope Docker Studio
@docker build -t poweragent:latest .
.DEFAULT_GOAL := help