This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (47 loc) · 1.65 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
51
52
53
54
55
56
57
58
59
60
61
62
#
# Makefile of the project
#
# Raspberry adress :
RASPBERRY_ADDRESS = clearwayPi
# Login/password of the Raspberry :
RASPBERRY_LOGIN = pi
# Terminal to use for the ssh connexion (sshpass and ssh required)
TERM = gnome-terminal # gnome-terminal # xterm
TERMOPTIONS = -- # -- (for gnome-terminal) # -e (for xterm)
PROG_FOLDER = clearway
PROG_PACKAGE = clearway*.tar.gz
PROG_PACKAGE_FOLDER = dist/$(PROG_PACKAGE)
#
# Makefile rules.
#
# Compilation.
all:
# Cleaning-up.
.PHONY: clean
clean:
rm -f *.log
rm -rf dist/
rm -rf clearway.egg-info/
rm -rf reports/
rm -rf .coverage
find ./clearway -type d -name __pycache__ -exec rm -rf {} \;
find ./explo -type d -name __pycache__ -exec rm -rf {} \;
find ./tests -type d -name __pycache__ -exec rm -rf {} \;
cd documents/research && rm -rf _minted* && latexmk -C && cd ../..
build:
python3 -m build
upload:
scp -r $(PROG_PACKAGE_FOLDER) $(RASPBERRY_LOGIN)@$(RASPBERRY_ADDRESS):/home/$(RASPBERRY_LOGIN)/PROG_FOLDER
upload_package: build
scp -r $(PROG_PACKAGE_FOLDER) $(RASPBERRY_LOGIN)@$(RASPBERRY_ADDRESS):/home/$(RASPBERRY_LOGIN)
install: upload_package
ssh -t $(RASPBERRY_LOGIN)@$(RASPBERRY_ADDRESS) 'pip uninstall -y clearway && pip install -U $(PROG_PACKAGE) && rm $(PROG_PACKAGE)'
launch:
python3 -m clearway --no-gpio -i ../test/OpenCV/Tests_IA/bicycle_1fps.mp4 --yolo-weights ./resources/yolov2-tiny.weights --yolo-cfg ./resources/yolov2-tiny.cfg
check_quality:
python -m flake8 --config setup.cfg clearway/
python -m black --check --config pyproject.toml clearway/
python -m mypy --config-file setup.cfg clearway/
# Open a terminal on the Raspberry.
term:
ssh -t $(RASPBERRY_LOGIN)@$(RASPBERRY_ADDRESS)