-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
64 lines (41 loc) · 1002 Bytes
/
Makefile
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
54
55
56
57
58
59
60
61
62
63
64
SHELL = /bin/bash
APP_DIR = pyproject # TODO: Replace with the name of your app directory.
export PYTHONPATH
default: install install-dev
all: hooks install install-dev fmt-check lint typecheck test
h help:
@grep '^[a-z]' Makefile
.PHONY: hooks
hooks:
cd .git/hooks && ln -s -f ../../hooks/pre-push pre-push
install:
pip install pip --upgrade
pip install -r requirements.txt
install-dev:
pip install -r requirements-dev.txt
upgrade:
pip install pip --upgrade
pip install -r requirements.txt --upgrade
pip install -r requirements-dev.txt --upgrade
fmt:
black .
isort .
fmt-check:
black . --diff --check
isort . --diff --check-only
pylint:
pylint $(APP_DIR) \
|| pylint-exit $$?
flake8:
# Error on syntax errors or undefined names.
flake8 . --select=E9,F63,F7,F82 --show-source
# Warn on everything else.
flake8 . --exit-zero
lint: pylint flake8
fix: fmt lint
t typecheck:
mypy $(APP_DIR) tests
test:
pytest
run:
cd $(APP_DIR) && python ./pyproject.py World