Skip to content

Commit b8ad1fe

Browse files
authored
Merge branch 'main' into update/workflows
2 parents 38effa9 + 4674163 commit b8ad1fe

10 files changed

Lines changed: 38 additions & 30 deletions

.github/workflows/pr-close-signal.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
mkdir -p ./pr
1717
printf ${{ github.event.number }} > ./pr/NUM
1818
- name: Upload Diff
19-
uses: actions/upload-artifact@v4
19+
uses: actions/upload-artifact@v5
2020
with:
2121
name: pr
2222
path: ./pr

.github/workflows/pr-comment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ jobs:
127127
permissions:
128128
contents: write
129129
steps:
130-
- name: "Checkout md outputs"
131-
uses: actions/checkout@v4
130+
- name: 'Checkout md outputs'
131+
uses: actions/checkout@v5
132132
with:
133133
ref: md-outputs
134134
path: built

.github/workflows/pr-receive.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: "Upload PR number"
2626
id: upload
2727
if: ${{ always() }}
28-
uses: actions/upload-artifact@v4
28+
uses: actions/upload-artifact@v5
2929
with:
3030
name: pr
3131
path: ${{ github.workspace }}/NR
@@ -58,10 +58,10 @@ jobs:
5858
MD: ${{ github.workspace }}/site/built
5959
steps:
6060
- name: "Check Out Main Branch"
61-
uses: actions/checkout@v4
61+
uses: actions/checkout@v5
6262

6363
- name: "Check Out Staging Branch"
64-
uses: actions/checkout@v4
64+
uses: actions/checkout@v5
6565
with:
6666
ref: md-outputs
6767
path: ${{ env.MD }}
@@ -107,21 +107,21 @@ jobs:
107107
shell: Rscript {0}
108108

109109
- name: "Upload PR"
110-
uses: actions/upload-artifact@v4
110+
uses: actions/upload-artifact@v5
111111
with:
112112
name: pr
113113
path: ${{ env.PR }}
114114
overwrite: true
115115

116116
- name: "Upload Diff"
117-
uses: actions/upload-artifact@v4
117+
uses: actions/upload-artifact@v5
118118
with:
119119
name: diff
120120
path: ${{ env.CHIVE }}
121121
retention-days: 1
122122

123123
- name: "Upload Build"
124-
uses: actions/upload-artifact@v4
124+
uses: actions/upload-artifact@v5
125125
with:
126126
name: built
127127
path: ${{ env.MD }}

.github/workflows/sandpaper-main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
steps:
3636

3737
- name: "Checkout Lesson"
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@v5
3939

4040
- name: "Set up R"
4141
uses: r-lib/actions/setup-r@v2

.github/workflows/update-cache.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@ jobs:
6363
renv-needed: ${{ steps.renv-check.outputs.renv-needed }}
6464
steps:
6565
- name: "Checkout Lesson"
66-
uses: actions/checkout@v4
66+
uses: actions/checkout@v5
67+
- id: renv
68+
run: |
69+
if [[ -d renv ]]; then
70+
echo "exists=true" >> $GITHUB_OUTPUT
71+
fi
6772
6873
- name: "Is renv required?"
6974
id: renv-check
@@ -89,7 +94,7 @@ jobs:
8994
RENV_PATHS_ROOT: ~/.local/share/renv/
9095
steps:
9196
- name: "Checkout Lesson"
92-
uses: actions/checkout@v4
97+
uses: actions/checkout@v5
9398

9499
- name: "Set up R"
95100
uses: r-lib/actions/setup-r@v2

.github/workflows/update-workflows.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
id-token: write
2929
steps:
3030
- name: "Checkout Repository"
31-
uses: actions/checkout@v4
31+
uses: actions/checkout@v5
3232

3333
- name: "Validate Current Org and Workflow"
3434
id: validate-org-workflow

episodes/14-collaboration-using-git.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ SVG of the diagram can be downloaded from:
123123
https://mermaid.ink/svg/pako:eNqFksFuwyAMhl8FcemmdS_AodKm7rZe2sOkKRcXnAQNcEaMpqjquw-SZZtUReEE9vfbP5iL1GRQKtnjZ8KgcW-hieCrIPJ6o_hhQyP2NqJmisPjbvdwYmhK8CkiKNFYFmDMxP9PFfSVNDhxxI56W-TiOULQ7aTS5L3lSbgAlhpH9MS4VKRLfTuVWOJWfdTIul21cfMUqmg9xgbX-9-Kf8w7J-76liLrlI1Q_DOUT87RFxpxHsRvq5EBseEIeqx4Hnts7uVWZsCDNXmWl-Koktyix0qqvDVYQ3JcySpcMwqJ6TQELRXHhFuZOgM8j16qGlyfo2jKPQ7T_xi_yUy-jJlZ3UF4J5p112_HVM9r
124124
-->
125125

