Skip to content

Release v2.3.0 - #14

Merged
CoderDayton merged 9 commits into
mainfrom
release/2.3.0
Mar 8, 2026
Merged

Release v2.3.0#14
CoderDayton merged 9 commits into
mainfrom
release/2.3.0

Conversation

@CoderDayton

Copy link
Copy Markdown
Owner

Summary

  • Optional integration dependencies — LangChain/LlamaIndex moved to pip install simplevecdb[integrations] with runtime import guards and v2.3.0 migration messaging
  • Core hardening — input validation guards (k≤0, length mismatches, NaN/Inf filters), double-close protection, context manager on VectorDB, SQL injection defense-in-depth
  • Performance optimizations — vectorized MMR search, merged SQL round-trips, np.asarray over np.array, FLOAT serialization via tobytes(), placeholder list-multiply, cluster table DDL caching, get_parent self-JOIN
  • Centralized constants — unused constants/utilities wired to their intended locations, HNSW defaults single-sourced from constants.py
  • Test coverage — 305 tests passing, clustering coverage 77% → 94%, overall 82%
  • Python 3.12 dev target with requires-python >= "3.10" maintained

Test plan

  • 305 unit tests passing (6 skipped — integration deps not installed)
  • 82% overall coverage
  • No breaking changes to public API
  • Version synced: pyproject.toml + init.py = 2.3.0
  • CHANGELOG.md updated

🤖 Generated with Claude Code

LangChain and LlamaIndex packages are no longer installed by default.
Users of these integrations must now install with:

  pip install simplevecdb[integrations]

Clear ImportError messages guide existing users through the migration.
Bumps version to 2.3.0.
Adds version-sync pre-commit hook and normalizes file permissions.
- Add input validation guards (k<=0, length mismatches) on all search/add methods
- Fix streaming placeholder bug: empty list never matched `is None` check
- Add double-close guard and context manager support to VectorDB
- Add NaN/Inf/empty-list validation in metadata filters
- Graceful per-collection error handling in cross-collection search
- Defense-in-depth table name validation in check_migration
- Batch numpy embedding→bytes conversion (~8% faster inserts)
- Deduplicate .tolist() calls and use np.unique in search paths
- Update README to document `simplevecdb[integrations]` extra
- Skip integration tests when deps not installed
- Bump dev target to Python 3.12 (requires-python stays >=3.10)
…ions

- Move _batched() from core.py to utils.py, use in catalog.py batch updates
- Make _normalize_key() delegate to _derive_key() instead of duplicating PBKDF2
- Use COLLECTION_NAME_PATTERN constant instead of hardcoded regex
- Use DEFAULT_DISTANCE_STRATEGY/DEFAULT_QUANTIZATION in VectorDB defaults
- Replace local HNSW constants in usearch_index.py with constants module
- Use USEARCH_BATCH_THRESHOLD in search.py for batch vs sequential selection
- MMR: pre-normalize embeddings, vectorized matrix-vector similarity,
  O(1) pop replaces O(n) list.remove, hoist loop-invariant
- Merge get_documents_by_ids + get_embeddings_by_ids into single SQL
  query (get_documents_and_embeddings_by_ids) for MMR
- Skip redundant SELECT after executemany when explicit IDs provided
- Collapse get_parent from 2 sequential SELECTs to 1 self-JOIN
- Cache _cluster_table_ready flag to skip DDL on repeated calls
- FLOAT serialize: np.asarray().tobytes() replaces struct.pack loop
- np.array → np.asarray on every search/insert path to avoid copies
- Placeholder strings: list multiply replaces generator in all 9 sites
- Upsert loop: skip when index empty, cache int(key) per iteration
- defaultdict(list) in auto_tag, hoist import random to module level
- Add v2.3.0 changelog entry
Cover empty vectors, unknown algorithm, missing sklearn/hdbscan,
generate_keywords edge cases (outliers, empty texts, ValueError
fallback), silhouette single cluster, assign_to_nearest_centroid.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 88392d0a23

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/simplevecdb/__init__.py Outdated
Comment thread src/simplevecdb/core.py
Add comprehensive unit tests for core, search, usearch_index, catalog,
encryption, embeddings/server, and async_core. Fix test_rag mock.
@CoderDayton
CoderDayton merged commit c63c3cc into main Mar 8, 2026
9 checks passed
@CoderDayton
CoderDayton deleted the release/2.3.0 branch March 8, 2026 08:46
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