-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (40 loc) · 1.01 KB
/
Makefile
File metadata and controls
51 lines (40 loc) · 1.01 KB
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
47
48
49
50
51
PACKAGE=csobpg
VENV=.venv
.PHONY: help
help:
@echo "venv -> prepare VENV with all dependencies installed"
@echo "test -> run tests"
@echo "nox -> run nox sessions"
@echo "clean -> remove autogenerated files (venv, cache, etc.)"
@echo "coverage -> run tests coverage and prepare HTML report"
$(VENV):
poetry install
.PHONY: venv
venv: $(VENV)
.PHONY: nox
nox:
nox
.PHONY: testdeps
testdeps:
poetry install --with test
.PHONY: test
test:
pytest -svvv tests
.PHONY: coverage
coverage:
pytest --cov-report html --cov=$(PACKAGE) tests/
.PHONY: lintdeps
lintdeps:
poetry install --no-root --only=lint
.PHONY: lint
lint:
black -l 79 . --check
pydocstyle --ignore=D102,D103,D105,D107,D203,D213 $(PACKAGE)/** tests/**
pylint --rcfile=pyproject.toml $(PACKAGE) tests
.PHONY: testall
testall: lint test
.PHONY: clean
clean:
rm -rf $(VENV) build _build dist *.egg-info .coverage htmlcov .nox
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
py3clean . -v