Skip to content

Commit

Permalink
Use obograph.Xref instance and remove prefixes that don't have graph …
Browse files Browse the repository at this point in the history
…data
  • Loading branch information
nanglo123 committed Sep 26, 2024
1 parent 1a33254 commit d1980e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mira/dkg/construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,7 @@ def _get_edge_name(curie_: str, strict: bool = False) -> str:

if parse_results.graph_document is None:
click.secho(f"No graphs in {prefix}, skipping", fg="red")
use_case_paths.EDGES_PATHS.pop(prefix)
continue

_graphs = parse_results.graph_document.graphs
Expand Down Expand Up @@ -1104,7 +1105,7 @@ def _get_edge_name(curie_: str, strict: bool = False) -> str:

if add_xref_edges:
for xref in node.xrefs:
if not isinstance(xref, Xref):
if not isinstance(xref, obograph.Xref):
raise TypeError(f"Invalid type: {type(xref)}: {xref}")
if not xref.value:
continue
Expand Down

0 comments on commit d1980e2

Please sign in to comment.