-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (43 loc) · 1.63 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
help:
@echo "make requirements: installs java/maven/node/... on your system"
@echo "make env: create conda environment"
@echo "make neo4j: run neo4j"
@echo "make build: builds this project"
@echo "make update: updates the conda environment"
@echo "make start: runs this project"
requirements:
make -f Requirements.mk all
env:
conda env create -f environment.yml
neo4j:
sudo neo4j start
build:
cd frontend && \
if [ -d "node_modules" ]; then rm -r node_modules; fi && \
if [ -f "package-lock.json" ]; then rm package-lock.json; fi && \
npm install && \
npm run build && \
cd ../backend/gephi && \
mvn install
update:
conda env update --file environment.yml --prune
start:
echo "remember to activate your conda environment with 'conda activate pgdb'"
echo "remember to start neo4j with 'make neo4j'"
cd backend/src; sudo env "PATH=$$PATH" python main.py
deployment:
sudo kill `cat backend/src/process.pid` > /home/ubuntu/logs/kill.log 2>&1 || true
$(MAKE) update > /home/ubuntu/logs/update.log 2>&1
$(MAKE) build > /home/ubuntu/logs/build.log 2>&1
cd backend/src; nohup sudo env "PATH=$$PATH" python main.py --pid > /home/ubuntu/logs/server.log 2>&1
restart:
sudo kill `cat backend/src/process.pid` > /home/ubuntu/logs/kill.log 2>&1 || true
cd backend/src; nohup sudo env "PATH=$$PATH" python main.py --pid > /home/ubuntu/logs/server.log 2>&1
lint:
find . -name "*.py" | xargs black -l 120 --target-version=py311
test:
# frontend
cd frontend && npm audit --audit-level high
# backend
python -m unittest discover backend
find . -name "*.py" | xargs black -l 120 --check --target-version=py311