aplbrain / aplbrain/grand-cypher
is_edge_attr_match fails on attribs other than labels
- 主要言語
- Python
- スター
- 129
- フォーク
- 17
- PR マージ指標
- PR 指標を取得中
説明
the function _is_edge_attr_match doesn't work on any other attributes other than __labels__
This is due two the _aggregate_edge_labels
```python
motif_edges = _aggregate_edge_labels(motif_edges)
host_edges = _aggregate_edge_labels(host_edges)
```
After the calls, motif_edges and host_edges only have __labels__ attributes left, and other attribuets are dropped.
```python
def _aggregate_edge_labels(edges: Dict) -> Dict:
"""
Aggregate '__labels__' attributes from edges into a single set.
"""
aggregated = {"__labels__": set()}
for edge_id, attrs in edges.items():
if "__labels__" in attrs and attrs["__labels__"]:
aggregated["__labels__"].update(attrs["__labels__"])
elif "__labels__" not in attrs:
aggregated[edge_id] = attrs
return aggregated
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。