Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix edge attribute meging #83

Merged
merged 4 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion reasoner_pydantic/kgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def update(self, other):
if other.attributes:
if self.attributes:
# We need to make sure we don't add a second KL/AT
new_attributes = HashableSet[Attribute]
new_attributes = HashableSet[Attribute].parse_obj(())
for attribute in other.attributes:
if attribute.attribute_type_id not in (
"biolink:knowledge_level",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="reasoner-pydantic",
version="5.0.5",
version="5.0.6",
author="Abrar Mesbah",
author_email="[email protected]",
url="https://github.com/TranslatorSRI/reasoner-pydantic",
Expand Down
14 changes: 12 additions & 2 deletions tests/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,12 @@ def test_merge_knowledge_graph_edges():
"upstream_resource_ids": ["kp0"],
},
],
"attributes": [],
"attributes": [
{
"attribute_type_id": "biolink:agent_type",
"value": "automated_agent",
}
],
}
},
},
Expand Down Expand Up @@ -510,7 +515,12 @@ def test_merge_knowledge_graph_edges():
"upstream_resource_ids": ["kp1"],
},
],
"attributes": [],
"attributes": [
{
"attribute_type_id": "biolink:agent_type",
"value": "automated_agent",
}
],
}
},
},
Expand Down
Loading