Note
This repository is being gradually transitioned to a new approach to measure relevancy and so some instructions may be out of date. The original readme has been kept for now to aid the transition.
A comprehensive tool for testing and comparing search algorithm relevance across different configurations and datasets.
# 1. Run Docker (we prefer colima)
colima start
# 2. Run tool
make compare# All tests
make test
# With coverage
make test-coverage
# With race detection
make test-race# Format code
make fmt
# Run linter
make lint
# Security audit
make audit
# All checks
make checkWe use some tooling for development that you will need to install.
For running lint checks against the JSON files you will need to run Node > v20 (or use the version in the .nvmrc file) and have prettier installed:
npm install -g prettierFor running lint checks against Go template files for JSON - we are currently experimenting with our own linting tool, dis-json-template-linter.
To ensure we're producing valid ElasticSearch queries, we run them against a docker run instance of ElasticSearch using testcontainers.
To get setup, follow our guidance on using testcontainers
If you're already setup, you will just need to ensure a docker daemon is running, for example via colima start.
To skip these tests you can pass the -short flag to the go test command, e.g.
go test ./... -short