-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (49 loc) · 1.44 KB
/
Turtle_File_Quality_Control.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
name: Turtle File Quality Control
on:
push:
paths:
- 'data/AOPWikiRDF.ttl'
- 'data/AOPWikiRDF-Genes.ttl'
- 'data/AOPWikiRDF-Void.ttl'
pull_request:
paths:
- 'data/AOPWikiRDF.ttl'
- 'data/AOPWikiRDF-Genes.ttl'
- 'data/AOPWikiRDF-Void.ttl'
jobs:
quality-control:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository
- name: Checkout Repository
uses: actions/checkout@v4
# Step 2: Set up Python (if needed for the tools)
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
# Step 3: Install RDFLib
- name: Install RDFLib
run: |
pip install rdflib
# Step 4: Syntax Check for Turtle Files
- name: Syntax Check for Turtle Files
run: |
for file in data/AOPWikiRDF.ttl data/AOPWikiRDF-Genes.ttl data/AOPWikiRDF-Void.ttl; do
echo "Checking syntax of $file"
python -m rdflib.util -i turtle $file || exit 1
done
# Optional: Upload Report (only if the workflow failed)
- name: Upload QC Report
if: failure()
uses: actions/upload-artifact@v3
with:
name: qc-report
path: data/qc-report.txt
- name: Upload QC Status
if: success()
uses: actions/upload-artifact@v3
with:
name: qc-status
path: .
retention-days: 7