You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,10 @@ A short course on the basics of software testing in Python using the `pytest` li
4
4
5
5
This lesson uses [The Carpentries Workbench][workbench] template.
6
6
7
+
It is derived from the [FAIR2 for Research Software](https://fair2-for-research-software.github.io/)
8
+
training course [python-testing-for-research](https://github.com/FAIR2-for-research-software/python-testing-for-research)
9
+
by the University of Sheffield.
10
+
7
11
## Course Description
8
12
9
13
Whether you are a seasoned developer or just write the occasional script, it's important to know that your code does what you intend, and will continue to do so as you make changes.
@@ -18,7 +22,7 @@ This course seeks to provide you with conceptual understanding and the tools you
18
22
- Running a test suite & understanding outputs
19
23
- Best practices
20
24
- Testing for errors
21
-
- Testing data structures
25
+
- Testing floating point data
22
26
- Fixtures
23
27
- Parametrisation
24
28
- Testing file outputs
@@ -30,18 +34,27 @@ Contributions are welcome, please refer to the [contribution guidelines](CONTRIB
30
34
31
35
### Build the lesson locally
32
36
33
-
To render the lesson locally, you will need to have [R][r] installed. Instructions for using R with the Carpentries template is [available](https://carpentries.github.io/workbench/#installation) but some additional setps have been taken to make sure the enivronment is reproducible using the [`{renv}`](https://rstudio.github.io/renv/articles/renv.html) package and an `renv.lockfile` is included which allows the environment to be re-created along with dependencies.
37
+
To render the lesson locally, you will need to have [R][r] installed.
38
+
Instructions for using R with the Carpentries template is available on the
After cloning the repository, you can set up `renv` and install all packages with:
34
44
35
-
After cloning the repository, you can set up the `renv` and install all packages with:
36
45
```r
37
-
renv::restore()
46
+
renv::init()
38
47
# Optionally update packages
39
48
renv::update()
40
49
```
41
50
Once you have installed the dependencies, you can render the pages locally by starting R in the project root and running:
51
+
42
52
```r
43
53
sandpaper::serve()
44
54
```
55
+
56
+
When building the site subsequently, you may need to run `renv::activate()` first.
57
+
45
58
This will build the pages and start a local web-server in R and open it in your browser. These pages are "live" and will respond to local file changes if you save them.
0 commit comments