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
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.
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.
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:
- 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.
- 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.
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
- 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:
- Git for Windows can be installed using the Software Center/Application Catalog.
- You can download and run a standard Python installer from https://www.python.org/downloads/windows/, but should ensure that the option to install for all users is not selected (to avoid the need for admin privileges).
- Get your IDE. We recommend VS Code which can be installed from the Windows Store. The PyCharm installer can be run using your standard login (and without an admin account). It is important to choose an installation path where you have write permissions (i.e. not the default path). The PyCharm installer probably won’t run perfectly without admin rights, but our testing has shown that it does yield a functional application. In particular, you might notice it fails to create a shortcut from the start menu.
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:
- 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.
- 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:
- Syntax highlighting, indentation, and autocompletion
- Recognition of virtual environments and setting the correct Python interpreter
- Running the Python debugger from the IDE and setting breakpoints at specific lines
- Integration with pytest and the ability to launch individual tests from the editor
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.
We will use this collaborative document for chatting, taking notes, and sharing URLs and bits of code.
There will then be a post-course survey to collect your feedback about how the sessions went.
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. |
8:30 | Section 2: Ensuring Correctness of Software at Scale (Testing) |
12:00 | End of Session. |
12:45 | Section 3: Software Architecture and Design |
16:15 | End of Session |
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. |
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.