-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupload.bash
More file actions
executable file
·45 lines (36 loc) · 1.35 KB
/
upload.bash
File metadata and controls
executable file
·45 lines (36 loc) · 1.35 KB
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
set -e # immediately exit on error
source .env # load environment variables
echo Validate syntax of turtle files
python3 src/python/validate.py rdf
echo Create a dedicated ontology file for subsequent WebVOWL visualization
python3 src/python/rdf-processing.py \
-i rdf/ontology/*.ttl rdf/data/*.ttl \
-o rdf/processed/ontology.ttl \
-r src/sparql/inference-rules/*.sparql src/sparql/processing-rules/*.sparql
echo Create a lightweight ontology file
python3 src/python/rdf-processing.py \
-i rdf/ontology/*.ttl \
-o rdf/processed/ontology-light.ttl \
-r src/sparql/inference-rules/*.sparql src/sparql/processing-rules/*.sparql
echo Merge all data into one graph for subsequent LINDAS upload
python3 src/python/rdf-processing.py \
-i rdf/ontology/*.ttl rdf/data/*.ttl rdf/shape/*.ttl \
-o rdf/processed/graph.ttl \
-r src/sparql/inference-rules/*.sparql
echo Apply SHACL rules to check for constraint violations
pyshacl -s rdf/shape/shape.ttl -f human rdf/processed/graph.ttl
echo Delete existing data from LINDAS
curl \
--user "$USER:$PASSWORD" \
-X DELETE \
"$ENDPOINT?graph=$GRAPH"
echo Upload graph.ttl file to LINDAS
curl \
--user "$USER:$PASSWORD" \
-X POST \
-H "Content-Type: text/turtle" \
--data-binary @rdf/processed/graph.ttl \
"$ENDPOINT?graph=$GRAPH"
echo Test all queries on LINDAS PROD
pytest tests
echo All commands executed