From f0cc7709bd8604a4c4013ef0a5c1213acae3749a Mon Sep 17 00:00:00 2001 From: Preston Rasmussen <109292228+prasmussen15@users.noreply.github.com> Date: Tue, 5 Aug 2025 10:49:44 -0400 Subject: [PATCH] test updates (#806) * test updates * update --- examples/podcast/podcast_runner.py | 10 ++++++++-- pyproject.toml | 2 +- tests/test_graphiti_int.py | 2 +- uv.lock | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/examples/podcast/podcast_runner.py b/examples/podcast/podcast_runner.py index cf98655f..e3cf7496 100644 --- a/examples/podcast/podcast_runner.py +++ b/examples/podcast/podcast_runner.py @@ -65,6 +65,12 @@ class Person(BaseModel): occupation: str | None = Field(..., description="The person's work occupation") +class City(BaseModel): + """A city""" + + country: str | None = Field(..., description='The country the city is in') + + class IsPresidentOf(BaseModel): """Relationship between a person and the entity they are a president of""" @@ -92,7 +98,7 @@ async def main(use_bulk: bool = False): await client.add_episode_bulk( raw_episodes, group_id=group_id, - entity_types={'Person': Person}, + entity_types={'Person': Person, 'City': City}, edge_types={'IS_PRESIDENT_OF': IsPresidentOf}, edge_type_map={('Person', 'Entity'): ['IS_PRESIDENT_OF']}, ) @@ -109,7 +115,7 @@ async def main(use_bulk: bool = False): reference_time=message.actual_timestamp, source_description='Podcast Transcript', group_id=group_id, - entity_types={'Person': Person}, + entity_types={'Person': Person, 'City': City}, edge_types={'IS_PRESIDENT_OF': IsPresidentOf}, edge_type_map={('Person', 'Entity'): ['PRESIDENT_OF']}, previous_episode_uuids=episode_uuids, diff --git a/pyproject.toml b/pyproject.toml index 41639b64..c83ee19a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "graphiti-core" description = "A temporal graph building library" -version = "0.18.2" +version = "0.18.3" authors = [ { name = "Paul Paliychuk", email = "paul@getzep.com" }, { name = "Preston Rasmussen", email = "preston@getzep.com" }, diff --git a/tests/test_graphiti_int.py b/tests/test_graphiti_int.py index 237e2bfc..165464ce 100644 --- a/tests/test_graphiti_int.py +++ b/tests/test_graphiti_int.py @@ -64,7 +64,7 @@ async def test_graphiti_init(driver): await graphiti.build_indices_and_constraints() search_filter = SearchFilters( - node_labels=['Person'], + node_labels=['Person', 'City'], created_at=[[DateFilter(date=utc_now(), comparison_operator=ComparisonOperator.less_than)]], ) diff --git a/uv.lock b/uv.lock index cc771368..7264e4ea 100644 --- a/uv.lock +++ b/uv.lock @@ -746,7 +746,7 @@ wheels = [ [[package]] name = "graphiti-core" -version = "0.18.2" +version = "0.18.3" source = { editable = "." } dependencies = [ { name = "diskcache" },