From 34d7892d54f6929b38cef570ff9af00e81c27890 Mon Sep 17 00:00:00 2001 From: Tom Carrio Date: Tue, 22 Nov 2022 17:27:52 -0500 Subject: [PATCH] build: add Makefile for build tasks Signed-off-by: Tom Carrio --- Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..81d8eef --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +VENV = . .venv/bin/activate + +.venv: requirements-dev.txt + test -d .venv || python -m virtualenv .venv + $(VENV); pip install -Ur requirements-dev.txt + +.PHONY: test +test: .venv + $(VENV); pytest + +.PHONY: lint +lint: .venv + $(VENV); black . + $(VENV); flake8 . + $(VENV); isort . + +.PHONY: clean +clean: + @rm -rf .venv + @find -iname "*.pyc" -delete + +.PHONY: all +all: lint test