Skip to content

Commit

Permalink
qname for paths in validation reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
gtfierro committed Nov 11, 2024
1 parent 22d7f29 commit f251eb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions buildingmotif/dataclasses/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def from_validation_report(cls, report: Graph) -> List["PathClassCount"]:
def reason(self) -> str:
"""Human-readable explanation of this GraphDiff."""
# interpret a SHACL property path as a sparql property path
path = shacl_path_to_sparql_path(self.graph, self.path)
path = self.graph.qname(shacl_path_to_sparql_path(self.graph, self.path))

classname = self.graph.qname(self.classname)
if self.maxc is None and self.minc is not None:
Expand Down Expand Up @@ -374,7 +374,7 @@ def from_validation_report(cls, report: Graph) -> List["RequiredPath"]:

def reason(self) -> str:
"""Human-readable explanation of this GraphDiff."""
path = shacl_path_to_sparql_path(self.graph, self.path)
path = self.graph.qname(shacl_path_to_sparql_path(self.graph, self.path))
if self.maxc is None and self.minc is not None:
return f"{self.focus} needs at least {self.minc} uses of path {path}"
if self.minc is None and self.maxc is not None:
Expand Down

0 comments on commit f251eb3

Please sign in to comment.