## Overview¶

The course content is all written using Jupyter notebooks which you can find here: https://github.com/drvinceknight/gt/tree/master/nbs.

This is done using a combination of Python and Markdown (as well as LaTeX for the mathematics).

The Jupyter notebooks are then converted in to html which is served using Github pages and can be seen here: https://vknight.org/gt/.

## How this is done¶

Using git you can clone the repository locally:

git clone https://github.com/drvinceknight/gt.git


This will create a copy of all the source files on to a directory on your computer called gt.

To view the notebooks locally you will need to have Python and Jupyter installed on your computer. I recommend using the Anaconda distribution of Python which not only includes Jupyter but also a number of tools to ensure portability and reproducibility of scientific computing.

In the gt directory you will see an environment.yml file. This is used to define a specific set of Python libraries. To create this environment on your computer you will need to use a command line application:

• On Mac OSX or linux: search for terminal.
• On Windows, assuming you have installed the Anaconda distribution: search for Anaconda Prompt.

Open this and navigate to the gt directory, this is done using the cd command. For more information about using the command line, take a look at https://vknight.org/rsd/chapters/01/.

Once there, type:

conda env create -f environment.yml


This will create a Python environment on your machine with all the required software called gt. To activate this environment, type:

source activate gt


You can now start a Jupyter server by typing (still in the command line application):

jupyter notebook


This will open a tab in your browser (note that you do not need to be online for this) that you can browse and use the notebooks with.

Finally if you want to convert the notebooks in to the html. In your command line application, making sure you have activated the gt environment type:

inv main


## Testing all the code¶

One important advantage of writing the course notes in this way is that all code snippets (which are often used to confirm calculations carried out) can be tested. This helps ensure that there are no errors in the notes.

To test the code, in your command line application type:

inv test