-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (29 loc) · 895 Bytes
/
Makefile
File metadata and controls
36 lines (29 loc) · 895 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: help install test lint format clean check
help:
@echo "Available commands:"
@echo " make install - Install required dependencies"
@echo " make test - Run tests with pytest"
@echo " make lint - Run ruff linter and mypy"
@echo " make format - Run ruff formatter"
@echo " make check - Run format, lint, and test (CI simulation)"
@echo " make clean - Remove build and cache files"
install:
pip install --upgrade pip
pip install -r requirements_test.txt || true
pip install .[dev] || true
pre-commit install
test:
pytest --cov=custom_components.openwrt --cov-report=term-missing
lint:
ruff check .
mypy custom_components/openwrt
format:
ruff format .
check: format lint test
clean:
rm -rf .pytest_cache
rm -rf .mypy_cache
rm -rf .ruff_cache
find . -type d -name "__pycache__" -exec rm -rf {} +
rm -f coverage.xml
rm -f .coverage