ReSC : SCENARIO-DTP Training Courses : UoR, Dept Of Meteorology

SCENARIO-DTP Training Courses

Software Development for Environmental Scientists

Level 2 Instructions

Course contents

  • Day1: Version Control: revision, teamworking, GitHub, Objects & OO Design (part 1)
  • Day2: Objects & OO Design (part 2), CRC, Diagrams, Standards
  • Day3: Design Patterns, Exception classes, Testing, Debugging

Setting up your laptop for the course: You have a choice of either installing the tools directly or using a virtual machine (VM). If you are likely to continue to use Python to write software after the course, then you may wish to consider direct installation. If you choose to use the VM, please make sure that you have sufficient space and that it's working properly before you join the course: it may require some tweaking depending upon your hardware.

Option 1: Direct installation

You will need the following:

PyCharm
Python 2.7 or Python 3 if you prefer
Python modules: nose, numpy
git (may already by present: check by typing 'git' at the command line), should also have GitGUI

Installing additional Python modules/libraries once you have PyCharm is relatively straightforward: start PyCharm (dismiss creating a project), select File -> Default Settings, then Project Interpreter. In the dialogue, use the green '+' (top right) to find the modules and install them. If you encounter errors then it may be that you don't have 'pip'. Please check online resources for assistance in installing the additional Python libraries directly.

Option 2: Virtual Machine

Please ensure you have downloaded and installed the virtual machine *before* the start of the course. Also make sure that your network connection is working.

  1. Download and install Virtual Box : the VM manager may be downloaded from https://www.virtualbox.org/wiki/Downloads : select the version appropriate to your host OS.
  2. Copy the VM to your machine : the VM itself is here : save the 2.5Gb file to your machine. We are now providing only a 32-bit version. You will need at least 4Gb of RAM of which the VM will take 2Gb.
  3. Launch Virtual Box, then choose File->Import Appliance and point to the VM copy you've just made, leave all the default settings. This will take a while to load.
  4. Click on the green arrow 'Start'.
  5. The virtual machine will launch in full-screen mode, use "right_ctrl+F" to make it a window.
  6. If the screen locks, the password is 'cadet'.
  7. Generally you will want to 'save the machine state' when you exit the VM.

Items included in the VM are:

PyCharm
Python 2.7 with netcdf, matplotlib, numpy & scipy modules
GitGUI
ncview & ncdump

If you wish to install these items separately onto your machine without using the VM, then please be aware that we may not be able to fix problems you encounter! If using Windows (possibly Mac too) you'll also need cygwin so that you are able to run Unix commands and shell scripts.

Reading material

It is expected that you are quite familiar with Python. If not the following may be of use:

A Byte of Python, available online here and in section 1.6 there are links to download it.

TutorialsPoint is a good starting point too.

If you'd like to use an alternative language to do the course exercises, you are at liberty to do so but we may not be able to support you fully and some features may not be available to you. You will need to use an OO language such as Jave, OOC or C#.