0.2.0 - 2026-04-12
Aligned with grafeo 0.5.37. New features, test coverage and documentation improvements.
Added
- Auto-detect embedding dimensions from model probe at init
- Entity deduplication: configurable cosine similarity threshold merges near-duplicate entities
- Timestamps:
created_atandupdated_aton all nodes, UTC ISO 8601 - Convenience API:
node_count,edge_count,summary(),neighbors(),persist(),close() GrafeoPGRetriever: custom retriever with PageRank reranking and multi-hop expansion- Context manager support for automatic cleanup
- Persistence round-trip tests: nodes, edges and vector search survive close/reopen
- Async retrieve tests:
aretrieve_from_graph()verified to match sync results and scores - Performance tests: 1000 nodes + 2000 relations vector query under 2s, concurrent upsert with 2 threads
- Embedding dimension mismatch test:
ValueErroron wrong dimensions invector_query - Missing relation endpoint tests:
UserWarningemitted when source/target nodes missing - Special character round-trip tests: quotes, backslashes, unicode verified through upsert/get
- Schema completeness test:
get_schema_str()includes all labels and edge types - Empty graph retriever test: returns empty list, no crash
- Dedup threshold boundary test: controlled embeddings verify merge/split consistency
examples/mock_embedding_demo.py: fully runnable demo with no API key required
Fixed
upsert_relations()now emitsUserWarningwhen source or target node is missing (was silent skip)vector_query()now validates embedding dimensions, raisesValueErroron mismatch
Changed
- Requires grafeo >=0.5 (tested against 0.5.37)
- README: added Persistence, Deduplication, and Relation Upsert Behavior sections
- README: added
dedup_thresholdto constructor signature in API Reference - README: mock embedding demo listed first in examples
Full Changelog: v0.1.1...v0.2.0