-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (31 loc) · 1.21 KB
/
Makefile
File metadata and controls
47 lines (31 loc) · 1.21 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
IMAGE_NAME := docker-python-env
export PYTHONDONTWRITEBYTECODE := 1
export PYTHONUNBUFFERED := 1
.DEFAULT_GOAL := help
.PHONY: help lint format typecheck test fix check build run tf-init tf-plan tf-apply tf-destroy
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}'
lint: ## Run ruff linter
uv run ruff check .
format: ## Run black formatter (check mode)
uv run black --check .
typecheck: ## Run mypy type checker
uv run mypy src/
fix: ## Auto-fix ruff violations and reformat with black
uv run ruff check --fix .
uv run black .
test: ## Run tests with coverage
uv run pytest
check: lint format typecheck test ## Run all checks (lint, format, typecheck, test)
build: ## Build the Docker image
docker build -t $(IMAGE_NAME) .
run: ## Run the Docker container
docker run --rm $(IMAGE_NAME)
tf-init: ## Initialise Terraform working directory
terraform -chdir=terraform init
tf-plan: ## Show Terraform execution plan
terraform -chdir=terraform plan
tf-apply: ## Apply Terraform changes
terraform -chdir=terraform apply
tf-destroy: ## Destroy Terraform-managed infrastructure
terraform -chdir=terraform destroy