Skip to content

Commit 0b7cb3f

Browse files
authored
Merge pull request #200 from alessandrofelder/improve-testing-notes
Improve testing notes
2 parents 11dbaff + 4333d63 commit 0b7cb3f

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

ch03tests/01testingbasics.ipynb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,18 @@
7676
"cell_type": "markdown",
7777
"metadata": {},
7878
"source": [
79-
" * Testing won't corrrect a buggy code\n",
79+
" * Testing won't correct a buggy code\n",
8080
" * Testing will tell you were the bugs are...\n",
8181
" * ... if the test cases *cover* the bugs"
8282
]
8383
},
84+
{
85+
"cell_type": "markdown",
86+
"metadata": {},
87+
"source": [
88+
"If the test cases do not cover the bugs, things can go horribly wrong - an example for this is [Therac-25](https://en.wikipedia.org/wiki/Therac-25)."
89+
]
90+
},
8491
{
8592
"cell_type": "markdown",
8693
"metadata": {},

ch03tests/07CI.ipynb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@
66
"source": [
77
"## Continuous Integration\n",
88
"\n",
9+
"Continuous integration (CI) is a software development practice that involves integrating new code to a shared repository regularly (typically at least once a day). The integrated changes are then automatically checked by the CI system on test servers, which allows to detect problems early.\n",
10+
"\n",
911
"### Test servers\n",
1012
"\n",
11-
"Goal: \n",
13+
"The test servers of the CI system might be configured to: \n",
1214
"\n",
1315
"1. run tests nightly\n",
14-
"2. run tests after each commit to github (or other)\n",
15-
"3. run tests on different platforms\n",
16+
"2. run tests after each commit to GitHub (or other shared repository)\n",
17+
"3. run tests on different platforms (e.g. to check that tests pass for different Python versions, or on different operating systems)\n",
1618
"\n",
17-
"Various UCL research groups run servers that can be used to do this automatically.\n",
19+
"There are a number of technologies that can be used to set up a CI system to work with a GitHub repository either on your own server or on a remote machine ([GitHub Actions](https://docs.github.com/en/actions), [Travis CI](https://blog.travis-ci.com/2019-05-30-setting-up-a-ci-cd-process-on-github), [CircleCI](https://circleci.com/), ...). Various UCL research groups run servers that can be used to do this automatically. We currently recommend GitHub Actions as the CI system of choice, which has a quite generous offering for open source projects.\n",
1820
"\n",
19-
"RITS run a [university-wide one](https://www.ucl.ac.uk/isd/services/research-it/research-software-development-tools/support-for-ucl-researchers-to-use-travis)."
21+
"When configuring a CI system, it's important to weigh up the usefulness of the test settings you cover against the energy consumption that will incur from running the tests frequently. For example, you might want to set up the CI system to run a more extensive suite of tests when a PR to the `main` branch is opened, and only run a small number of important tests at every commit. You could also decide that you don't need to test your code for all Python versions, but only for an old version and a recent one."
2022
]
2123
},
2224
{

0 commit comments

Comments
 (0)