3, 4, 12, 13, 20, 21 June 2024
13:00 - 16:30 BST (UTC+1)
Instructors: Matthew Bluteau, Jez Swann, Kristian Zarebski, Harry Saunders, Kingsley Collie
Helpers: Charlie Boswell, Sanket Gadgil
Where: Culham Science Centre, E6, Training Room. Get directions with OpenStreetMap or Google Maps.
When: 3, 4, 12, 13, 20, 21 June 2024. 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 a user account 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 note below about IDEs, then head to 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 immediately 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 Python installation on these clusters is not in a suitable state for the course. We have frequently run into problems trying to complete the course content in these environments. Therefore, we strongly discourage you from using one of these clusters at this time. If you still wilfully choose to work on a cluster, please be aware our support for you will be limited.1
Some notes for UKAEA Windows users
It has been our experience that installing GitBash as recommended in the course setup is not a workable option. 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 do not need to use one of the pre-built distributions. Just use the Ubuntu distribution from the Windows Store.
- 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:
wget https://download.jetbrains.com/python/pycharm-community-2024.1.1.tar.gz sudo tar xzf pycharm-*.tar.gz -C /opt/ alias pycharm=/opt/pycharm-community-2024.1.1/bin/pycharm.sh # Put this into .bashrc pycharm
By default, WSL2 should automatically be able to launch graphical applications, but this is new functionality and not yet reliable, so please reach out for help if you encounter problems. Make sure you have set the default WSL version to
2
.- 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 after reading notes above. |
12:45 | Any setup issues |
13:00 | Section 1: Setting Up Environment For Collaborative Code Development |
16:30 | End of Session. |
13:00 | Section 2: Ensuring Correctness of Software at Scale (Testing) |
16:30 | End of Session. |
13:00 | Section 3: Software Development as a Process |
16:30 | End of Session |
13:00 | Section 3: Software Development as a Process |
16:30 | End of Session. |
13:00 | Section 4: Collaborative Software Development for Reuse |
16:30 | End of Session. |
13:00 | Section 5: Managing and Improving Software Over Its Lifetime |
16:30 | 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.
There is ongoing work to improve the Python installation on UKAEA clusters, so we hope it will soon be possible to offer this as a viable option again. ↩