-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (41 loc) · 1.57 KB
/
Makefile
File metadata and controls
54 lines (41 loc) · 1.57 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
.PHONY: help install install-dev setup pre-commit-install pre-commit-run lint format typecheck test clean lock-check run
VENV_DIR = .venv
help:
@echo 'Available commands:'
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
install: ## Install production dependencies
uv sync
install-dev: ## Install development dependencies
uv sync --extra dev
setup: ## Initialize development environment
@if [ ! -d "$(VENV_DIR)" ]; then \
echo 'Creating virtual environment in $(VENV_DIR)...'; \
uv venv; \
fi
@echo 'Installing dependencies...'
@uv sync --extra dev
@echo 'Installing pre-commit hooks...'
@uv run pre-commit install
@echo '\n✅ Setup complete. To activate the environment, run:\nsource .venv/bin/activate'
pre-commit-install: ## Install pre-commit hooks
uv run pre-commit install
pre-commit-run: ## Run pre-commit hooks on all files
uv run pre-commit run --all-files
lint: ## Run linter (ruff)
uv run ruff check . --fix
format: ## Run formatter (ruff)
uv run ruff format .
typecheck: ## Run ty type checker
uv run ty check
test: ## Run Pytest
uv run pytest
clean: ## Remove caches & pyc files
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type d -name ".pytest_cache" -exec rm -rf {} +
find . -type d -name ".ruff_cache" -exec rm -rf {} +
rm -rf .pytest_cache .ruff_cache .mypy_cache .coverage
lock-check: ## Ensure uv.lock is up-to-date
uv sync --locked --extra dev
run: ## Run the main application
uv run templates-python