-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
65 lines (54 loc) · 2.24 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
language = python
project_name = saraweb
environment = myvenv
data_path = manager/fixtures
initial_data = $(data_path)/initial_data.json
fake_classes = $(data_path)/fake_classes.json
fake_rooms = $(data_path)/fake_rooms.json
ads_classes = $(data_path)/ads_classes.json
other_classes = $(data_path)/other_classes.json
ads_rooms = $(data_path)/ads_rooms.json
other_rooms = $(data_path)/other_rooms.json
ads_timetabling = $(data_path)/ads_class_schedules.json
all_timetabling = $(data_path)/all_classes_schedules.json
ads_class_assignment = $(data_path)/ads_room_mapping_20171.json
manage = manage.py
activate = . $(environment)/bin/activate
fill_timetabling = fill_data timetabling
fill_class_assignment = fill_data class_assignment
venv:
$(language) -m venv $(environment)
$(activate)
migrate:
$(activate)
$(environment)/bin/pip install -r requirements.txt
$(environment)/bin/$(language) $(manage) makemigrations manager
$(environment)/bin/$(language) $(manage) migrate
default-data:
$(activate)
$(environment)/bin/$(language) $(manage) loaddata $(initial_data)
fake-data:
$(environment)/bin/$(language) $(manage) loaddata $(fake_classes)
$(environment)/bin/$(language) $(manage) loaddata $(fake_rooms)
ads-data:
$(environment)/bin/$(language) $(manage) loaddata $(ads_classes)
$(environment)/bin/$(language) $(manage) loaddata $(ads_rooms)
$(environment)/bin/$(language) $(manage) $(fill_timetabling) $(ads_timetabling)
$(environment)/bin/$(language) $(manage) $(fill_class_assignment) $(ads_class_assignment)
other-data:
$(environment)/bin/$(language) $(manage) loaddata $(other_rooms)
$(environment)/bin/$(language) $(manage) loaddata $(other_classes)
$(environment)/bin/$(language) $(manage) $(fill_timetabling) $(all_timetabling)
$(environment)/bin/$(language) $(manage) $(fill_class_assignment) $(ads_class_assignment)
run:
$(activate)
$(environment)/bin/$(language) $(manage) createsuperuser
$(environment)/bin/$(language) $(manage) runserver
install-saracore:
git clone https://github.com/sara-project/sara-core.git
cd sara-core/sara-engine/ && make all
install-default: venv migrate default-data
install-ads: install-default ads-data
install-fake: install-default fake-data
install: install-default ads-data other-data
all: install install-saracore run