Skip to content

v0.1.1 — strict-quality cleanup

Choose a tag to compare

@hseshadr hseshadr released this 21 May 16:46
· 82 commits to main since this release

Cleanup to the publish-ready strict-quality bar. No new features; no API breaks for code that consumed the existing public re-exports from shared_libs_python and shared_libs_python.vector_mgmt.

Changed

  • mypy --strict clean, Radon Grade A (cyclomatic ≤ 5), all functions ≤ 15 lines, no Dict[str, Any] in user code.
  • Replaced ad-hoc dict[str, Any] metadata/filter types with Scalar / Metadata type aliases (Scalar = str | int | float | bool | None).
  • Introduced IndexFactory Protocol replacing the previous Callable[..., Awaitable[VectorIndex]] annotation. Existing callers passing a plain async def factory(name, config=None) continue to satisfy the Protocol structurally.
  • IndexManager.search refactored via _compose_filters + _merge_top_k helpers (Grade A).
  • TwoTierPartitionStrategy.get_partitions refactored via a _classify_embedding helper (Grade A). Behavior preserved exactly: naive datetime.now(); missing or non-string created_at → hot; parse error → cold.
  • Magic-number thresholds in IndexManager.rebuild_if_needed named with Final[float].
  • Moved unused runtime extras (pgvector, sqlalchemy[asyncio], numpy) from required dependencies to [project.optional-dependencies].pgvector. Default install is now lean (Pydantic only).
  • Added poe tasks: lint, fmt, typecheck, complexity, test, quality.
  • Updated pyproject.toml author to Harish Seshadri.

Removed

  • Empty shared_libs_python.vector_mgmt.indexing and shared_libs_python.vector_mgmt.reindex submodules (advertised by the README but contained no public symbols).
  • "Reindexing utilities" feature claim from the README.

Added

  • xenon, radon, poethepoet dev dependencies powering the strict quality gate.

Install

uv pip install git+https://github.com/hseshadr/shared-libs-python.git@v0.1.1
# or with the pgvector extra for ready-made pgvector/SQLAlchemy/NumPy stack
uv pip install "shared-libs-python[pgvector] @ git+https://github.com/hseshadr/shared-libs-python.git@v0.1.1"

Full Changelog: v0.1.0...v0.1.1