-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (85 loc) · 3.26 KB
/
rml-map-huri.yml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: HuRI to BioLink RDF
# TODO: Add step to manage versioning (delete previous graph, load new graph, generate metadata)
# 7,336,115 before reload
on:
workflow_dispatch:
inputs:
endpoint:
description: 'Upload to SPARQL endpoint'
required: true
default: 'https://graphdb.dumontierlab.com/repositories/ncats-red-kg/statements'
graph:
description: 'In the Graph'
required: true
default: 'https://w3id.org/d2s/graph/huri'
# push:
# branches: [ master ]
# paths:
# - 'datasets/huri/**'
# - '.github/workflows/rml-map-huri.yml'
jobs:
generate-rdf:
runs-on: ubuntu-latest
# runs-on: [self-hosted, linux, X64, node2]
outputs:
rdf-output: ${{ steps.stepupload.outputs.rdf_output }}
steps:
- uses: actions/checkout@v2
- name: Download CSV
run: datasets/huri/download/download.sh
- name: Run RML mapper
uses: vemonet/[email protected]
with:
mapping: datasets/huri/mapping/huri_mapping.rml.ttl
output: rdf-huri.nt
- name: Upload RDF output artifact
id: stepupload
uses: actions/upload-artifact@v1
with:
name: rdf-output
path: rdf-huri.nt
upload-rdf:
runs-on: ubuntu-latest
needs: generate-rdf
steps:
- uses: actions/checkout@v2
- name: Get RDF output artifact
uses: actions/download-artifact@v1
with:
name: rdf-output
- name: Upload RDF
uses: MaastrichtU-IDS/RdfUpload@master
with:
file: rdf-output/rdf-huri.nt
endpoint: ${{ github.event.inputs.endpoint }}
user: ${{ secrets.GRAPHDB_USER }}
password: ${{ secrets.GRAPHDB_PASSWORD }}
graph: ${{ github.event.inputs.graph }}
# - name: Upload file to GraphDB server
# run: |
# curl -Ffile=@rdf-output/rdf-preppi.nt 'http://upload.137.120.31.102.nip.io/upload?token=${{ secrets.GRAPHDB_UPLOAD_TOKEN }}'
# - name: Start GraphDB import
# run: |
# curl -X POST -u ${{ secrets.GRAPHDB_USER }}:${{ secrets.GRAPHDB_PASSWORD }} --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"fileNames": ["upload/rdf-preppi.nt"], "importSettings": {"context": "${{ github.event.inputs.graph }}"}}' '${{ github.event.inputs.graphdb_url }}/rest/data/import/server/${{ github.event.inputs.graphdb_repo }}'
# TODO: Add step to wait for GraphDB import to end
- name: Compute and insert HCLS descriptive metadata
uses: vemonet/sparql-operations-action@v1
with:
file: https://github.com/MaastrichtU-IDS/d2s-scripts-repository/tree/master/sparql/compute-hcls-stats
endpoint: ${{ github.event.inputs.endpoint }}
user: ${{ secrets.GRAPHDB_USER }}
password: ${{ secrets.GRAPHDB_PASSWORD }}
inputvar: ${{ github.event.inputs.graph }}
outputvar: https://w3id.org/d2s/metadata
servicevar: ${{ github.event.inputs.endpoint }}
# servicevar: http://localhost:7200/repositories/ncats-red-kg
- name: Run RDF to HDT
uses: vemonet/rdfhdt-action@master
with:
input: rdf-output/rdf-huri.nt
output: hdt-huri.hdt
- name: Upload HDT output artifact
uses: actions/upload-artifact@v1
with:
name: hdt-output
path: hdt-huri.hdt