Skip to content

Commit 00231a5

Browse files
Merge pull request #8 from RedisGraph/redisgraph-cross-validation
Redisgraph cross validation
2 parents 152fa13 + 9407475 commit 00231a5

File tree

408 files changed

+2300279
-5912
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

408 files changed

+2300279
-5912
lines changed

.circleci/config.yml

Lines changed: 97 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,11 @@ workflows:
55
version: 2
66
build:
77
jobs:
8-
- test:
9-
filters:
10-
branches:
11-
ignore:
12-
- stable
8+
- test
139

1410
jobs:
1511
test:
16-
resource_class: large
12+
resource_class: xlarge
1713
machine:
1814
image: ubuntu-2004:202008-01
1915
steps:
@@ -24,41 +20,114 @@ jobs:
2420
export DEBIAN_FRONTEND=noninteractive
2521
sudo apt update
2622
# install dependencies
27-
sudo apt install -y curl git wget unzip maven netcat
28-
# driver
29-
git clone --depth 1 --branch dev https://github.com/ldbc/ldbc_snb_driver && cd ldbc_snb_driver && mvn install -DskipTests && cd ..
30-
# Cypher
23+
sudo apt install -y git
24+
# clone, build, and install driver
25+
git clone --depth 1 --branch 0.3.5 https://github.com/ldbc/ldbc_snb_driver && cd ldbc_snb_driver && mvn install -DskipTests && cd ..
26+
# PostgreSQL
27+
pip3 install --user --progress-bar off psycopg2-binary
28+
- run:
29+
name: Build project
30+
command: ./build.sh
31+
- run:
32+
name: Tiny data set - Load Cypher/Neo4j database (1st time)
33+
command: |
3134
cd cypher
32-
scripts/install-dependencies.sh
35+
. scripts/environment-variables-default.sh
36+
scripts/load-in-one-step.sh
3337
cd ..
34-
# PostgreSQL
35-
# TODO
3638
- run:
37-
name: Download data
39+
name: Tiny data set - Create validation parameters with Neo4j/Cypher project
3840
command: |
39-
mkdir data/
40-
cd data
41-
wget -q https://ldbc.github.io/ldbc_snb_data_converter/csv-composite-projected-fk.zip
42-
unzip csv-composite-projected-fk.zip
41+
cd cypher
42+
driver/create-validation-parameters.sh
43+
mv validation_params.csv validation_params_cypher_tiny.csv
4344
cd ..
4445
- run:
45-
name: Load
46+
name: Tiny data set - Load PostgreSQL database (1st time)
47+
command: |
48+
cd postgres
49+
export POSTGRES_CSV_DIR=`pwd`/test-data/
50+
scripts/start.sh
51+
scripts/create-db.sh
52+
scripts/load.sh
53+
cd ..
54+
- run:
55+
name: Tiny data set - Create validation parameters with the PostgreSQL project
56+
command: |
57+
cd postgres
58+
driver/create-validation-parameters.sh
59+
mv validation_params.csv validation_params_postgres_tiny.csv
60+
cd ..
61+
- run:
62+
name: Tiny data set - Load Cypher/Neo4j database (2nd time)
4663
command: |
47-
# PostgreSQL
48-
# TODO
49-
# Cypher
5064
cd cypher
5165
. scripts/environment-variables-default.sh
52-
export NEO4J_CSV_DIR=`pwd`/../data/csv-composite-projected-fk
53-
export NEO4J_CSV_POSTFIX=.csv
5466
scripts/load-in-one-step.sh
5567
cd ..
5668
- run:
57-
name: Test
58-
command: mvn test -B
69+
name: Tiny data set - Cross-validate the Neo4j/Cypher project based on the results from Postgres
70+
command: |
71+
mv postgres/validation_params_postgres_tiny.csv cypher/validation_params.csv
72+
cd cypher
73+
driver/validate.sh | tee validation-log.txt
74+
grep 'Validation Result: PASS' validation-log.txt
75+
cd ..
5976
- run:
60-
name: Run Cypher Python script
77+
name: Tiny data set - Load PostgreSQL database (2nd time)
78+
command: |
79+
cd postgres
80+
export POSTGRES_CSV_DIR=`pwd`/test-data/
81+
scripts/start.sh
82+
scripts/create-db.sh
83+
scripts/load.sh
84+
cd ..
85+
- run:
86+
name: Tiny data set - Cross-validate the Postgres project based on the results from Neo4j/Cypher
87+
command: |
88+
mv cypher/validation_params_cypher_tiny.csv postgres/validation_params.csv
89+
cd postgres
90+
driver/validate.sh | tee validation-log.txt
91+
grep 'Validation Result: PASS' validation-log.txt
92+
cd ..
93+
- run:
94+
name: Download SF1 data set
95+
command: |
96+
wget https://surfdrive.surf.nl/files/index.php/s/Ar7kacLw3LVzQaf/download --quiet --output-document=sf1.zip
97+
unzip sf1.zip
98+
# substitution parameters and updateStreams for Neo4j/Cypher
99+
cp ./sf1/substitution_parameters/* ./cypher/test-data/substitution_parameters/
100+
cp ./sf1/social_network-csv_composite/updateStream* ./cypher/test-data/update_streams/
101+
- run:
102+
name: SF1 data set - Load Cypher/Neo4j database
61103
command: |
62104
cd cypher
63-
python3 bi.py
105+
. scripts/environment-variables-default.sh
106+
export NEO4J_VANILLA_CSV_DIR=`pwd`/../sf1/social_network-csv_composite
107+
scripts/load-in-one-step.sh
108+
cd ..
109+
- run:
110+
name: SF1 data set - Create validation parameters with the Neo4j/Cypher
111+
command: |
112+
cd cypher
113+
driver/create-validation-parameters.sh
114+
mv validation_params.csv validation_params_cypher_sf1.csv
115+
cd ..
116+
- run:
117+
name: SF1 data set - Load PostgreSQL database
118+
command: |
119+
cd postgres
120+
export POSTGRES_CSV_DIR=`pwd`/../sf1/social_network-csv_merge_foreign
121+
scripts/start.sh
122+
scripts/create-db.sh
123+
scripts/load.sh
124+
cd ..
125+
- run:
126+
name: SF1 data set - Cross-validate the Postgres project based on the results from Neo4j/Cypher
127+
command: |
128+
mv cypher/validation_params_cypher_sf1.csv postgres/validation_params.csv
129+
cd postgres
130+
driver/validate.sh | tee validation-log.txt
131+
grep 'Validation Result: PASS' validation-log.txt
132+
cd ..
64133
- slack/status

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ validation_params.csv
1010
*.swp
1111
*-actual.json
1212
*-expected.json
13-
results-*/
13+
results/
1414
*.DS_Store
15-
*.report

0 commit comments

Comments
 (0)