From ce3a1ad47626d1ece437a6b84e1a1621686921a7 Mon Sep 17 00:00:00 2001 From: Jack Atkinson Date: Mon, 9 Nov 2026 10:30:59 +0000 Subject: [PATCH 01/11] Fix NameError in plot2.py and Kelvin conversion in plot4.py --- exercises/problem/plot2.py | 6 +++--- exercises/problem/plot4.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/problem/plot2.py b/exercises/problem/plot2.py index 0537204..23243e9 100644 --- a/exercises/problem/plot2.py +++ b/exercises/problem/plot2.py @@ -6,9 +6,9 @@ southern_ds = xarray.open_dataset("../data/HadCRUT.5.0.0.0_analysis_summary-series_southern-hemisphere_annual.nc") def plot_temp_with_error(ax, ds, label): - axs.fill_between(ds['time'].data, ds['tas_lower'].data, ds['tas_upper'].data, - color="grey", alpha=0.3, edgecolor=None) - axs.plot(ds['time'].data, ds['tas_mean'].data) + ax.fill_between(ds['time'].data, ds['tas_lower'].data, ds['tas_upper'].data, + color="grey", alpha=0.3, edgecolor=None) + ax.plot(ds['time'].data, ds['tas_mean'].data, label=label) fig, axs = plt.subplots(1, 1, figsize=(10,6), layout='constrained') diff --git a/exercises/problem/plot4.py b/exercises/problem/plot4.py index afa599a..2ef5595 100644 --- a/exercises/problem/plot4.py +++ b/exercises/problem/plot4.py @@ -9,7 +9,7 @@ # Absolute mean temperature between 1961 and 1990 # https://crudata.uea.ac.uk/cru/data/temperature/abs_glnhsh.txt -absolute_value = 13.974 + 273.5 +absolute_value = 13.974 + 273.15 time = global_ds['time'].data temperature = global_ds['tas_mean'].data + absolute_value albedo = 0.3 From 6ca5ebafac4ed827cabd1c38bfa482d3b04c4191 Mon Sep 17 00:00:00 2001 From: Jack Atkinson Date: Mon, 9 Nov 2026 10:31:07 +0000 Subject: [PATCH 02/11] Fix typos in slides, exercises, and README --- README.md | 12 +++--------- exercises/dependencies_exercises.qmd | 2 +- exercises/final_exercises.qmd | 4 ++-- src/_pytest.qmd | 2 +- src/dependencies.qmd | 2 +- src/documentation.qmd | 2 +- 6 files changed, 9 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index f466b86..25ae299 100644 --- a/README.md +++ b/README.md @@ -37,18 +37,12 @@ The exercises for this course are listed in the quarto markdown files which can divided into those that can be answered/solved during the session, and also "Extension" tasks which can be worked on outside of the session. There is a small group of python scripts in the [problem](exercises/problem/) sub-directory. These act as an example of a non-reproducible workflow. The tasks involve understanding and -improving the reproducibility of the scripts using what is covered in the session. It is recommended to download these scripts to a seperate location on your local machine for +improving the reproducibility of the scripts using what is covered in the session. It is recommended to download these scripts to a separate location on your local machine for this purpose. -### Worked Solution - -Worked solutions for all of the exercises can be found in the [worked solutions](worked-solutions/) directory. -These cover the tasks that require any modifications/improvements to the example workflow provided. They are not exhaustive, but use common technologies and approaches -to solving the tasks. - ### Mini ReproHack -The [Mini ReproHack repository](https://github.com/Cambridge-ICCS/MiniReproHack) can be used before, alongside or after this course, to learn hands-on what makes software reproducible. It contains instructions on how do a [reproducibility hackathon](www.reprohack.org) by trying to reproduce the results of real climate science papers. +The [Mini ReproHack repository](https://github.com/Cambridge-ICCS/MiniReproHack) can be used before, alongside or after this course, to learn hands-on what makes software reproducible. It contains instructions on how to do a [reproducibility hackathon](https://www.reprohack.org) by trying to reproduce the results of real climate science papers. ## Preparation and prerequisites @@ -96,7 +90,7 @@ To contribute back to the repository please first [fork it](https://github.com/Cambridge-ICCS/ReproducibilityInComputingCourse/fork), make the necessary changes to fix the problem, and then open a pull request back to this repository clearly describing the changes you have made. -We will then preform a review and merge once ready. +We will then perform a review and merge once ready. If you would like support using these materials, adapting them to your needs, or delivering them please get in touch either via GitHub or via diff --git a/exercises/dependencies_exercises.qmd b/exercises/dependencies_exercises.qmd index 12b5bde..b458554 100644 --- a/exercises/dependencies_exercises.qmd +++ b/exercises/dependencies_exercises.qmd @@ -18,7 +18,7 @@ Returning to the Python scripts, try to answer the following questions: ::::: {.fragment .column width=60%} The last dependency is tricky, because it is not required by `xarray`, unless you want to read/write `netcdf` files! -If we include the dependecies of the dependencies, the list is even longer! +If we include the dependencies of the dependencies, the list is even longer! ``` ValueError: found the following matches with the input file in xarray's IO backends: ['netcdf4', 'h5netcdf']. But their dependencies may not be installed, see: https://docs.xarray.dev/en/stable/user-guide/io.html diff --git a/exercises/final_exercises.qmd b/exercises/final_exercises.qmd index 437862f..e816d79 100644 --- a/exercises/final_exercises.qmd +++ b/exercises/final_exercises.qmd @@ -7,9 +7,9 @@ Tasks: ### Extensions -1. Share your repository with someone, see if they can reproduce the plotd +1. Share your repository with someone, see if they can reproduce the plots 2. Try to reproduce the results using the repo that you have been shared -3. Try to use a different dataset (e.g. a different version of the HadCrut data) +3. Try to use a different dataset (e.g. a different version of the HadCRUT data) - Does it work? - What changes did you need to make? diff --git a/src/_pytest.qmd b/src/_pytest.qmd index 71888cb..c02a463 100644 --- a/src/_pytest.qmd +++ b/src/_pytest.qmd @@ -61,7 +61,7 @@ tests/test.py . What if we implemented `add` wrong? -```{.python filename="src/add,py"} +```{.python filename="src/add.py"} def add(a, b): return a-b # Incorrect ``` diff --git a/src/dependencies.qmd b/src/dependencies.qmd index b34a0f0..6bcef0b 100644 --- a/src/dependencies.qmd +++ b/src/dependencies.qmd @@ -29,7 +29,7 @@ - e.g. add a "Dependencies" section to your README.md - Specify: - Versions of each dependency e.g. `numpy` 2.3.9 - - Where/how to aquire the dependency + - Where/how to acquire the dependency ## How to declare data dependencies diff --git a/src/documentation.qmd b/src/documentation.qmd index 04565d2..6b7225f 100644 --- a/src/documentation.qmd +++ b/src/documentation.qmd @@ -64,7 +64,7 @@ def energy_balanced_temperature(emissivity, albedo): Parameters ---------- emissivity: float - Effective emmissivity of the Earth + Effective emissivity of the Earth albedo: float Effective albedo of the Earth From 6bf2240f3d57567bff5b604cce2a759f6b9eb022 Mon Sep 17 00:00:00 2001 From: Jack Atkinson Date: Mon, 9 Nov 2026 10:33:23 +0000 Subject: [PATCH 03/11] Fix typos in slides, exercises, and README --- src/introduction.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/introduction.qmd b/src/introduction.qmd index 883831b..3f4631c 100644 --- a/src/introduction.qmd +++ b/src/introduction.qmd @@ -4,7 +4,7 @@ In scientific research, a result is: -![](/images/reproducibility_matrix.jpg){width=60%, fig-align="center"} +![](images/reproducibility_matrix.jpg){width=60%, fig-align="center"} :::{.footer} We will use the definitions used in [The Turing Way](https://book.the-turing-way.org/reproducible-research/overview/overview-definitions/) From d3eab21e22eac04433797a30f6fc457ae460c290 Mon Sep 17 00:00:00 2001 From: Jack Atkinson Date: Mon, 9 Nov 2026 10:34:53 +0000 Subject: [PATCH 04/11] Update actions/checkout to v6 in deploy workflow --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bde84f5..340e9d3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: submodules: 'true' From 5f087b05e373cd033d5aa2c232534bd35ef77973 Mon Sep 17 00:00:00 2001 From: Jack Atkinson Date: Mon, 9 Nov 2026 10:48:39 +0000 Subject: [PATCH 05/11] Point exercises data link at Met Office HadCRUT.5.0.0.0 page --- exercises/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/README.md b/exercises/README.md index 8b77cdc..209e7c8 100644 --- a/exercises/README.md +++ b/exercises/README.md @@ -15,6 +15,6 @@ the scripts rely on, which can be found here: https://www.metoffice.gov.uk/hadob 1. Create a new repository on your local machine with `git init repro-examples` 2. Copy the files in the `problem` directory into the new repository -3. Download the data needed for the analysis from https://doi.org/10.5281/zenodo.7014332 +3. Download the data needed for the analysis from https://www.metoffice.gov.uk/hadobs/hadcrut5/data/HadCRUT.5.0.0.0/download.html 4. Try to complete the tasks in the files named `*_exercises.qmd`. Some of these are achievable during the session, others are tasks that could be worked on in your own time. From fee12803673070d6b17e403f28045b91a45eedc8 Mon Sep 17 00:00:00 2001 From: Jack Atkinson Date: Mon, 9 Nov 2026 11:33:35 +0000 Subject: [PATCH 06/11] Add light backdrop for dark images on dark slide theme --- src/custom.scss | 12 ++++++++++++ src/dependencies.qmd | 4 ++-- src/documentation.qmd | 2 +- src/slides.qmd | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/custom.scss b/src/custom.scss index fd3aa3a..f63c232 100644 --- a/src/custom.scss +++ b/src/custom.scss @@ -93,6 +93,18 @@ $presentation-line-height: 1.5em; margin-top: 1em; } +/* light backdrop for images with dark content, so they stay visible on the + dark theme - soft radial gradient ~ gaussian glow behind the image */ +.reveal img.light-bg, +/* Git logo lives in the Summer-school-Intro-Git submodule as a remote URL, + so style it by src instead of editing the submodule */ +.reveal img[src*="Git-Logo"], +.reveal img[data-src*="Git-Logo"] { + background: radial-gradient(ellipse at center, #f2f2f2 0%, #d9d9d9 55%, #b3b3b3 100%); + padding: 0.5em; + border-radius: 12px; +} + /*-- vertically center columns (or any container) --*/ .v-center-container { display: flex; diff --git a/src/dependencies.qmd b/src/dependencies.qmd index 6bcef0b..7b0222f 100644 --- a/src/dependencies.qmd +++ b/src/dependencies.qmd @@ -44,7 +44,7 @@ - Ideally automate the fetching of the data ::: :::{.column width="40%"} -![Example of a zenodo listing. Note how each version of the dataset has a different reference](images/zenodo.png) +![Example of a zenodo listing. Note how each version of the dataset has a different reference](images/zenodo.png){.light-bg} ::: ::: @@ -92,7 +92,7 @@ ::: :::{.column width="40%"} ![](images/docker-logo-ocean-blue.svg) -![](images/apptainer.svg) +![](images/apptainer.svg){.light-bg} ![](images/podman-logo-source.svg) ::: ::: diff --git a/src/documentation.qmd b/src/documentation.qmd index 6b7225f..4d64e0d 100644 --- a/src/documentation.qmd +++ b/src/documentation.qmd @@ -23,7 +23,7 @@ :::: ::::{.column width=50%} -![](images/ftorch-readme.png) +![](images/ftorch-readme.png){.light-bg} :::: ::: diff --git a/src/slides.qmd b/src/slides.qmd index 0e90e49..32d4654 100644 --- a/src/slides.qmd +++ b/src/slides.qmd @@ -107,6 +107,6 @@ Register your interest here: ![](images/iccs-ss-qr.svg) :::: ::::{.column width=70%} -![](images/iccs-summer-school-2026.jpg) +![](images/iccs-summer-school-2026.jpg){.light-bg} :::: ::: From e467418089012fc059deb0cbf21ec509e2e5e5db Mon Sep 17 00:00:00 2001 From: Jack Atkinson Date: Mon, 9 Nov 2026 11:40:37 +0000 Subject: [PATCH 07/11] Add a brief README to src/ describing how to build and render the slides. --- src/README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/README.md diff --git a/src/README.md b/src/README.md new file mode 100644 index 0000000..20a6878 --- /dev/null +++ b/src/README.md @@ -0,0 +1,48 @@ +# Building the slides + +The slide deck (`slides.qmd`) is generated with [quarto](https://quarto.org) and outputs `index.html` in this directory. + +## Requirements + +- The [quarto CLI](https://quarto.org/docs/get-started/) +- A Python installation with the packages from [requirements.txt](../requirements.txt) (Quarto executes the Python code cells with `python3`). +- The `Summer-school-Intro-Git` submodule checked out (some slides are included from it). + +## Setup + +Fetch the summer school submodule: +```bash +git submodule update --init --recursive +``` +(or clone with `git clone --recurse-submodules `). + +Set up the a Python environment from the repository root. +With a Python venv this would be: + +```bash +python3 -m venv .venv +source .venv/bin/activate +pip install -r requirements.txt +``` + +If you use [nix](https://nixos.org/), the root [flake.nix](../flake.nix) provides a shell with quarto and all Python dependencies: + +```bash +nix develop +``` + +## Render + +From this directory (`src/`): + +```bash +quarto render slides.qmd +``` + +If you used a virtual environment, make sure its `bin` directory is on your `PATH` so that `python3` resolves to it: + +```bash +PATH="$PWD/../.venv/bin:$PATH" quarto render slides.qmd +``` + +The rendered deck is written to `index.html` in this directory. From 39e07910145988f845ee8b9f96eaeb068b28bb8d Mon Sep 17 00:00:00 2001 From: Jack Atkinson Date: Mon, 9 Nov 2026 11:44:00 +0000 Subject: [PATCH 08/11] Prefix partial slide files with underscore per Quarto convention --- .gitignore | 1 + src/{automation.qmd => _automation.qmd} | 0 src/{dependencies.qmd => _dependencies.qmd} | 0 src/{documentation.qmd => _documentation.qmd} | 0 ...{fair_principles.qmd => _fair_principles.qmd} | 0 src/{introduction.qmd => _introduction.qmd} | 0 ...through.qmd => _introduction_walkthrough.qmd} | 0 ...ives.qmd => _reproducibility_initiatives.qmd} | 0 src/{testing.qmd => _testing.qmd} | 0 ...{version_control.qmd => _version_control.qmd} | 0 src/slides.qmd | 16 ++++++++-------- 11 files changed, 9 insertions(+), 8 deletions(-) rename src/{automation.qmd => _automation.qmd} (100%) rename src/{dependencies.qmd => _dependencies.qmd} (100%) rename src/{documentation.qmd => _documentation.qmd} (100%) rename src/{fair_principles.qmd => _fair_principles.qmd} (100%) rename src/{introduction.qmd => _introduction.qmd} (100%) rename src/{introduction_walkthrough.qmd => _introduction_walkthrough.qmd} (100%) rename src/{reproducibility_initiatives.qmd => _reproducibility_initiatives.qmd} (100%) rename src/{testing.qmd => _testing.qmd} (100%) rename src/{version_control.qmd => _version_control.qmd} (100%) diff --git a/.gitignore b/.gitignore index 7246ae9..cbaadd6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ src/slides_files *.html +.jupyter_cache/ diff --git a/src/automation.qmd b/src/_automation.qmd similarity index 100% rename from src/automation.qmd rename to src/_automation.qmd diff --git a/src/dependencies.qmd b/src/_dependencies.qmd similarity index 100% rename from src/dependencies.qmd rename to src/_dependencies.qmd diff --git a/src/documentation.qmd b/src/_documentation.qmd similarity index 100% rename from src/documentation.qmd rename to src/_documentation.qmd diff --git a/src/fair_principles.qmd b/src/_fair_principles.qmd similarity index 100% rename from src/fair_principles.qmd rename to src/_fair_principles.qmd diff --git a/src/introduction.qmd b/src/_introduction.qmd similarity index 100% rename from src/introduction.qmd rename to src/_introduction.qmd diff --git a/src/introduction_walkthrough.qmd b/src/_introduction_walkthrough.qmd similarity index 100% rename from src/introduction_walkthrough.qmd rename to src/_introduction_walkthrough.qmd diff --git a/src/reproducibility_initiatives.qmd b/src/_reproducibility_initiatives.qmd similarity index 100% rename from src/reproducibility_initiatives.qmd rename to src/_reproducibility_initiatives.qmd diff --git a/src/testing.qmd b/src/_testing.qmd similarity index 100% rename from src/testing.qmd rename to src/_testing.qmd diff --git a/src/version_control.qmd b/src/_version_control.qmd similarity index 100% rename from src/version_control.qmd rename to src/_version_control.qmd diff --git a/src/slides.qmd b/src/slides.qmd index 32d4654..56ea55e 100644 --- a/src/slides.qmd +++ b/src/slides.qmd @@ -34,27 +34,27 @@ execute: cache: true --- -{{< include introduction.qmd >}} +{{< include _introduction.qmd >}} -{{< include version_control.qmd >}} +{{< include _version_control.qmd >}} {{< include ../exercises/version_control_exercises.qmd >}} -{{< include dependencies.qmd >}} +{{< include _dependencies.qmd >}} {{< include ../exercises/dependencies_exercises.qmd >}} -{{< include automation.qmd >}} +{{< include _automation.qmd >}} {{< include ../exercises/automation_exercises.qmd >}} -{{< include testing.qmd >}} +{{< include _testing.qmd >}} {{< include _pytest.qmd >}} {{< include ../exercises/testing_exercises.qmd >}} -{{< include documentation.qmd >}} +{{< include _documentation.qmd >}} {{< include ../exercises/documentation_exercises.qmd >}} -{{< include fair_principles.qmd >}} +{{< include _fair_principles.qmd >}} -{{< include reproducibility_initiatives.qmd >}} +{{< include _reproducibility_initiatives.qmd >}} # Conclusion/Outlook From 8cc5597d94065f6d508c48227075b4c4de838c6d Mon Sep 17 00:00:00 2001 From: Jack Atkinson Date: Mon, 9 Nov 2026 11:49:17 +0000 Subject: [PATCH 09/11] Move numpy to transitive-dependency note in dependencies exercise --- exercises/dependencies_exercises.qmd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/exercises/dependencies_exercises.qmd b/exercises/dependencies_exercises.qmd index b458554..f976510 100644 --- a/exercises/dependencies_exercises.qmd +++ b/exercises/dependencies_exercises.qmd @@ -11,14 +11,15 @@ Returning to the Python scripts, try to answer the following questions: ::::: {.incremental .column width=40%} - `xarray` - `matplotlib` - - `numpy` - `netcdf4` / `h5netcdf`! ::::: ::::: {.fragment .column width=60%} The last dependency is tricky, because it is not required by `xarray`, unless you want to read/write `netcdf` files! -If we include the dependencies of the dependencies, the list is even longer! +If we include the dependencies of the dependencies (e.g. `numpy`, which `xarray` +and `matplotlib` both rely on without importing it directly in our scripts), the +list is even longer! ``` ValueError: found the following matches with the input file in xarray's IO backends: ['netcdf4', 'h5netcdf']. But their dependencies may not be installed, see: https://docs.xarray.dev/en/stable/user-guide/io.html From a61d14f582693dfb8d5b532d2ab0f9eff5524d16 Mon Sep 17 00:00:00 2001 From: Jack Atkinson Date: Mon, 9 Nov 2026 11:51:45 +0000 Subject: [PATCH 10/11] Number exercise files 01-06 and document order in exercises README --- ...ercises.qmd => 01_version_control_exercises.qmd} | 0 ..._exercises.qmd => 02_dependencies_exercises.qmd} | 0 ...on_exercises.qmd => 03_automation_exercises.qmd} | 0 ...sting_exercises.qmd => 04_testing_exercises.qmd} | 0 ...exercises.qmd => 05_documentation_exercises.qmd} | 0 .../{final_exercises.qmd => 06_final_exercises.qmd} | 0 exercises/README.md | 13 +++++++++++-- src/slides.qmd | 10 +++++----- 8 files changed, 16 insertions(+), 7 deletions(-) rename exercises/{version_control_exercises.qmd => 01_version_control_exercises.qmd} (100%) rename exercises/{dependencies_exercises.qmd => 02_dependencies_exercises.qmd} (100%) rename exercises/{automation_exercises.qmd => 03_automation_exercises.qmd} (100%) rename exercises/{testing_exercises.qmd => 04_testing_exercises.qmd} (100%) rename exercises/{documentation_exercises.qmd => 05_documentation_exercises.qmd} (100%) rename exercises/{final_exercises.qmd => 06_final_exercises.qmd} (100%) diff --git a/exercises/version_control_exercises.qmd b/exercises/01_version_control_exercises.qmd similarity index 100% rename from exercises/version_control_exercises.qmd rename to exercises/01_version_control_exercises.qmd diff --git a/exercises/dependencies_exercises.qmd b/exercises/02_dependencies_exercises.qmd similarity index 100% rename from exercises/dependencies_exercises.qmd rename to exercises/02_dependencies_exercises.qmd diff --git a/exercises/automation_exercises.qmd b/exercises/03_automation_exercises.qmd similarity index 100% rename from exercises/automation_exercises.qmd rename to exercises/03_automation_exercises.qmd diff --git a/exercises/testing_exercises.qmd b/exercises/04_testing_exercises.qmd similarity index 100% rename from exercises/testing_exercises.qmd rename to exercises/04_testing_exercises.qmd diff --git a/exercises/documentation_exercises.qmd b/exercises/05_documentation_exercises.qmd similarity index 100% rename from exercises/documentation_exercises.qmd rename to exercises/05_documentation_exercises.qmd diff --git a/exercises/final_exercises.qmd b/exercises/06_final_exercises.qmd similarity index 100% rename from exercises/final_exercises.qmd rename to exercises/06_final_exercises.qmd diff --git a/exercises/README.md b/exercises/README.md index 209e7c8..c53904c 100644 --- a/exercises/README.md +++ b/exercises/README.md @@ -16,5 +16,14 @@ the scripts rely on, which can be found here: https://www.metoffice.gov.uk/hadob 1. Create a new repository on your local machine with `git init repro-examples` 2. Copy the files in the `problem` directory into the new repository 3. Download the data needed for the analysis from https://www.metoffice.gov.uk/hadobs/hadcrut5/data/HadCRUT.5.0.0.0/download.html -4. Try to complete the tasks in the files named `*_exercises.qmd`. Some of these are -achievable during the session, others are tasks that could be worked on in your own time. +4. Work through the exercise files in order. + During the workshop the slides will tell you when to tackle each one. + - `01_version_control_exercises.qmd` - version control + - `02_dependencies_exercises.qmd` - dependencies + - `03_automation_exercises.qmd` - automation + - `04_testing_exercises.qmd` - testing + - `05_documentation_exercises.qmd` - documentation + - `06_final_exercises.qmd` - try it all out + + Some tasks are achievable during the session, others are "Extension" tasks that + could be worked on in your own time. diff --git a/src/slides.qmd b/src/slides.qmd index 56ea55e..a4a8326 100644 --- a/src/slides.qmd +++ b/src/slides.qmd @@ -37,20 +37,20 @@ execute: {{< include _introduction.qmd >}} {{< include _version_control.qmd >}} -{{< include ../exercises/version_control_exercises.qmd >}} +{{< include ../exercises/01_version_control_exercises.qmd >}} {{< include _dependencies.qmd >}} -{{< include ../exercises/dependencies_exercises.qmd >}} +{{< include ../exercises/02_dependencies_exercises.qmd >}} {{< include _automation.qmd >}} -{{< include ../exercises/automation_exercises.qmd >}} +{{< include ../exercises/03_automation_exercises.qmd >}} {{< include _testing.qmd >}} {{< include _pytest.qmd >}} -{{< include ../exercises/testing_exercises.qmd >}} +{{< include ../exercises/04_testing_exercises.qmd >}} {{< include _documentation.qmd >}} -{{< include ../exercises/documentation_exercises.qmd >}} +{{< include ../exercises/05_documentation_exercises.qmd >}} {{< include _fair_principles.qmd >}} From 52a066c6d30fa5cc9c7b06df6edaf595ef0b6bc7 Mon Sep 17 00:00:00 2001 From: Jack Atkinson Date: Mon, 9 Nov 2026 11:56:43 +0000 Subject: [PATCH 11/11] Document exactly which HadCRUT files to download and where to put them --- README.md | 1 + exercises/README.md | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 25ae299..319bdf0 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ If you want to follow along with the exercises, basic Python coding skills and a ## Installation and setup To complete the exercises, you will need to download the dataset used by the python scripts. This can be found [here](https://www.metoffice.gov.uk/hadobs/hadcrut5/data/HadCRUT.5.0.0.0/download.html) +See [exercises/README.md](exercises/README.md) for which files to download and where to put them. As part of the exercises will be assessing the data dependencies of the scripts, it will be left as a task to find out which of the datasets you need! It is recommended to download the python scripts from [exercises/problem](exercises/problem/) to your local machine, in a new directory. diff --git a/exercises/README.md b/exercises/README.md index c53904c..446444c 100644 --- a/exercises/README.md +++ b/exercises/README.md @@ -8,14 +8,27 @@ reproducibility into account. ## Data -If you are trying to work through these exercises, you will need the data that -the scripts rely on, which can be found here: https://www.metoffice.gov.uk/hadobs/hadcrut5/data/HadCRUT.5.0.0.0/download.html. +The scripts rely on the HadCRUT.5.0.0.0 dataset, available from +https://www.metoffice.gov.uk/hadobs/hadcrut5/data/HadCRUT.5.0.0.0/download.html + +Only the "HadCRUT5 analysis time series: ensemble means and uncertainties" +NetCDF files are needed: + +- `HadCRUT.5.0.0.0_analysis_summary-series_global_annual.nc` +- `HadCRUT.5.0.0.0_analysis_summary-series_northern-hemisphere_annual.nc` +- `HadCRUT.5.0.0.0_analysis_summary-series_southern-hemisphere_annual.nc` +- `HadCRUT.5.0.0.0_analysis_summary-series_global_monthly.nc` + +Download these four files from the "Summary series" table (NetCDF → Annual/Monthly per region), +and place them in a `data/` directory next to the `problem/` scripts, so the +scripts can find them automatically. +This is better that downloading the whole dataset which is rather large! ## Instructions: 1. Create a new repository on your local machine with `git init repro-examples` 2. Copy the files in the `problem` directory into the new repository -3. Download the data needed for the analysis from https://www.metoffice.gov.uk/hadobs/hadcrut5/data/HadCRUT.5.0.0.0/download.html +3. Download the four NetCDF files listed above into a `data/` directory next to the scripts 4. Work through the exercise files in order. During the workshop the slides will tell you when to tackle each one. - `01_version_control_exercises.qmd` - version control