test: Unit Tests for Vectorisers - #229
Open
frayle-ons wants to merge 2 commits into
Open
Conversation
frayle-ons
marked this pull request as ready for review
September 2, 2026 15:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves #215
✨ Summary
This PR adds a test folders, containing a general readme about testing and concrete implementations for a subgroup of unit tests for the Vectoriser classes. All 4 of the Vectorisers (base, gcp, huggingface, and ollama) have their own unit test file. There is a corresponding readme for the
test_vectorisersfolder which details the different features of each unit tested vectoriser.The readme files are taken from an earlier branch #217 which was used to write an early stage plan for unit testing.📜 Changes Introduced
✅ Checklist
Implemented code passes all pre-commit checks.
🔍 How to Test
Navigating to the route directory of the project, and using uv astral, the user can trigger Pytest to execute the testing with:
uv run pytestFor each of the vectoriser tests it is necessary to have the cooresponding optional dependencies installed. To install all of these before running the above, the user can perform a sync operation:
uv sync --extra huggingface --extra gcp --extra ollamaIf you want to run a single test file this is also possible by specifying the path. (with the optional flag for verbose logging):
uv run pytest tests/test_vectorisers/test_ollama_vectoriser.py -vthis will trigger just the tests for the Ollama vectoriser.