ruby-rdf / shacl

Implementation of Shapes Constraint Language (SHACL) for RDF.rb
The Unlicense
8 stars 3 forks source link

qualifiedValueShape not working as expected #5

Open saumier opened 1 month ago

saumier commented 1 month ago

The behaviour of sh:qualifiedValueShape does not appear to be working as specified in SHACL Spec https://www.w3.org/TR/shacl/#QualifiedValueShapeConstraintComponent

I have created a repo with examples: https://github.com/saumier/shacl-test-qualified-value-shape

saumier commented 1 month ago

@gkellogg FYI I took a quick look into qualifier_value.rb:20 and this jumped out as needing to fix: max_count = params[:qualifiedMinCount] which should be max_count = params[:qualifiedMaxCount]

But this did not fix the issue. Looks like the params are not getting added to the operands.

gkellogg commented 1 month ago

That seems right. Would you consider a PR including a test for this?

saumier commented 1 month ago

I'd love to give it a whirl. Let me try ;-)

saumier commented 1 month ago

I'm having a little trouble running rspec. I came across https://w3c.github.io/data-shapes/data-shapes-test-suite. Have the shacl.rb implementation reports ever been submitted? This is something of interest to me.

gkellogg commented 1 month ago

Never submitted a report, but the infrastructure for generating it should be there.

There is some code to look for the test suite files relative to /spec. (It works better when those tests are local). Look in spec/suite_helper.rb for the file open patch that looks for them.

you can also email me directly for help in working with the gem.