Installation¶
First, download the source code:
$ git clone git@github.com:ImperialCollegeLondon/R2T2.git
Second, install it and all development dependencies. We use Poetry to automate and simplify development tasks and after `installing Poetry`_ you can set up your development environment like this:
$ cd R2T2
$ poetry install
Poetry will set up a virtualenv for you to isolate the dependencies.
You can run commands in this virtualenv using poetry run <cmd>
;
for example, you can run the test suite like this:
$ poetry run pytest
If you prefer, you can start a shell session in the virtualenv and run commands like this:
$ poetry shell
Spawning shell within /home/jez/.cache/pypoetry/virtualenvs/r2t2-zSZaY5UC-py3.8
$ pytest
Useful tools¶
The following development tools are automatically installed by poetry install
:
- pytest
- To find and run tests. Also includes the flake8, mypy and coverage plugins which will check code style, datatypes and test coverage respectively.
- bump2version
- Used to increment version numbers in all the right places when making a new release.