-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (37 loc) · 1010 Bytes
/
Makefile
File metadata and controls
46 lines (37 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
PACKAGE=httprest
.PHONY: help
help:
@echo "venv -> prepare VENV with all dependencies installed"
@echo "test -> run tests"
@echo "clean -> remove autogenerated files (venv, cache, etc.)"
@echo "coverage -> run tests coverage and prepare HTML report"
venv:
poetry install
.PHONY: testdeps
testdeps:
poetry install --with test
.PHONY: test
test:
pytest -svvv tests
.PHONY: coverage
coverage:
pytest --cov-report html --cov=$(PACKAGE) --cov-report=html --cov-report=term tests
.PHONY: lintdeps
lintdeps:
poetry install --no-root --only=lint
.PHONY: lint
lint:
black $(PACKAGE) tests --check
pydocstyle $(PACKAGE)/** tests/**
flake8 $(PACKAGE) tests
pylint --rcfile=pyproject.toml $(PACKAGE) tests
mypy $(PACKAGE) tests
pip-audit -l
.PHONY: testall
testall: lint test
.PHONY: clean
clean:
rm -rf build _build dist *.egg-info .coverage htmlcov .nox
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
poetry env remove --all
py3clean . -v