generated from cvxgrp/cvxcli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (39 loc) · 1.41 KB
/
Makefile
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
# Colors for pretty output
BLUE := \033[36m
BOLD := \033[1m
RESET := \033[0m
.DEFAULT_GOAL := help
.PHONY: help verify install fmt test clean
##@ Development Setup
venv:
@printf "$(BLUE)Creating virtual environment...$(RESET)\n"
@curl -LsSf https://astral.sh/uv/install.sh | sh
@uv venv --python 3.12
verify: ## Verify existence of ssh connection and gh
@printf "$(BLUE)Verify existence of ssh and gh...$(RESET)\n"
ssh -T [email protected] || true
gh --version
install: venv ## Install all dependencies using uv
@printf "$(BLUE)Installing dependencies...$(RESET)\n"
@uv sync --dev --frozen
##@ Code Quality
fmt: venv ## Run code formatting and linting
@printf "$(BLUE)Running formatters and linters...$(RESET)\n"
@uv pip install pre-commit
@uv run pre-commit install
@uv run pre-commit run --all-files
##@ Testing
test: install ## Run all tests
@printf "$(BLUE)Running tests...$(RESET)\n"
@uv pip install pytest
@uv run pytest src/tests
##@ Cleanup
clean: ## Clean generated files and directories
@printf "$(BLUE)Cleaning project...$(RESET)\n"
@git clean -d -X -f
##@ Help
help: ## Display this help message
@printf "$(BOLD)Usage:$(RESET)\n"
@printf " make $(BLUE)<target>$(RESET)\n\n"
@printf "$(BOLD)Targets:$(RESET)\n"
@awk 'BEGIN {FS = ":.*##"; printf ""} /^[a-zA-Z_-]+:.*?##/ { printf " $(BLUE)%-15s$(RESET) %s\n", $$1, $$2 } /^##@/ { printf "\n$(BOLD)%s$(RESET)\n", substr($$0, 5) }' $(MAKEFILE_LIST)