Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (40 loc) · 1.33 KB
/
Copy pathMakefile
File metadata and controls
53 lines (40 loc) · 1.33 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
52
53
.PHONY: clean lint checktypes checkstyle fixstyle test test-all
clean:
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
rm -fr .coverage
rm -fr htmlcov/
rm -fr .pytest_cache
rm -fr .venv/
lint: checktypes checkstyle ## run all checks
liccheck:
poetry export -f requirements.txt -o requirements.txt
poetry run liccheck || true
rm -f requirements.txt
checktypes: .venv ## check types with mypy
poetry run mypy --ignore-missing-imports gameoflife tests
checkstyle: .venv ## check style with flake8, black and isort
poetry run flake8 gameoflife
poetry run isort --check-only --profile black gameoflife tests
poetry run black -l 99 --check --diff gameoflife tests
fixstyle: .venv ## fix black and isort style violations
poetry run isort --profile black gameoflife tests
poetry run black -l 99 gameoflife tests
test: .venv ## quick run of unit tests
poetry run pytest --verbose --capture=no --cov=gameoflife --cov-fail-under=0
test-all: lint test
.venv: poetry.lock
poetry install
@touch -c .venv
poetry.lock:
poetry lock -vvv
@touch -c poetry.lock
-include Makefile_aux
-include Makefile_override