This repository has been archived by the owner on Sep 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (51 loc) · 1.6 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
# This is just a throwaway set of useful commands - nothing depends on
# this Makefile currently. The purpose is to support local testing.
# 1. Set up neo4j with 'make neo4j'
# 2. Optional: install a taxomachine graph db in data/graph.db (this
# is only needed for taxonomy-aware queries)
# 3. make index-repo
# 4. make running
# 5. make test
# 6. make stop
all: neo4j compile restart test
NEO=neo4j-community-1.9.5
PLUGIN=target/oti-neo4j-plugins-0.0.1-SNAPSHOT.jar
SETTINGS=host:apihost=http://localhost:7478 host:translate=true
$(NEO):
curl http://files.opentreeoflife.org/neo4j/$(NEO).tar.gz >$(NEO).tar.gz
tar xzvf $(NEO).tar.gz
sed -i ".bak" -e s+7474+7478+ -e s+7473+7477+ $(NEO)/conf/neo4j-server.properties
# Convenience target for initial setup
neo4j: $(NEO)
compile: $(PLUGIN)
SOURCES=$(shell echo `find src -name "*.java"`)
$(PLUGIN): $(SOURCES)
./mvn_serverplugins.sh
running: .running
.running: $(PLUGIN)
rm -f .running
$(NEO)/bin/neo4j stop
cp -p $(PLUGIN) $(NEO)/plugins/
$(NEO)/bin/neo4j start
touch .running
stop:
$(NEO)/bin/neo4j stop
rm -f .running
# use dev phylesystem for testing...
index-repo: $(NEO)
python index_current_repo.py \
http://127.0.0.1:7478/db/data/ext/studies_v3/graphdb \
https://devapi.opentreeoflife.org/phylesystem/v1
test-v3: .running
cd ws-tests; \
for test in test_v3*.py; do \
echo $$test; \
PYTHONPATH=../../germinator/ws-tests python $$test $(SETTINGS); \
done
test-v2: .running
cd ws-tests; \
for test in test_v2*.py; do \
echo $$test; \
PYTHONPATH=../../germinator/ws-tests python $$test $(SETTINGS); \
done
test: test-v2 test-v3