Skip to content

Release/0.3.5#5

Merged
sushanthpy merged 4 commits intomainfrom
release/0.3.5
Jan 9, 2026
Merged

Release/0.3.5#5
sushanthpy merged 4 commits intomainfrom
release/0.3.5

Conversation

@sushanthpy
Copy link
Copy Markdown
Member

No description provided.

- 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
@sushanthpy sushanthpy merged commit f0d3c7f into main Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant