Skip to content

Commit

Permalink
Add node binding qnode_id documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkwang committed Sep 22, 2021
1 parent 43808ef commit 53ba5be
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion strider/trapi_throttle/trapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ def result_contains_node_bindings(
result,
bindings: dict[str, list[str]]
):
""" Check that the result object has all bindings provided (qg_id->kg_id) """
"""Check that the result object has all bindings provided (qg_id->kg_id).
KPs that are returning a (proper) subclass of an entity allowed by the qnode
may use the optional `qnode_id` field to indicate the associated superclass.
"""
for qg_id, kg_ids in bindings.items():
if not any(
nb["id"] in kg_ids or nb.get("qnode_id") in kg_ids
Expand Down

0 comments on commit 53ba5be

Please sign in to comment.