-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (30 loc) · 865 Bytes
/
Copy pathMakefile
File metadata and controls
36 lines (30 loc) · 865 Bytes
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
.PHONY: install test lint format clean
VENV = .venv
PYTHON = $(VENV)/bin/python
PIP = $(VENV)/bin/pip
PYTEST = $(VENV)/bin/pytest
install:
python3 -m venv $(VENV)
$(PIP) install --upgrade pip
$(PIP) install -e ".[dev]"
test:
$(PYTEST) tests/
lint:
@if [ -f $(VENV)/bin/ruff ]; then \
$(VENV)/bin/ruff check kappabench/ tests/; \
else \
echo "ruff not installed. Run 'make install' first."; \
fi
format:
@if [ -f $(VENV)/bin/ruff ]; then \
$(VENV)/bin/ruff format kappabench/ tests/; \
elif [ -f $(VENV)/bin/black ]; then \
$(VENV)/bin/black kappabench/ tests/; \
else \
echo "Formatter (ruff/black) not installed. Run 'make install' first."; \
fi
clean:
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type d -name "*.egg-info" -exec rm -rf {} +
find . -type d -name ".pytest_cache" -exec rm -rf {} +
rm -rf build/ dist/