14.1. Setting up a development environment

14.1.1. Cloning the repository

mkdir ~/dev
cd ~/dev
git clone git@github.com:ucam-department-of-psychiatry/camcops.git

14.1.2. Setting up the virtual environment

python3 -m venv ~/.virtualenvs/camcops
. ~/.virtualenvs/bin/activate

14.1.3. Installing the camcops_server packages

Ensure the virtualenv is activated as above.

cd ~/dev/camcops/camcops_server
python -m pip install -e .

14.1.4. Installing the pre-commit hook

The pre-commit hook will sanity-check all files to be committed to the git repository.

pre-commit install

14.1.5. Running the tests

Now might be a good time to run all the automated server tests.