-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (37 loc) · 1.23 KB
/
Copy pathMakefile
File metadata and controls
49 lines (37 loc) · 1.23 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
.PHONY: install test coverage lint format typecheck check clean lock smoke
PYTHON ?= python
VENV ?= .venv
ifeq ($(OS),Windows_NT)
VENV_PYTHON := $(VENV)/Scripts/python.exe
else
VENV_PYTHON := $(VENV)/bin/python
endif
install:
@test -d $(VENV) || $(PYTHON) -m venv $(VENV)
$(VENV_PYTHON) -m pip install --upgrade pip
@if [ -f requirements-lock.txt ]; then \
$(VENV_PYTHON) -m pip install -r requirements-lock.txt; \
else \
$(VENV_PYTHON) -m pip install -r requirements.txt; \
fi
$(VENV_PYTHON) -m pip install -e ".[dev,build]"
test:
$(VENV_PYTHON) -m pytest
coverage:
$(VENV_PYTHON) -m pytest --cov=autoclicker --cov-report=term --cov-report=html --cov-report=xml
lint:
$(VENV_PYTHON) -m ruff check autoclicker autoclicker.py tests scripts
$(VENV_PYTHON) -m ruff format --check autoclicker autoclicker.py tests scripts tools run_tests.py
format:
$(VENV_PYTHON) -m ruff format .
typecheck:
$(VENV_PYTHON) -m mypy autoclicker
check: lint typecheck test
clean:
rm -rf $(VENV) build dist htmlcov
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type d -name "*.egg-info" -prune -exec rm -rf {} + 2>/dev/null || true
lock:
$(VENV_PYTHON) tools/refresh_lock.py
smoke:
$(VENV_PYTHON) scripts/smoke_check.py