diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..cea2c19ee496e2711d9b7352e199ed1febb67e4b --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,68 @@ +image: python:latest + +stages: + - validate + +before_script: + - python -V + - pip install virtualenv + - virtualenv venv + - source venv/bin/activate + +validate: + stage: + validate + tags: + - runner:docker + parallel: + matrix: + - KIND: "Ontologies" + - KIND: "Profiles" + - KIND: "Rules" + - KIND: "Terms" + - KIND: "Vocabularies" + variables: + TTLNAME: "*.ttl" + FAILONERROR: 1 + JUNITREPORT: .out/report.xml + script: + - pip install pyshacl + - TTLDIR=`echo "$KIND" | awk '{ print tolower($1) }'` + - mkdir -p ".out/$TTLDIR" + - | + echo "" >> $JUNITREPORT + echo "" >> $JUNITREPORT + echo "" >> $JUNITREPORT + FAIL=0 + for RDFFILE in $(find "$TTLDIR" -name "$TTLNAME"); + do + REPORT=".out/$RDFFILE.report" + mkdir -p $(dirname $REPORT) ; touch $(basename $REPORT) + pyshacl -i rdfs $RDFFILE >> $REPORT 2>&1 || FAIL=1 ; (exit 0) + echo "" >> $JUNITREPORT + if [[ "$(tail $REPORT)" =~ "Conforms: True" ]] + then + echo "- [OK] \"$RDFFILE\" conforms!" + else + echo "- [ERROR] \"$RDFFILE\" does not conform!" + MSG="Validation Error" + if [[ "$(tail $REPORT)" =~ (rdflib\.plugins)(.*\n*)* ]]; then + MSG=`echo "${BASH_REMATCH[0]}" | sed 's/&/\&/g; s//\>/g; s/"/\"/g; s/'"'"'/\'/g'` + echo "${BASH_REMATCH[0]}" + fi + echo ""$MSG"" >> $JUNITREPORT + fi + echo "" >> $JUNITREPORT + done + echo "" >> $JUNITREPORT + echo "" >> $JUNITREPORT + mkdir -p $(dirname .out/$KIND) + cp $JUNITREPORT .out/$KIND.xml + (exit $(($FAILONERROR && $FAIL))) + artifacts: + paths: + - .out + expire_in: 1 day + when: always + reports: + junit: $JUNITREPORT diff --git a/ontologies/dc/terms/index.ttl b/ontologies/dc/terms/index.ttl index 40227aa5e7e0f3ca97fc706c9c3a433d0364d07f..06525cdce81e2fabd08fdb5c7d9eb4b41ab104b8 100644 --- a/ontologies/dc/terms/index.ttl +++ b/ontologies/dc/terms/index.ttl @@ -49,7 +49,7 @@ dcterms:DCMIType rdfs:comment "The set of classes specified by the DCMI Type Vocabulary, used to categorize the nature or genre of the resource."@en ; rdfs:isDefinedBy ; rdfs:label "DCMI Type Vocabulary"@en ; - rdfs:seeAlso . + rdfs:seeAlso ; dcterms:DDC dcterms:issued "2000-07-11"^^ ; diff --git a/profiles/radar/index.ttl b/profiles/radar/index.ttl index c27a8a8fdeba3cb4e9304b12744f4a3354104a87..17e8feb0f0917569411ce941c386cb141e83e6fa 100644 --- a/profiles/radar/index.ttl +++ b/profiles/radar/index.ttl @@ -28,7 +28,7 @@ sh:property coscineradar:subject ; sh:property coscineradar:type ; sh:property coscineradar:rights ; - sh:property coscineradar:rightsHolder . + sh:property coscineradar:rightsHolder ; coscineradar:creator sh:path dcterms:creator ; diff --git a/vocabularies/auto/criticality_phenomena/index.ttl b/vocabularies/auto/criticality_phenomena/index.ttl index 1a9aea3a931b35dc40fd279e3605b58e52e371aa..7fa90914dd6b6b0ac8cbf32e5bdef2f1d08a58ec 100644 --- a/vocabularies/auto/criticality_phenomena/index.ttl +++ b/vocabularies/auto/criticality_phenomena/index.ttl @@ -1,6 +1,5 @@ @base . -@prefix rdfs: . @prefix xsd: . @prefix dcterms: . @prefix auto: .