126-
![Software development lifecycle with Git](fig/git-lifecycle.svg){alt='Development lifecycle with Git, containing Git commands add, commit, push, fetch, restore, merge and pull' .image-with-shadow width="600px"}
126+
![Software development lifecycle with Git](fig/git-lifecycle.svg){
127+
alt='Development lifecycle with Git. Four parts of Git infrastructure are represented: working tree, staging area, local repository and remote repository, and alongside this various git commands. git add is shown moving files from working tree to staging area. git commit is shown moving files from staging area to local repository. git push is shown moving files from local repository to remote repository and git fetch from remote repository to local repository. git checkout and git merge are both shown as moving files from local repository to working tree. git pull, a shortcut for git fetch followed by git checkout / merge, is shown moving files from remote repository to working tree.'
128+
.image-with-shadow width="600px"
129+
}
127130

128131
## Checking-in Changes to Our Project
129132

@@ -306,7 +309,7 @@ Collaborating with others involves
306309
managing these remote repositories and pushing and pulling information
307310
to and from them when you need to share work.
308311

309-
![](fig/git-distributed.png){alt='git-distributed' .image-with-shadow width="400px"}
312+
![](fig/git-distributed.png){alt='Representation of Git\'s distributed version control system showing interactions between a central repository and two local repositories on developer machines, with arrows showing pushing from central repository to developer repositories, pulling from developer repositories to central repository. A self-connecting arrow on developer repository shows creating commits in local repository.' .image-with-shadow width="400px"}
310313

311314
<p style="text-align: center;">Git - distributed version control system<br> From <a href="https://www.w3docs.com/learn-git/git-repository.html" target="_blank">W3Docs</a> (freely available)</p>
312315

@@ -364,7 +367,7 @@ So, working on a separate branch for each feature you are adding is good for sev
364367

365368
Branches are commonly used as part of a feature-branch workflow, shown in the diagram below.
366369

367-
![](fig/git-feature-branch.svg){alt='Git feature branch workflow diagram' .image-with-shadow width="800px"}
370+
![](fig/git-feature-branch.svg){alt='Git commit tree showing four branches - Main, Develop, FeatureX and FeatureY. The Main branch shows three commits corresponding to release tags v0.1, v0.2 and v0.3. The Develop branch branches off from Main branch with intermediate commits between release tags which are then merged into Main branch. Short-lived feature branches FeatureX and FeatureY branch off from Develop branch, have a small number of additional commits and are then merged back in to Develop branch.' .image-with-shadow width="800px"}
368371

369372
<p style="text-align: center;">Git feature branches<br>
370373
Adapted from <a href="https://sillevl.gitbooks.io/git/content/collaboration/workflows/gitflow/" target="_blank">Git Tutorial by sillevl</a> (Creative Commons Attribution 4.0 International License)</p>
@@ -496,7 +499,7 @@ However, as we have just created this branch locally,
496499
it still does not exist in our remote repository.
497500
You can check that in GitHub by listing all branches.
498501

