Contributing¶
Dev environment setup¶
-
Clone the repository:
-
Install dependencies with uv:
This installs the project in development mode with all dev dependencies.
Running tests¶
Tests require 100% code coverage. To run the full suite:
To run a single test file or function:
To generate a coverage report with missing lines:
Linting and formatting¶
The max line length is 119 characters and line endings are LF, both configured in pyproject.toml.
Type checking¶
Some usearch-related type errors are downgraded to warnings in pyproject.toml because usearch has
incomplete type annotations.
Security scanning¶
assert statements are allowed (B101 is skipped) because the project uses them for parameter validation.
Documentation¶
Serve the docs locally with live reload:
Build for deployment:
Cross-platform support¶
All code, scripts, and dev tools must work on Linux, macOS, and Windows. Please test on multiple platforms when possible.
Patched usearch fork¶
iscc-usearch depends on a patched usearch fork (v2.23.3),
published on PyPI as usearch-iscc and installed
automatically as a regular dependency.
The fork includes:
- Fast
view()for memory-mapped indexes (computed offsets instead of pointer tables) - Lazy key reindexing with double-checked locking
- GIL release in Python bindings for parallel shard loading
- Fixes for
get()on missing keys,search(count=0), and NumPy 2.0 compatibility
See the Performance explanation for details.