Skip to content

Latest commit

 

History

History
65 lines (44 loc) · 1.61 KB

CONTRIBUTING.md

File metadata and controls

65 lines (44 loc) · 1.61 KB

Contributing

Setup

We use uv as our package manager. To get started, follow these steps:

pip install uv
uv sync
. .venv/bin/activate

QA

Tests

The test suite is composed of both unittests and integration tests (ran against a local Meilisearch instance). To start the meilisearch instance, simply run the following command:

docker-compose up

Then, you can run tests using either unittest or coverage.

With unittest:

python -m unittest discover .

With coverage:

coverage run -m unittest discover .
coverage report --fail-under=90
coverage html

In the CI, tests are run on multiple Python versions (from 3.9 to 3.13) to ensure compatibility on each version.

Using git hooks

Git hooks are set in the .githooks folder (as .git/hooks is not tracked in .git)

Run the following command to tell git to look for hooks in this folder:

git config core.hooksPath .githooks

Pre-commit hooks will run ruff, mypy, and coverage on each commit. Make sure to have your Meilisearch instance running before committing.

CI/CD

We use GitHub actions to verify, build, and deploy the application. We currently have:

  • code_quality: runs ruff, mypy, and coverage
  • publish_package: Deploys the package on PyPi
  • tests: runs unittests on multiple Python versions (from 3.9 to 3.13)
  • update_deps: updates the dependencies (as dependabot does not support uv yet)