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

@ -0,0 +1,9 @@
all: lint
include ../../tools/python.mk
PIP_INSTALL := --editable .[dev]
PYLINT_ARG := airtime-celery
lint: .pylint
clean: .clean

View file

@ -1,19 +1,15 @@
.PHONY: lint test
all: lint test
SHELL := bash
CPU_CORES := $(shell nproc)
include ../../tools/python.mk
MODULE_APP := airtime_analyzer
MODULE_TESTS := tests
PIP_INSTALL := --editable .[dev]
PYLINT_ARG := airtime_analyzer tests
PYTEST_ARG := --cov=airtime_analyzer tests
lint:
pylint ${MODULE_APP}
pylint ${MODULE_TESTS}
lint: .pylint
fixtures:
bash tests/fixtures/generate.sh
test: fixtures
pytest -n ${CPU_CORES} --color=yes -v --cov=${MODULE_APP} ${MODULE_TESTS}
all: lint test
test: fixtures .pytest
clean: .clean

View file

@ -1,16 +1,11 @@
.PHONY: lint test
SHELL := bash
CPU_CORES := $(shell nproc)
MODULE_APP := api_clients
MODULE_TESTS := tests
lint:
pylint ${MODULE_APP}
pylint ${MODULE_TESTS}
test:
pytest -n ${CPU_CORES} --color=yes -v --cov=${MODULE_APP} ${MODULE_TESTS}
all: lint test
include ../../tools/python.mk
PIP_INSTALL := --editable .[dev]
PYLINT_ARG := api_clients tests
PYTEST_ARG := --cov=api_clients tests
lint: .pylint
test: .pytest
clean: .clean

View file

@ -0,0 +1,9 @@
all: lint
include ../../tools/python.mk
PIP_INSTALL := --editable .[dev]
PYLINT_ARG := liquidsoap pypo
lint: .pylint
clean: .clean