We use uv
as our package manager.
To get started, follow these steps:
pip install uv
uv sync
. .venv/bin/activate
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.
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.
We use GitHub actions to verify, build, and deploy the application. We currently have:
- code_quality: runs
ruff
,mypy
, andcoverage
- 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 supportuv
yet)