Skip to content

Commit

Permalink
Setting Edge Binding Attributes as an empty list #2272
Browse files Browse the repository at this point in the history
  • Loading branch information
kvnthomas98 committed Apr 26, 2024
1 parent 348e8c2 commit 08bfaba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/ARAX/ARAXQuery/ARAX_resultify.py
Expand Up @@ -738,7 +738,7 @@ def _get_results_for_kg_by_qg(kg: KnowledgeGraph, # all nodes *must
for node_key in node_keys]
edge_bindings = dict()
for qedge_key, edge_keys in result_graph['edges'].items():
edge_bindings[qedge_key] = [EdgeBinding(id=edge_key) for edge_key in edge_keys]
edge_bindings[qedge_key] = [EdgeBinding(id=edge_key,attributes=[]) for edge_key in edge_keys]
result = Result(node_bindings=node_bindings, analyses=[Analysis(resource_id=resource_id,
edge_bindings=edge_bindings)])

Expand Down
4 changes: 2 additions & 2 deletions code/ARAX/ARAXQuery/result_transformer.py
Expand Up @@ -22,7 +22,7 @@ def transform(response: ARAXResponse):
f"to TRAPI 1.4 format (i.e., support_graphs).", error_code="NoOriginalQG")
return

response.info(f"Transforming results to TRAPI 1.4 format (moving 'virtual' nodes/edges to support graphs)")
response.info(f"Transforming results to TRAPI 1.5 format (moving 'virtual' nodes/edges to support graphs)")

original_qedge_keys = {qedge_key for qedge_key, qedge in response.original_query_graph.edges.items()
if not qedge.exclude} # 'Exclude'/'kryptonite' edges shouldn't appear in results
Expand Down Expand Up @@ -134,4 +134,4 @@ def transform(response: ARAXResponse):
# Log some final stats about result transformation
response.debug(f"Virtual qedge keys moved to support_graphs were: {all_virtual_qedge_keys}")
response.debug(f"There are a total of {len(message.auxiliary_graphs) if message.auxiliary_graphs else 0} AuxiliaryGraphs.")
response.info(f"Done transforming results to TRAPI 1.4 format (i.e., using support_graphs)")
response.info(f"Done transforming results to TRAPI 1.5 format (i.e., using support_graphs)")

0 comments on commit 08bfaba

Please sign in to comment.