You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Check alternatives to GitHub actions and pages #19
To have all vocabularies in a github repository checked we wrote a bash script that we use in the CI pipeline. It's just a composition of the docker approach run for every .ttl file:
curl -s https://raw.githubusercontent.com/skohub-io/shapes/main/scripts/checkForWarning.rq >> checkForWarning.rq
find . -type f -name '*.ttl'|whileread file;do# Adjust the file path to remove the './' part
adjusted_file_path=$(echo "$file"| sed 's|^./||')echo"Processing $adjusted_file_path with Docker..."
docker run --rm -v "$(pwd)/$adjusted_file_path:/rdf/test.ttl" skohub/jena:4.6.1 shacl validate --shapes https://raw.githubusercontent.com/skohub-io/shapes/main/skohub.shacl.ttl --data /rdf/test.ttl >> result.ttl
validation_result="$(docker run --rm --mount type=bind,source=./checkForWarning.rq,target=/rdf/checkForViolation.rq --mount type=bind,source=./result.ttl,target=/rdf/result.ttl skohub/jena:4.6.1 arq --data /rdf/result.ttl --query /rdf/checkForViolation.rq)"echo$validation_result
lines=$(echo "$validation_result"| wc -l )# Correct validation has 4 lines of output
[[ ${lines}-eq 4 ]] ||exit 1
done
To have all vocabularies in a github repository checked we wrote a bash script that we use in the CI pipeline. It's just a composition of the docker approach run for every .ttl file:
And if this batch script is in it's own file, you can also use it from gitlab ci !
Currently it's in a github action, if i understand that right.
However, i've added the validation now in my build.sh that i use locally.
Activity
naturzukunft commentedon Apr 15, 2024
Gitlab Sample
Output
naturzukunft commentedon Apr 15, 2024
I currently have trouble with the links!
Data: https://gitlab.com/linkedopenactors/sobawi/taxanomie/-/blob/link_problem/data/sobawi.ttl?ref_type=tags
^ is there something wrong ?
Home site:
https://taxanomie-linkedopenactors-sobawi-23d2178c9dfb7360db30da12818e7.gitlab.io/taxanomie-linkedopenactors-sobawi-23d2178c9dfb7360db30da12818e7.gitlab.io/taxonomie.sobawi.org/index.html
sanitaertechnik link:
https://taxanomie-linkedopenactors-sobawi-23d2178c9dfb7360db30da12818e7.gitlab.io/taxanomie-linkedopenactors-sobawi-23d2178c9dfb7360db30da12818e7.gitlab.io/taxonomie.sobawi.org/sanitaertechnik.html
-> not found
naturzukunft commentedon Apr 16, 2024
solved, the problem was the missing inScheme
acka47 commentedon Apr 16, 2024
You might add an automatic validation step in your workflow, @naturzukunft, to be notified about things that will hinder a proper SkoHub build. The documentation for adding it in GitHub Actions is here: https://github.com/skohub-io/shapes?tab=-ov-file#add-validation-in-a-vocabulary-repository
naturzukunft commentedon Apr 16, 2024
@acka47 are we talking about a jena docker image by "Check with Docker"
Do you maybe have a more detailed sample ?
naturzukunft commentedon Apr 16, 2024
Ah, I found it in this terrible script ;-)
https://hub.docker.com/r/skohub/jena
Did I already say that I am not a script person :-)
naturzukunft commentedon Apr 16, 2024
In general, it would be helpful to move the script parts into files so that they can be reused more easily.
sroertgen commentedon Apr 16, 2024
I don't really get what you mean. Can you please elaborate with what you mean to move the script parts into files?
Here is the general idea:
How to use the shape with your vocabs. There are multiple ways:
just use locally. Test your vocabularies using some tooling that can work with shacl. E.g. the Jena Tools (https://jena.apache.org/documentation/shacl/), see also https://github.com/skohub-io/shapes/?tab=readme-ov-file#check-with-apache-jena-shacl
Maybe you don't want to install dedicated software. Then you can use docker: https://github.com/skohub-io/shapes/?tab=readme-ov-file#check-with-docker
To have all vocabularies in a github repository checked we wrote a bash script that we use in the CI pipeline. It's just a composition of the docker approach run for every
.ttlfile:naturzukunft commentedon Apr 16, 2024
And if this batch script is in it's own file, you can also use it from gitlab ci !
Currently it's in a github action, if i understand that right.
However, i've added the validation now in my build.sh that i use locally.
Info: i moved the gitlab project!
sroertgen commentedon Apr 16, 2024
Alright. Got it. Will do so, when coming to this issue.