forked from flightaware/firestarter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.inc
43 lines (29 loc) · 975 Bytes
/
Makefile.inc
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
BLACK=black
PYLINT=pylint
PYTHON=python3
venv: venv/bin/activate
venv/bin/activate:
test -d venv || $(PYTHON) -m venv venv
. venv/bin/activate && $(PYTHON) -m pip install pip-tools
pip-compile: venv
. venv/bin/activate && make -C requirements all
pip-sync: venv pip-compile
. venv/bin/activate && venv/bin/pip-sync $(wildcard requirements/*.txt)
pip-sync-ci:
$(PYTHON) -m pip install pip-tools
pip-sync $(wildcard requirements/*.txt)
docker-setup: venv pip-sync
type-check:
. venv/bin/activate && mypy --check-untyped-defs .
format:
. venv/bin/activate && $(PYTHON) -m $(BLACK) --line-length=100 .
lint:
. venv/bin/activate && $(PYTHON) -m $(PYLINT) *.py
check: lint type-check
test:
. venv/bin/activate && $(PYTHON) -m unittest discover -s test
test-ci:
$(PYTHON) -m unittest discover -s test
run:
docker-compose -f ../docker-compose.yml up --build $(PROGNAME)
.PHONY: venv pip-compile pip-sync docker-setup type-check format lint check test run