Skip to content

Commit 1966412

Browse files
authored
Merge pull request #456 from carpentries-incubator/bielsnohr/ukaea-march-2025
Updates from UKAEA March 2025 Run
2 parents 40f7e1b + f84e88d commit 1966412

9 files changed

+509
-406
lines changed

episodes/32-software-architecture-design.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ goal of having *maintainable* code, which is:
131131
Now that we know what goals we should aspire to, let us take a critical look at the code in our
132132
software project and try to identify ways in which it can be improved.
133133

134+
## Designing a New Feature for Our Project
135+
134136
Our software project contains a pre-existing branch `full-data-analysis` which contains code for a new feature of our
135137
inflammation analysis software, which we will consider as a contribution by another developer.
136138
Recall that you can see all your branches as follows:
@@ -154,7 +156,7 @@ This bit of functionality is handled by `inflammation-analysis.py` in the projec
154156
The new data analysis code is located in `compute_data.py` file within the `inflammation` directory
155157
in a function called `analyse_data()`.
156158
This function loads all the data files for a given a directory path, then
157-
calculates and compares standard deviation across all the data by day and finaly plots a graph.
159+
calculates and compares standard deviation across all the data by day and finally plots a graph.
158160

159161
::::::::::::::::::::::::::::::::::::::: challenge
160162

episodes/34-code-refactoring.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ we refactor or change code in the future.
9595
Start from the skeleton test code below:
9696

9797
```python
98+
from inflammation.compute_data import analyse_data
99+
98100
def test_analyse_data():
99-
from inflammation.compute_data import analyse_data
100-
path = Path.cwd() / "../data"
101+
path = os.path.join( os.getcwd(), "../data")
101102
data_source = CSVDataSource(path)
102103
result = analyse_data(data_source)
103-
104104
# TODO: add assert statement(s) to test the result value is as expected
105105
```
106106

@@ -115,7 +115,6 @@ When determining the correct return data result to use in tests, it may be helpf
115115
result equals some random made-up data, observe the test fail initially and then
116116
copy and paste the correct result into the test.
117117

118-
119118
:::::::::::::::::::::::::
120119

121120
::::::::::::::: solution
@@ -134,11 +133,10 @@ Putting this together, our test may look like:
134133

135134
```python
136135
import numpy.testing as npt
137-
from pathlib import Path
136+
from inflammation.compute_data import analyse_data
138137

139138
def test_analyse_data():
140-
from inflammation.compute_data import analyse_data
141-
path = Path.cwd() / "../data"
139+
path = os.path.join( os.getcwd(), "../data")
142140
data_source = CSVDataSource(path)
143141
result = analyse_data(data_source)
144142
expected_output = [0.,0.22510286,0.18157299,0.1264423,0.9495481,0.27118211,

episodes/fig/mvc_arch.svg

Lines changed: 3 additions & 0 deletions
Loading

slides/README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Notes for using slides
1+
# Notes for Using Slides
22

33
Some quick information about how to use the slides when delivering the course.
44

@@ -29,12 +29,33 @@ jupyter-notebook # or `jupyter-lab`
2929
> jupytext
3030
> ```
3131
32-
Use the RISE extension to Jupyter to view the slides.
33-
This allows you to enter the slideshow from the Jupyter notebook web interface.
32+
Use the RISE extension of Jupyter to view and edit the slides.
33+
There is now a substantial interface difference between the two modalities (`jupyter-notebook` vs `jupyter-lab`).
34+
35+
## Viewing and Editing Slides in Jupyter Notebook
36+
3437
There should be a "projector screen" button on the Jupyter notebook toolbar next to the kernel name
3538
(you might need to go to the 'View' menu to get the toolbar to show).
36-
Click the button, or press `Alt-r` to launch the RISE presentation view.
37-
Use spacebar to advance slides. Presenter view with `t`.
39+
Click this button, or press `Alt-r` to launch the RISE presentation view.
40+
41+
## Viewing and Editing Slides in Jupyter Lab
42+
43+
- Click on the folder icon on the left-hand panel to get the file viewer
44+
- Right click on the slide files you want to view or edit
45+
- Select "Open With ▶" then "Rise Slides"
46+
- The rendered version of the slides should come up, and you can edit them from here.
47+
One downside is that the notes are not also displayed, unless you get the presenter view as described below.
48+
- If you need to edit notes, it might be best to edit the markdown file directly.
49+
You can do this from the file explorer again selecting "Open With ▶" and then "Jupytext Notebook".
50+
- The type of slide is set by using the "Property Inspector" on the right hand panel (two cogs icon).
51+
52+
## Navigating
53+
54+
Use `Space` to advance slides, `Shift + Space` to go back.
55+
The arrow keys on your keyboard will not work like you expect!
56+
Bring up presenter view with `t`, which will show the notes for a given slide.
57+
58+
## Saving Slides
3859
3960
Saving the slides from the Jupyter interface should only save to the markdown source file.
4061
If you find you have ended up with some `.ipynb` files in the `slides/` directory,

0 commit comments

Comments
 (0)