-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
32 lines (24 loc) · 857 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
.PHONY: test
CLI=docker-compose run --rm pkg
TOX=$(CLI) tox
help: # list available targets with descriptions if they exist
@sed -n 's/\(^[^_#[:space:].\%*][[:alnum:]]*:\)\([^#]*\)\(#.*$$\)\{0,1\}/\1 \3/ip' Makefile | column -t -s '#' | sort
update:
touch requirements-test.txt
docker-compose build
docker-compose stop
$(CLI) /bin/bash -c 'pip-compile --resolver backtracking requirements-test.in'
docker-compose rm -f
docker-compose build
bash: # start a bash shell in the container
$(CLI) /bin/bash
test: # run tests in the container
$(TOX)
test-watch: # continuously run tests in the container
$(CLI) /bin/bash -c '$(PYTEST); while inotifywait -qqre modify .; do $(TOX); done'
format: # format python project code
$(CLI) black .
$(CLI) isort .
reset: # destroy current local CLI containers
docker-compose stop
docker-compose down -v