499-
![](fig/github-main-branch.png){alt="Software project's main branch" .image-with-shadow width="600px"}
502+
![Software project's main branch](fig/github-main-branch.png){alt="Code tab of GitHub web interface showing main branch of software project. Branch selector dropdown is shown with main (default) branch showing as currently selected and one other branch feature-std-dev showing as present." .image-with-shadow width="600px"}
500503

501504
To push a new local branch remotely for the first time,
502505
you could use the `-u` flag and the name of the branch you are creating and pushing to:
@@ -526,7 +529,7 @@ From the `Code` tab in your repository in GitHub,
526529
click the branch dropdown menu (currently showing the default branch `main`).
527530
You should see your `develop` branch in the list too.
528531

529-
![](fig/github-develop-branch.png){alt="Software project's develop branch" .image-with-shadow width="600px"}
532+
![Software project's develop branch](fig/github-develop-branch.png){alt="Code tab of GitHub web interface showing notification indicating develop branch had recent pushes. Branch selector dropdown is shown with main (default) branch showing as currently selected and two other branches develop and feature-std-dev showing as present, with develop highlighted." .image-with-shadow width="600px"}
530533

531534
You may also have noticed GitHub's notification about the latest push to your `develop` branch just
532535
on top of the repository files and branches drop-down menu.

episodes/23-continuous-integration-automated-testing.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@ jobs:
190190
# Next we need to checkout out repository, and set up Python
191191
# A 'name' is just an optional label shown in the log - helpful to clarify progress - and can be anything
192192
- name: Checkout repository
193-
uses: actions/checkout@v4
193+
uses: actions/checkout@v5
194194
195195
- name: Set up Python 3.11
196-
uses: actions/setup-python@v5
196+
uses: actions/setup-python@v6
197197
with:
198198
python-version: "3.11"
199199
@@ -332,7 +332,7 @@ we can use a feature called **build matrices**
332332
which really shows the value of using CI to test at scale.
333333

334334
Suppose the intended users of our software use either Ubuntu, Mac OS, or Windows,
335-
and have Python versions 3.10 through 3.12 installed,
335+
and have Python versions 3.11 through 3.13 installed,
336336
and we want to support all of these.
337337
Assuming we have a suitable test suite,
338338
it would take a considerable amount of time to set up testing platforms
@@ -363,7 +363,7 @@ jobs:
363363
strategy:
364364
matrix:
365365
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
366-
python-version: ["3.10", "3.11", "3.12"]
366+
python-version: ["3.11", "3.12", "3.13"]
367367
368368
# Here we add the reference to the os matrix values
369369
runs-on: ${{ matrix.os }}
@@ -372,10 +372,10 @@ jobs:
372372
steps:
373373
374374
- name: Checkout repository
375-
uses: actions/checkout@v4
375+
uses: actions/checkout@v5
376376
377377
- name: Set up Python ${{ matrix.python-version }}
378-
uses: actions/setup-python@v5
378+
uses: actions/setup-python@v6
379379
with:
380380
# Here we add the reference to the python-version matrix values
381381
python-version: ${{ matrix.python-version }}
@@ -391,7 +391,7 @@ jobs:
391391

392392
The `{{ }}` are used
393393
as a means to reference configuration values from the matrix.
394-
This way, every possible permutation of Python versions 3.10 through 3.12
394+
This way, every possible permutation of Python versions 3.11 through 3.13
395395
with the latest versions of Ubuntu, Mac OS and Windows operating systems
396396
will be tested, and we can expect 9 build jobs in total.
397397
We can also use this in the `name` key of the step to accurately reflect what it is doing

episodes/34-code-refactoring.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ i.e. their tests are:
282282
::: challenge
283283
## Exercise: Testing a Pure Function
284284

285-
Add tests for `compute_standard_deviation_by_data()` that check for situations
285+
Add tests for `compute_standard_deviation_by_day()` that check for situations
286286
when there is only one file with multiple rows,
287287
multiple files with one row, and any other cases you can think of that should be tested.
288288

@@ -299,9 +299,9 @@ with more inputs and expected outputs:
299299
],
300300
ids=['Two patients in same file', 'Two patients in different files', 'Two identical patients in two different files'])
301301
def test_compute_standard_deviation_by_day(data, expected_output):
302-
from inflammation.compute_data import compute_standard_deviation_by_data
302+
from inflammation.compute_data import compute_standard_deviation_by_day
303303

304-
result = compute_standard_deviation_by_data(data)
304+
result = compute_standard_deviation_by_day(data)
305305
npt.assert_array_almost_equal(result, expected_output)
306306
```
307307

episodes/43-software-release.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Version [0.1.0]: 1.0.0
134134
Description []: Analyse patient inflammation data
135135
Author [None, n to skip]: James Graham <J.Graham@software.ac.uk>
136136
License []: MIT
137-
Compatible Python versions [>=3.13]: >=3.10
137+
Compatible Python versions [>=3.13]: >=3.11
138138
139139
Would you like to define your main dependencies interactively? (yes/no) [yes] no
140140
Would you like to define your development dependencies interactively? (yes/no) [yes] no
@@ -149,7 +149,7 @@ authors = [
149149
]
150150
license = {text = "MIT"}
151151
readme = "README.md"
152-
requires-python = ">=3.10"
152+
requires-python = ">=3.11"
153153
dependencies = [
154154
]
155155

0 commit comments

Comments
 (0)