Skip to content

Commit

Permalink
Fix error triggered by nbmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Mec-iS committed Sep 5, 2022
1 parent 80e04b4 commit e506265
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kglab/algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def to_incidence(self):

def to_laplacian(self):
"""
Return laplacian matrix for the KG. Graph is turned into undirected.
Return Laplacian matrix for the KG. Graph is turned into undirected.
[docs](https://networkx.org/documentation/stable/reference/generated/networkx.linalg.laplacianmatrix.laplacian_matrix.html)
returns:
Expand Down
16 changes: 16 additions & 0 deletions kglab/kglab.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,3 +383,19 @@ def remove (
ic(p)
ic(o)
raise TypeError(str(e))

def generate_report_graph(self, name, graph):
"""
Generate a report from an arbitrary graph
name:
title of the report
graph:
graph or subgraph to print the report for
"""
return KnowledgeGraph(
name=name,
namespaces=self.get_ns_dict(),
import_graph=graph,
)
5 changes: 2 additions & 3 deletions kglab/standards.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,9 @@ def validate (
encoding="utf-8"
)

report_graph = KnowledgeGraph(
report_graph = self.generate_report_graph(
name="SHACL report graph",
namespaces=self.get_ns_dict(),
import_graph=g,
graph=g,
)

return conforms, report_graph, report_text
Expand Down

0 comments on commit e506265

Please sign in to comment.