-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (30 loc) · 785 Bytes
/
Makefile
File metadata and controls
31 lines (30 loc) · 785 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
PYMODULES := redisdemo
VENV := .venv
PYTHON := env PYTHONPATH=. $(VENV)/bin/python3
RUFF := $(VENV)/bin/ruff
PYTEST := env PYTEST=1 $(VENV)/bin/pytest
PIP := $(VENV)/bin/python3 -m pip
default: test
venv:
./utils/ensure_pkg_installed.py python3-pip python3-venv
if ! test -d $(VENV); then \
python3 -m venv $(VENV) ; \
fi
dev-deps: venv
$(PIP) install -q -r requirements-dev.txt
deps: venv
$(PIP) install -q -r requirements.txt
lint: deps dev-deps
$(RUFF) check $(PYMODULES)
$(RUFF) format $(PYMODULES)
test: lint
$(PYTEST) $(PYMODULES)
check: test
pipfreeze:
$(PIP) freeze | tee pip-freeze.txt
shell:
$(PYTHON) -i -c 'import rss_assist, qb_assist, stats, ptfly'
run:
install:
$(PIP) install -e .
.PHONY: default venv dev-deps deps check test pipfreeze shell run install