Merge pull request #1339 from jooola/feat/ci_start_linting
Start linting 🎉 !
This commit is contained in:
commit
56f5a84146
18 changed files with 209 additions and 75 deletions
|
@ -1,16 +1,12 @@
|
|||
.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
|
||||
MYPY_ARG := api_clients tests
|
||||
PYTEST_ARG := --cov=api_clients tests
|
||||
|
||||
lint: .pylint .mypy
|
||||
test: .pytest
|
||||
clean: .clean
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
pylint
|
||||
pytest
|
||||
pytest-cov
|
||||
pytest-xdist
|
|
@ -18,10 +18,21 @@ setup(
|
|||
},
|
||||
license="AGPLv3",
|
||||
packages=["api_clients"],
|
||||
python_requires=">=3.6",
|
||||
install_requires=[
|
||||
"configobj",
|
||||
"python-dateutil>=2.7.0",
|
||||
"requests",
|
||||
],
|
||||
extras_require={
|
||||
"prod": [],
|
||||
"dev": [
|
||||
"mypy",
|
||||
"pylint",
|
||||
"pytest",
|
||||
"pytest-cov",
|
||||
"pytest-xdist",
|
||||
],
|
||||
},
|
||||
zip_safe=False,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue