Intermediate Research Software Development in Python for UKAEA

UKAEA

3, 4, 10, 11, 18 November 2022

12:45 - 16:15 (UTC+0) Thursdays, 08:30 - 12:00 (UTC+0) Fridays

Instructors: Matthew Bluteau

Helpers: Kristian Zarebski, George Gibbons, Thomas Clayton, Kingsley Collie

General Information

Where: Culham Science Centre, E3, LRDC, Training Room. Get directions with OpenStreetMap or Google Maps.

When: 3, 4, 10, 11, 18 November 2022. Calendar invites will be sent to all participants.

Requirements: Participants must bring a laptop with a Mac, Linux, or Windows operating system (not a tablet, Chromebook, etc.) that they have administrative privileges on. They should have a few specific software packages installed (listed below). UKAEA-managed Windows machines have restricted permissions but should be able to install the requisite software. Please see instructions below for further details.

Accessibility: We are committed to making this workshop accessible to everybody. If we can help making learning easier for you (e.g. sign-language interpreters, lactation facilities) please get in touch (using contact details below) and we will attempt to provide them.

Contact: Please email matthew.bluteau@ukaea.uk for more information.

Roles: To learn more about the roles at the workshop (who will be doing what), refer to our Workshop FAQ.


Code of Conduct

Everyone who participates in Carpentries activities is required to conform to the Code of Conduct. This document also outlines how to report an incident if needed.


Setup

To participate in this workshop, you will need access to software as described below. In addition, you will need an up-to-date web browser.

All non-Windows users, please check the “Setup” page of the lesson site for instructions to follow to obtain the software and data you will need to follow the lesson. For Windows users, please see the note below. We recommend that you use your work laptop for the course and run the software required directly on that. We appreciate that some participants will work on Linux clusters on a regular basis (e.g. freia, heimdall, cumulus) and will therefore want to do the course work from there. Whilst this is possible, the overhead to get this working for everyone has proven to be too much in the short time allotted for the course. If you are already set up on one of these clusters with a functioning IDE connected remotely, then please do feel free to use that, but be aware our support for you will be limited.

Some notes for UKAEA Windows users

It has been our experience that installing GitBash as recommended in the course setup is a suboptimal solution. Instead, learners have had much less trouble if they use WSL (Windows Subsytem for Linux) and connect the VS Code IDE to that. We therefore recommend the following setup steps:

  1. Follow the instructions to install WSL2 on your UKAEA laptop if you don’t already have it. You can likely skip the part about X11 forwarding, but it might be helpful in the future if you want to run graphical applications from within WSL.
  2. Follow the link at the bottom of that guide to get VS Code connected to WSL2. Within WSL2, we recommend you work within the default home directory that the terminal places you in. Do not work from a directory in your roaming profile, shared home directory, or OneDrive synchronised directory.
  3. Alternatively, if you prefer PyCharm as your IDE, then you can install it within WSL and launch it from there (this will require X11 forwarding for WSL):

    wget https://download.jetbrains.com/python/pycharm-community-2022.2.3.tar.gz
    sudo tar xzf pycharm-*.tar.gz -C /opt/
    alias pycharm=/opt/pycharm-community-2022.2.3/bin/pycharm.sh  # Put this into .bashrc
    pycharm
    
  4. If you have any problems along the way, contact one of the course helpers, or raise it at the first session.

If the above fails, you can fall back to the option of using GitBash and a local Python installation:

A note about IDEs

There are two Integrated Development Environments (IDEs) that are supported for this course, and we recommend that you use one of them:

  1. JetBrains’ PyCharm: this is the one recommended in the course setup pages, and it is the IDE used throughout the examples in the course content. All figures and instructions relate to it.
  2. Microsoft’s VSCode: a widely used IDE and likely the most popular at UKAEA. Instructions for getting set up with it have recently been added to the “Extras” of the course. As you go through the course and features of PyCharm are being explained, you can use that document to get the analogous features in VSCode. This will of course require switching between between webpages, so the experience will not be as seamless. A better UX is in our long term plans.

However, because this is an intermediate-level course, we expect that a number of participants will already have some experience using an IDE or comparable advanced code editor (e.g. Vim, Emacs). Therefore, you are welcome to use your editor of choice for the course if you are confident that you can achieve similar functionality that is described for PyCharm:

Also, you must accept the provision that we will only support the two IDEs above. Regardless of your decision, we recommend that you still install one of the editors above as a fallback.

We maintain a list of common issues that occur during installation as a reference for instructors that may be useful on the Configuration Problems and Solutions wiki page.


Collaborative Notes

We will use this collaborative document for chatting, taking notes, and sharing URLs and bits of code.


Surveys

There will then be a post-course survey to collect your feedback about how the sessions went.

Post-course Survey


Schedule

Day 1 (Thursday, 3 November)

Before starting Follow setup instructions.
12:45 Introduction and Setting the Scene
13:00 Section 1: Setting Up Environment For Collaborative Code Development
16:15 End of Session.

Day 2 (Friday, 4 November)

8:30 Section 2: Ensuring Correctness of Software at Scale (Testing)
12:00 End of Session.

Day 3 (Thursday, 10 November)

12:45 Section 3: Software Architecture and Design
16:15 End of Session

Day 4 (Friday, 11 November)

8:30 Likely overflow from Section 3: Software Architecture and Design
10:30 Section 4: Improving and Managing Software Over its Lifetime
12:00 End of Session.

Day 5 (Friday, 18 November)

8:00 Remaining portion of Section 4: Improving and Managing Software Over its Lifetime
11:30 Wrap up and buffer time.
12:00 End of Workshop. Post-course Survey.

This workshop is teaching a lesson in The Carpentries Incubator. Please check the lesson homepage for a more detailed list of lesson sections and estimated timings.