Version Control for Scientists

Key information and links:

Tutorial Setup

Setup for this tutorial is relatively light. We’ll be using lightweight content and generating most of our examples as we go.

Install git

If you are on mac or linux it’s very likely you already have git installed on your system. To check open a terminal and type git version

If not then you can install git by following the instructions for you platform here.

NOTE: Windows users, you are likely to have to install git unless you are already using it. Please make sure that you can access git from the command line or a

Install Visual Studio Code

Using a GUI tool can really help both in terms of productivity and keeping track on what is going on in a repository, especially when working with others.

We are going to use Visual Studio Code and particularly on of the Git extensions available there. I’ve chosen VSCode as it’s cross plaform and the Git extension looks visually very similar which you’ll find in other UI based git clients like; SourceTree or Kraken.

For the tutorial, please install VSCode on your computer ahead of time, open it and make sure you are happy it works.

Feel free to also install the Git Graph Extension from the Extension Store within VS Code but i’ll also go over this step during the tutorial.

Sign up for github

If you don’t already have a github account then sign up for a free account here.

Then follow these instructions to setup a new SSH key on your GitHub account.

Signup for Curvenote

We’ll be looking at Jupyter Notebooks and some of the issues around versioning these with tools like git. There are alternative approaches one of which is Curvenote, which we’ll take a look at.

If you are a chrome user, and would like to follow along you can get setup ahead of time:

  1. Signup for a free Curvenote account here: http://curvenote.com
  2. Install the Curvenote Chrome Extension here: Google Chrome Store

Download DVC

We’ll take a look at a Data Versioning tool called DVC.

In order to follow along and try this out you’ll need to install DVC locally. It is available via pip, but for simplicity’s sake (and so we get all the optional add ins) please install from their website: https://dvc.org/