Use shared python makefile and start linting

Always update setuptools/wheel/pip

Never fail while linting

We use github annotations to impove the code incrementally.
This commit is contained in:
jo 2021-09-10 13:46:47 +02:00
parent 0d88d17f7c
commit ceb40ee216
7 changed files with 81 additions and 46 deletions

View file

@ -1,23 +1,11 @@
.PHONY: lint test
.ONESHELL:
SHELL := bash
CPU_CORES := $(shell nproc)
all: lint test
venv:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements-dev.txt
include python.mk
lint: venv
source venv/bin/activate
pylint tools
PIP_INSTALL := -r requirements-dev.txt
PYLINT_ARG := tools
PYTEST_ARG := .
test: venv
source venv/bin/activate
pytest -n ${CPU_CORES} --color=yes -v .
clean:
rm -Rf venv
lint: .pylint
test: .pytest
clean: .clean