Skip to content

test: Unit Tests for Vectorisers - #229

Merged
frayle-ons merged 4 commits into
mainfrom
unit-tests-vectorisers
Sep 17, 2026
Merged

frayle-ons merged 4 commits into
mainfrom
unit-tests-vectorisers

Conversation

@frayle-ons

Copy link
Copy Markdown
Contributor

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_vectorisers folder 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

  • (test:) added folder for tests and readmes for tests in general and for specific vectorisers subfolder
  • (test:) added gcp, huggingface, ollama and base vectoriser unit test files to test functionality.

✅ 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 pytest

For 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 ollama

If 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 -v

this will trigger just the tests for the Ollama vectoriser.

@frayle-ons
frayle-ons marked this pull request as ready for review September 2, 2026 15:59
@frayle-ons
frayle-ons requested a review from a team as a code owner September 2, 2026 15:59
@github-actions github-actions Bot added the test label Sep 15, 2026

@rileyok-ons rileyok-ons left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests look great, with 100% coverage on vectorisers as well!

@frayle-ons
frayle-ons merged commit e4e4abb into main Sep 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unit Testing - test_vectorisers

2 participants