(modelsearch_developing)= # Developing This page contains guidance for developing Django Modelsearch itself. ## Developer installation From the root of the cloned repository, run: ```shell pip install -e ".[test,docs,dev]" ``` ## Testing To run the test suite, run: ```shell python ./runtests.py --backend BACKEND ``` where BACKEND is one of: `db`, `elasticsearch7`, `elasticsearch8`, `elasticsearch9`, `opensearch2`, `opensearch3`. ## Linting This project uses [Ruff](https://docs.astral.sh/ruff/) for code linting and formatting. To run the linter: ```shell make lint ``` To install the pre-commit hook so that linting is applied on every commit, run: ```shell pre-commit install ``` ## Documentation To build the documentation, run the following from `docs`: ```shell make html ``` ## Test coverage reporting A configuration script for a [Vagrant](https://developer.hashicorp.com/vagrant) virtual machine is provided to assist in setting up all of the supported backends for testing. This also allows generating a code coverage report. To start the VM, run: ```shell vagrant up vagrant ssh ``` Within the VM, a coverage report can be generated by running: ```shell cd /vagrant make vagrantcoverage ``` The `vagrantcoverage` task is tailored to the specific server configurations as installed in the Vagrant VM, and is unlikely to work outside of it.