Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add severity levels that are not violations #192

Open
bergos opened this issue Feb 20, 2024 · 8 comments
Open

Add severity levels that are not violations #192

bergos opened this issue Feb 20, 2024 · 8 comments
Labels
Core For SHACL 1.2 Core spec
Milestone

Comments

@bergos
Copy link
Contributor

bergos commented Feb 20, 2024

sh:Info, sh:Warning, and sh:Violation are defined as violations. It would be good to have severity levels not defined as violations. They could show detailed information on which constraints have been processed.

shacl-engine already uses two new levels in its own namespace:

  • Debug: Shows that a constraint has been processed.
  • Trace: For property shapes without constraints showing the traversal path.
@HolgerKnublauch
Copy link
Contributor

I have never quite understood why sh:Info counts as a violation.

@HolgerKnublauch
Copy link
Contributor

@bergos
Copy link
Contributor Author

bergos commented Feb 25, 2024

We should have both; dash:*Result classes in the SHACL namespace and additional levels.

Info, Warning, and Violation (Error) match the typical levels of loggers with messages an end-user would see. Debug and Trace would be the levels for shape developers, like in the use cases I described previously.

The spec could explicitly mention that an implementation is allowed to have a parameter to change the severity level where the result becomes a failure/violation. With the default set to Info this would not be a breaking change. The new result classes should be used according to the setting given to the engine.

@HolgerKnublauch HolgerKnublauch transferred this issue from w3c/shacl Jan 20, 2025
@HolgerKnublauch HolgerKnublauch added the Core For SHACL 1.2 Core spec label Jan 20, 2025
@nicholascar nicholascar added this to the Phase 1 milestone Mar 3, 2025
@robert-david
Copy link

What about "positive" matches of nodes which validate successfully?

@tpluscode
Copy link
Contributor

What about "positive" matches of nodes which validate successfully?

As much as I support that because it would help finding cases where nothing was actually validated (no matching targets), we need to be careful around logical constraints.

Think sh:not. Positive matches from the negated constraints actually results in from sh:not. And as always, that becomes most interesting with sh:xone.

@ajnelson-nist
Copy link
Contributor

[...] The spec could explicitly mention that an implementation is allowed to have a parameter to change the severity level where the result becomes a failure/violation. [...]

It may also be helpful to know what this tunable level was as part of the validation report. "sh:conforms false - because of the sh:Violations, or the sh:Warnings? How strict were they on this run?"

@robert-david
Copy link

[...] The spec could explicitly mention that an implementation is allowed to have a parameter to change the severity level where the result becomes a failure/violation. [...]

It may also be helpful to know what this tunable level was as part of the validation report. "sh:conforms false - because of the sh:Violations, or the sh:Warnings? How strict were they on this run?"

It might require a new 3rd value for sh:conforms.

@VladimirAlexiev
Copy link
Contributor

What about "positive" matches of nodes which validate successfully?

@robert-david I support this need because it's useful to know. Especially for simple shapes like "node reference shape" that can be used to classify nodes (ONTO Semantic Objects calls this "business type discriminator").

@tpluscode can we at least provide a limited definition of "positive match" to cover common modeling subsets of shape features?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core For SHACL 1.2 Core spec
Projects
None yet
Development

No branches or pull requests

7 participants