From 9b6798a180c7b2b74a51391af9018c7224e10601 Mon Sep 17 00:00:00 2001 From: Michael Moese Date: Thu, 25 Feb 2021 17:47:41 +0100 Subject: [PATCH] Add a makefile with some default targets Add some targets - make help, print some usage help. Default target - make setup to install requirements using pip (make sure to activate your virtual environment first) - make test will run the tests - make clean, just a dummy for now Add required tools for testing and code analysis to requirements.txt Signed-off-by: Michael Moese --- Makefile | 23 +++++++++++++++++++++++ requirements.txt | 6 ++++++ 2 files changed, 29 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e5a5f5d --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +PYTHON=python3 +PYCODESTYLE=pycodestyle + +.DEFAULT_GOAL = help + +help: + @echo "The following targets are supported:" + @echo " setup install required packages" + @echo " test run the tests" + + +setup: + pip install -r requirements.txt + + +test: + ${PYCODESTYLE} *.py + ${PYTHON} -m pytest + +clean: + @echo "cleaning" + +.PHONY: setup test clean help diff --git a/requirements.txt b/requirements.txt index cbc7c45..706464a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,8 @@ flask flask_flatpages + +pytest +pytest-cov +requests +pycodestyle +codecov