diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b627cd4..3a124b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,9 +27,8 @@ jobs: if [ -f pyproject.toml ]; then pip install -e ".[dev]" 2>/dev/null || pip install -e . elif [ -f requirements.txt ]; then - pip install -r requirements.txt + pip install -r requirements.txt -r requirements-dev.txt fi - pip install ruff pytest - name: Lint with ruff run: ruff check . diff --git a/README.md b/README.md index 937b041..be2cdf8 100644 --- a/README.md +++ b/README.md @@ -237,6 +237,17 @@ pip install -r requirements.txt > `sentence-transformers` is required for cross-encoder reranking (`rerank=True` in `retrieve()`). It is also used by the test suite. If reranking is not needed you can omit it — the engine degrades gracefully to FAISS order when the model is unavailable. +`requirements.txt` alone is enough to run the app — it does not install anything needed to run the test suite. + +### Running Tests + +If you're contributing and want to run `pytest` locally, also install the dev/test dependencies: + +```bash +pip install -r requirements.txt -r requirements-dev.txt +pytest +``` + --- # Configuration diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..63602d0 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,12 @@ +# Dev/test-only dependencies. Install alongside requirements.txt to run the +# test suite locally or in CI: +# +# pip install -r requirements.txt -r requirements-dev.txt +# +# requirements.txt alone is sufficient to run the app; nothing here is +# imported by application code. +pytest==9.0.2 +pytest-asyncio==1.3.0 +pytest-cov==7.0.0 +httpx==0.28.1 +ruff==0.16.1