[MLsys2026 Best Paper]: https://arxiv.org/abs/2506.08276. RAG on Everything with LEANN. Enjoy 97% storage savings while running a fast, accurate, and 100% private RAG application on your personal device.
Python aifaissgpt-osslangchainllama-indexllmlocalstorageoffline-firstollamaprivacypythonragretrieval-augmented-generationvector-databasevector-searchvectors
chore: consolidate essential fixes and add pre-commit hooks
Andy Leea7cba078dd48
diff --git a/.github/workflows/build-reusable.yml b/.github/workflows/build-reusable.ymlindex 9109383..1d762c2 100644--- a/.github/workflows/build-reusable.yml+++ b/.github/workflows/build-reusable.yml@@ -26,17 +26,17 @@ jobs:- name: Install uvuses: astral-sh/setup-uv@v4- - name: Install dependencies+ - name: Install ruffrun: |- uv sync --dev+ uv tool install ruff- name: Run ruff checkrun: |- uv run ruff check .+ ruff check .- name: Run ruff format checkrun: |- uv run ruff format --check .+ ruff format --check .build:needs: lintdiff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlnew file mode 100644index 0000000..ee7c901--- /dev/null+++ b/.pre-commit-config.yaml@@ -0,0 +1,23 @@+repos:+ - repo: https://github.com/pre-commit/pre-commit-hooks+ rev: v4.5.0+ hooks:+ - id: trailing-whitespace+ - id: end-of-file-fixer+ - id: check-yaml+ - id: check-added-large-files+ - id: check-merge-conflict+ - id: debug-statements++ - repo: https://github.com/psf/black+ rev: 24.1.1+ hooks:+ - id: black+ language_version: python3++ - repo: https://github.com/astral-sh/ruff-pre-commit+ rev: v0.2.1+ hooks:+ - id: ruff+ args: [--fix]+ - id: ruff-formatdiff --git a/packages/leann-core/pyproject.toml b/packages/leann-core/pyproject.tomlindex 16f94c0..5071c3a 100644--- a/packages/leann-core/pyproject.toml+++ b/packages/leann-core/pyproject.toml@@ -20,6 +20,8 @@ dependencies = ["torch>=2.0.0","sentence-transformers>=2.2.0","llama-index-core>=0.12.0",+ "llama-index-readers-file>=0.4.0", # Essential for document reading+ "llama-index-embeddings-huggingface>=0.5.5", # For embeddings"python-dotenv>=1.0.0","openai>=1.0.0","huggingface-hub>=0.20.0",diff --git a/uv.lock b/uv.lockindex 80e6794..a46abc5 100644--- a/uv.lock+++ b/uv.lock@@ -1891,6 +1891,8 @@ dependencies = [{ name = "accelerate" },{ name = "huggingface-hub" },{ name = "llama-index-core" },+ { name = "llama-index-embeddings-huggingface" },+ { name = "llama-index-readers-file" },{ name = "mlx", marker = "sys_platform == 'darwin'" },{ name = "mlx-lm", marker = "sys_platform == 'darwin'" },{ name = "msgpack" },@@ -1916,6 +1918,8 @@ requires-dist = [{ name = "accelerate", marker = "extra == 'colab'", specifier = ">=0.20.0,<1.0.0" },{ name = "huggingface-hub", specifier = ">=0.20.0" },{ name = "llama-index-core", specifier = ">=0.12.0" },+ { name = "llama-index-embeddings-huggingface", specifier = ">=0.5.5" },+ { name = "llama-index-readers-file", specifier = ">=0.4.0" },{ name = "mlx", marker = "sys_platform == 'darwin'", specifier = ">=0.26.3" },{ name = "mlx-lm", marker = "sys_platform == 'darwin'", specifier = ">=0.26.0" },{ name = "msgpack", specifier = ">=1.0.0" },