generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
33 lines (28 loc) · 831 Bytes
/
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
VENV := .venv
# Format Python code with ruff format
.PHONY: format
format:
@echo "Formatting Python files with ruff format..."
$(VENV)/bin/ruff format
# Run ruff check to lint Python code in the whole repository
.PHONY: lint
lint:
@echo "Linting Python files with ruff check..."
$(VENV)/bin/ruff check
# Perform type checking
.PHONY: type-check
type-check:
@echo "Running type checking with mypy..."
$(VENV)/bin/mypy --strict ./inference_perf
# Check for and install dependencies
.PHONY: all-deps
all-deps:
@echo "Creating virtual environment if it doesn't exist..."
@if [ ! -d $(VENV) ]; then \
python3 -m venv $(VENV); \
fi
@echo "Activating virtual environment and installing dependencies..."
$(VENV)/bin/pip install --upgrade pip
$(VENV)/bin/pip install -e .
.PHONY: check
check: all-deps lint type-check