-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (40 loc) · 1.15 KB
/
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
#run:
# python runner.py
#
#test:
# python -m pytest -p no:warnings tests/
#
#clean:
# find . -name '*.pyc' -delete
# find . -name '__pycache__' -type d | xargs rm -fr
local-run: runtime-config
INTAKE_DIR=runtime/intake \
COMPLETED_DIR=runtime/completed \
PDF_COMPLETED_HOOK="./test-data/test_complete_hook.sh" \
python scanman/scanman.py
docker:
docker build -t scanman:development .
runtime-config:
mkdir -p runtime/intake runtime/completed
docker-run: docker runtime-config
docker run -it \
-v $(shell pwd)/runtime/intake:/scanman/intake \
-v $(shell pwd)/runtime/completed:/scanman/completed \
scanman:development
docker-shell: docker runtime-config
docker run -it \
-v $(shell pwd)/runtime/intake:/scanman/intake \
-v $(shell pwd)/runtime/completed:/scanman/completed \
-v $(shell pwd)/test-data/test_complete_hook.sh:/scanman/post_pdf_script.sh \
-e PDF_COMPLETED_HOOK=/scanman/post_pdf_script.sh \
scanman:development bash
test:
PYTHONPATH=.:./scanman python -m pytest -s ./tests/
env:
pipenv install
pipenv shell
clean:
rm -rf runtime
rm -rf .pytest_cache
clean-env: clean
@echo "Exit the pipenv shell and run 'pipenv --rm'"