Merged
Conversation
- Simplified package-data patterns in pyproject.toml - Added MANIFEST.in for explicit binary file inclusion - Ensures _bin/ and lib/ directories are always included in wheels - Verified: wheel now contains all platform binaries (toondb-bulk, toondb-grpc-server, toondb-server, libtoondb_storage.dylib)
Previously sdist was built without any binaries, making it incomplete. Changes: - sdist now downloads binaries from all 3 platforms (Linux, macOS, Windows) - Copies binaries to src/toondb/_bin/ and src/toondb/lib/ before building sdist - Ensures sdist contains all platform binaries for cross-platform compatibility - Only builds sdist once (using Linux target as trigger) to avoid duplicates This ensures 'pip install toondb-client' from source will work with embedded FFI mode.
Features
========
- Add create_index() method to Database class for easy vector index creation
- Add insert_vectors() method for batch vector insertion
- Add search() method for k-NN vector search
- Vector indices now accessible directly from Database without VectorIndex class
API Improvements
================
Before (required separate VectorIndex):
from toondb.vector import VectorIndex
index = VectorIndex(dimension=384)
index.insert_batch(ids, vectors)
results = index.search(query, k=5)
After (convenience methods on Database):
db = Database.open('./mydb')
db.create_index('embeddings', dimension=384)
db.insert_vectors('embeddings', ids, vectors)
results = db.search('embeddings', query, k=5)
Implementation
==============
- Indices managed internally as _vector_indices dict
- Metadata stored in database under _indices/{name}/meta
- Lazy loading of indices from metadata
- Full compatibility with existing VectorIndex class
Testing
=======
- Vector index creation: ✅
- Batch vector insertion: ✅
- k-NN search: ✅
- All operations working with tokio-optional architecture
Packaging
=========
- Remove MANIFEST.in (not needed with modern pyproject.toml)
- Update version to 0.3.5
Documentation Updates
=====================
- Add 'What's New in 0.3.5' section
- Document new vector operations on Database class
- Show simplified API compared to separate VectorIndex class
- Add code examples for create_index(), insert_vectors(), search()
- Document tokio-optional compatibility
API Examples
============
Before (0.3.4):
from toondb.vector import VectorIndex
index = VectorIndex(dimension=384)
After (0.3.5):
db = Database.open('./mydb')
db.create_index('embeddings', dimension=384)
Benefits
========
- Simpler API - all operations on Database class
- No need to manage separate VectorIndex instances
- Index metadata stored in database
- Backwards compatible with VectorIndex class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.