-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
103 lines (79 loc) · 1.91 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
UNAME := $(shell uname)
ifeq ($(OSTYPE), Windows_NT)
PYTHON := python
PIP := pip
else
PYTHON := python3
PIP := pip3
endif
create-env:
$(PYTHON) -m venv venv
install-env:
ifeq ($(OSTYPE), Windows_NT)
( \
./venv/bin/activate; \
$(PIP) install -r requirements.txt; \
)
else ifeq ($(UNAME), Linux)
( \
. venv/bin/activate; \
$(PIP) install -r requirements.txt; \
)
else
( \
source venv/bin/activate; \
$(PIP) install -r requirements.txt; \
)
endif
install:
$(PIP) install -r samples/requirements.txt
run-kafka:
docker-compose -f kafka/docker-compose.yml up -d --build
stop-kafka:
docker-compose -f kafka/docker-compose.yml down
run-otel-collector:
docker-compose -f otel-collector/docker-compose.yml up -d --build
stop-otel-collector:
docker-compose -f otel-collector/docker-compose.yml down
set-up-backend:
( \
cd django; \
$(PIP) install -r requirements.txt; \
)
set-up-deployment:
cd machine-learning-api &&\
$(PIP) install -r requirements.txt
test-deployment:
cd machine-learning-api &&\
$(PYTHON) -m pytest
set-up-tracking:
cd tracking &&\
npm install
test-tracking:
cd tracking &&\
npm test
set-up-id-generator:
cd id-generator &&\
$(PIP) install -r requirements.txt
test-id-generator:
cd id-generator &&\
$(PYTHON) -m pytest
test-run-samples:
( \
$(PIP) install -r tests/requirements.txt; \
$(PYTHON) tests/test_run_samples.py; \
)
set-up-order-delivery-time-handler:
cd order-delivery-time-handler &&\
$(PIP) install -r requirements.txt
test-order-delivery-time-handler:
cd order-delivery-time-handler &&\
$(PYTHON) -m pytest
test-backend:
cd django &&\
coverage run manage.py test
backend-server: set-up-backend test-backend
deployment: set-up-deployment test-deployment
tracking: set-up-tracking test-tracking
order-delivery-time-handler: set-up-order-delivery-time-handler test-order-delivery-time-handler
kafka-docker: run-kafka test-run-samples stop-kafka