diff --git a/poetry.lock b/poetry.lock index 7ed16d85..d3ca3f8a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. [[package]] name = "aiohappyeyeballs" @@ -684,18 +684,18 @@ standard = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "htt [[package]] name = "filelock" -version = "3.16.1" +version = "3.17.0" description = "A platform independent file lock." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "filelock-3.16.1-py3-none-any.whl", hash = "sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0"}, - {file = "filelock-3.16.1.tar.gz", hash = "sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435"}, + {file = "filelock-3.17.0-py3-none-any.whl", hash = "sha256:533dc2f7ba78dc2f0f531fc6c4940addf7b70a481e269a5a3b93be94ffbe8338"}, + {file = "filelock-3.17.0.tar.gz", hash = "sha256:ee4e77401ef576ebb38cd7f13b9b28893194acc20a8e68e18730ba9c0e54660e"}, ] [package.extras] -docs = ["furo (>=2024.8.6)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4.1)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.6.1)", "diff-cover (>=9.2)", "pytest (>=8.3.3)", "pytest-asyncio (>=0.24)", "pytest-cov (>=5)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.26.4)"] +docs = ["furo (>=2024.8.6)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.6.10)", "diff-cover (>=9.2.1)", "pytest (>=8.3.4)", "pytest-asyncio (>=0.25.2)", "pytest-cov (>=6)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.28.1)"] typing = ["typing-extensions (>=4.12.2)"] [[package]] @@ -2591,17 +2591,17 @@ pymysql = ["pymysql"] sqlcipher = ["sqlcipher3_binary"] [[package]] -name = "sqlite-vec" -version = "0.1.6" +name = "sqlite-vec-sl-tmp" +version = "0.0.4" description = "" optional = false python-versions = "*" files = [ - {file = "sqlite_vec-0.1.6-py3-none-macosx_10_6_x86_64.whl", hash = "sha256:77491bcaa6d496f2acb5cc0d0ff0b8964434f141523c121e313f9a7d8088dee3"}, - {file = "sqlite_vec-0.1.6-py3-none-macosx_11_0_arm64.whl", hash = "sha256:fdca35f7ee3243668a055255d4dee4dea7eed5a06da8cad409f89facf4595361"}, - {file = "sqlite_vec-0.1.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b0519d9cd96164cd2e08e8eed225197f9cd2f0be82cb04567692a0a4be02da3"}, - {file = "sqlite_vec-0.1.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux1_x86_64.whl", hash = "sha256:823b0493add80d7fe82ab0fe25df7c0703f4752941aee1c7b2b02cec9656cb24"}, - {file = "sqlite_vec-0.1.6-py3-none-win_amd64.whl", hash = "sha256:c65bcfd90fa2f41f9000052bcb8bb75d38240b2dae49225389eca6c3136d3f0c"}, + {file = "sqlite_vec_sl_tmp-0.0.4-py3-none-macosx_10_6_x86_64.whl", hash = "sha256:5ff08375a51d9d8284b4e14a6a2ccb8faabc5fe8e82953b8a8861302ef2ab147"}, + {file = "sqlite_vec_sl_tmp-0.0.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:0a8ad2980e95067560670c24afc6a6ba43227387f8c38e833ae8c7d9382080f2"}, + {file = "sqlite_vec_sl_tmp-0.0.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f6e42acd915e7c54f57b57c2fa7dae08e4e456ca94d3d3bddaa1a178c99e4ece"}, + {file = "sqlite_vec_sl_tmp-0.0.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux1_x86_64.whl", hash = "sha256:4acd5d16770f29f625398ce35e4d71bbbf5e66ae659d06c0a42dcd6289071daa"}, + {file = "sqlite_vec_sl_tmp-0.0.4-py3-none-win_amd64.whl", hash = "sha256:737a3924cb903d5bf81de17bfef8f24ac9c97c0ffd3fbc88b42d9b1747e3939a"}, ] [[package]] @@ -3083,4 +3083,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = ">=3.12,<4.0" -content-hash = "2406f0e80de531ce8b7390a32e7642187ed7b085506d44fea267b7735bbd8a31" +content-hash = "731c6f44572900f81369da9ce2ce4b645e554290d508c12de45df9d23389c0a0" diff --git a/pyproject.toml b/pyproject.toml index 35127700..424e254e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ tree-sitter-python = "==0.23.6" tree-sitter-rust = "==0.23.2" alembic = "==1.14.1" pygments = "==2.19.1" -sqlite-vec = "==0.1.6" +sqlite-vec-sl-tmp = "==0.0.4" [tool.poetry.group.dev.dependencies] pytest = "==8.3.4" @@ -62,7 +62,7 @@ line-length = 100 target-version = "py310" fix = true exclude = [ - "src/codegate/db/queries.py", # Ignore auto-generated file from sqlc + "src/codegate/db/queries.py", # Ignore auto-generated file from sqlc ] [tool.ruff.lint] diff --git a/scripts/import_packages.py b/scripts/import_packages.py index 58343552..e96d65e1 100644 --- a/scripts/import_packages.py +++ b/scripts/import_packages.py @@ -5,7 +5,7 @@ import sqlite3 import numpy as np -import sqlite_vec +import sqlite_vec_sl_tmp from codegate.inference.inference_engine import LlamaCppInferenceEngine from codegate.utils.utils import generate_vector_string @@ -27,7 +27,7 @@ def __init__(self, jsonl_dir="data", vec_db_path="./sqlite_data/vectordb.db"): def _get_connection(self): conn = sqlite3.connect(self.vec_db_path) conn.enable_load_extension(True) - sqlite_vec.load(conn) + sqlite_vec_sl_tmp.load(conn) conn.enable_load_extension(False) return conn diff --git a/src/codegate/storage/storage_engine.py b/src/codegate/storage/storage_engine.py index 7946f794..afd5cbd7 100644 --- a/src/codegate/storage/storage_engine.py +++ b/src/codegate/storage/storage_engine.py @@ -4,7 +4,7 @@ from typing import List import numpy as np -import sqlite_vec +import sqlite_vec_sl_tmp import structlog from codegate.config import Config @@ -69,7 +69,7 @@ def _get_connection(self): try: conn = sqlite3.connect(self.db_path) conn.enable_load_extension(True) - sqlite_vec.load(conn) + sqlite_vec_sl_tmp.load(conn) conn.enable_load_extension(False) return conn except Exception as e: diff --git a/tests/vectordb/test_sqlitevec.py b/tests/vectordb/test_sqlitevec.py index d70c1ab8..e47ceb8f 100644 --- a/tests/vectordb/test_sqlitevec.py +++ b/tests/vectordb/test_sqlitevec.py @@ -10,7 +10,7 @@ @pytest.fixture(scope="module") def mock_sqlite_vec(): - with patch("sqlite_vec.load") as mock_load: + with patch("sqlite_vec_sl_tmp.load") as mock_load: # Mock the vector similarity extension loading def setup_vector_similarity(conn): cursor = conn.cursor()