Comments (2)
Spot on, that was the issue. Indeed conforms was true
once I printed it (that code was initially from a Notebook hence not having print on the last line). Debug set to false removed that message.
I also tested by defining a Shape for the sh:qualifiedValueShape (so not an anonymous shape anymore). That removes the other warning even with Debug=true
.
schema:DocumentShape
a sh:NodeShape ;
sh:targetClass schema:Document ;
sh:property [
sh:message "At least one Author" ;
sh:path schema:isTargetOf ;
sh:qualifiedMinCount 1 ;
sh:qualifiedValueShape schema:CodeShape ;
] ;
.
schema:CodeShape
a sh:NodeShape ;
sh:targetClass schema:HasAuthor ;
sh:property [
sh:message "code needs a single T/F value for schema:isPresent" ;
sh:path schema:isPresent ;
sh:datatype xsd:boolean ;
sh:maxCount 1 ;
sh:minCount 1 ;
]
.
Anyway I turned debug off (since I don't need it :) but this was helpful anyway for me to understand what's happening in shacl :)
from pyshacl.
Hi @jameshowison.
There are three Shacl Shapes defined in that ShapesFile. There's the NodeShape called schema:DocumentShape, an anonymous PropertyShape on its sh:property
, and an anonymous NodeShape given on the sh:qualifiedValueShape
constraint.
You're not seeing a sh:message because the constraint that is failing is the ClassConstraint in the anonymous shape given on sh:qualifiedValueShape
, and that shape doesnt have a sh:message.
The DocumentShape and it's property-shape are both still passing.
What is the value of the conforms
variable after the validation result is returned? I believe it will be True
becuse the qualifiedValueShape constraint still passes, and your data is still conformant.
You are seeing that extra violation in the command line output because you have debug=True
, it will show all violations, even including the ones which do not cause your data to be non-conformant.
from pyshacl.
Related Issues (20)
- CI fails on pyduktape HOT 5
- [Discussion] Pinned vs loose requirements, application vs library use cases HOT 5
- SPARQL ASK rule incorrectly passing HOT 7
- Can the prettytable dependency be upgraded to major version 3? HOT 1
- Generating SHACL-SPARQL shapes in RDFLib HOT 2
- Shacl does not seem to work on rdflib.Dataset() HOT 1
- Unable to see the validation result in pyshacl HOT 2
- How to ensure subject is not a sh:BlankNode when validating a owl:Class in an ontology? HOT 4
- owl:imports for data graph is hardcoded to false HOT 2
- pySHACL uses deprecated API `pkg_resources` HOT 4
- Trouble with qualified value shape HOT 6
- Failed to catch violations with properties that are not defined HOT 8
- Is a shape (whether node or property) restricted to one instance of sh:not? HOT 5
- Multiple sh:nots causing strange validation results HOT 2
- Multiple sh:xones on one sh:NodeShape grouping member shapes causing unexpected validation results
- `sh:entailment` and `pyshacl --advanced` HOT 1
- `sh:severity` on shapes linked by `sh:node` HOT 2
- `_evaluation_path` length is not configurable HOT 3
- [Discussion] Higher performance "remote" validation
- Difference between PySHACL and TopBraid SHACL API HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyshacl.