edge operations update (#539)
* edge operations update * bump version * edge name * update
This commit is contained in:
parent
5fe2f588a6
commit
a9a6ee6bf0
2 changed files with 11 additions and 7 deletions
|
|
@ -160,6 +160,14 @@ async def extract_edges(
|
||||||
invalid_at = edge_data.get('invalid_at', None)
|
invalid_at = edge_data.get('invalid_at', None)
|
||||||
valid_at_datetime = None
|
valid_at_datetime = None
|
||||||
invalid_at_datetime = None
|
invalid_at_datetime = None
|
||||||
|
source_node_uuid = node_uuids_by_name_map.get(edge_data.get('source_entity_name', ''), '')
|
||||||
|
target_node_uuid = node_uuids_by_name_map.get(edge_data.get('target_entity_name', ''), '')
|
||||||
|
|
||||||
|
if source_node_uuid == '' or target_node_uuid == '':
|
||||||
|
logger.warning(
|
||||||
|
f'WARNING: source or target node not filled {edge_data.get("edge_name")}. source_node_uuid: {source_node_uuid} and target_node_uuid: {target_node_uuid} '
|
||||||
|
)
|
||||||
|
continue
|
||||||
|
|
||||||
if valid_at:
|
if valid_at:
|
||||||
try:
|
try:
|
||||||
|
|
@ -177,12 +185,8 @@ async def extract_edges(
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
logger.warning(f'WARNING: Error parsing invalid_at date: {e}. Input: {invalid_at}')
|
logger.warning(f'WARNING: Error parsing invalid_at date: {e}. Input: {invalid_at}')
|
||||||
edge = EntityEdge(
|
edge = EntityEdge(
|
||||||
source_node_uuid=node_uuids_by_name_map.get(
|
source_node_uuid=source_node_uuid,
|
||||||
edge_data.get('source_entity_name', ''), ''
|
target_node_uuid=target_node_uuid,
|
||||||
),
|
|
||||||
target_node_uuid=node_uuids_by_name_map.get(
|
|
||||||
edge_data.get('target_entity_name', ''), ''
|
|
||||||
),
|
|
||||||
name=edge_data.get('relation_type', ''),
|
name=edge_data.get('relation_type', ''),
|
||||||
group_id=group_id,
|
group_id=group_id,
|
||||||
fact=edge_data.get('fact', ''),
|
fact=edge_data.get('fact', ''),
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[project]
|
[project]
|
||||||
name = "graphiti-core"
|
name = "graphiti-core"
|
||||||
description = "A temporal graph building library"
|
description = "A temporal graph building library"
|
||||||
version = "0.12.0"
|
version = "0.12.0pre2"
|
||||||
authors = [
|
authors = [
|
||||||
{ "name" = "Paul Paliychuk", "email" = "paul@getzep.com" },
|
{ "name" = "Paul Paliychuk", "email" = "paul@getzep.com" },
|
||||||
{ "name" = "Preston Rasmussen", "email" = "preston@getzep.com" },
|
{ "name" = "Preston Rasmussen", "email" = "preston@getzep.com" },
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue