Skip to content

Commit f230cce

Browse files
Merge pull request #71 from archaeolauren/callout-01
Style edits to episode 01 callout "Why should I care"
2 parents ee39069 + 400eed9 commit f230cce

9 files changed

Lines changed: 61 additions & 62 deletions

episodes/01-introduction.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Course introduction"
2+
title: "Course Introduction"
33
teaching: 10
44
exercises: 10
55
---
@@ -34,21 +34,20 @@ That is, enabling others to run our code and obtain the same results we did.
3434
## Why should I care about reproducibility?
3535

3636
Scientific transparency and rigor are key factors in research.
37-
Scientific methodology and results need to be published openly and replicated and confirmed by several independent parties.
38-
However, research papers often lack the full details required for independent reproduction or replication.
39-
Many attempts at reproducing or replicating the results of scientific studies have failed in a variety of disciplines ranging from psychology ([The Open Science Collaboration (2015)][replication-crisis-osc]) to cancer sciences ([Errington et al (2021)][replication-crisis-errington]).
40-
These are called [**the reproducibility and replicability crises**][reproducibility-crisis] - ongoing methodological crises in which the results of many scientific studies are difficult or impossible to repeat.
37+
Scientific methodology and results need to be published openly, replicated and confirmed by several independent parties.
38+
However, research papers often lack the full details required for independent reproduction (reaching the same results with the same data) or replication (reaching the same results with new data).
39+
Across many disciplines, the failure of attempts to reproduce or replicate scientific conclusions have resulted in [**reproducibility and replicability crises**][reproducibility-crisis], leading to reduced confidence in the scientific conclusions of fields as diverse as psychology ([The Open Science Collaboration (2015)][replication-crisis-osc]) and cancer sciences ([Errington et al (2021)][replication-crisis-errington]).
4140

4241
Reproducible research is a practice that ensures that researchers can repeat the same analysis multiple times with the same results.
4342
It offers many benefits to those who practice it:
4443

45-
* Reproducible research helps researchers remember how and why they performed specific tasks and analyses; this enables easier explanation of work to collaborators and reviewers.
46-
* Reproducible research enables researchers to quickly modify analyses and figures - this is often required at all stages of research and automating this process saves loads of time.
47-
* Reproducible research enables reusability of previously conducted tasks so that new projects that require the same or similar tasks become much easier and efficient by reusing or reconfiguring previous work.
48-
* Reproducible research supports researchers' career development by facilitating the reuse and citation of all research outputs - including both code and data.
44+
* Reproducible research helps researchers remember how and why they performed specific tasks and analyses; this makes work easier to explain to collaborators and reviewers.
45+
* Reproducible research enables researchers to quickly modify analyses and figures, saving time and effort when datasets or methods change.
46+
* Reproducible research is reusable; tasks can be recycled or reconfigured in future work.
47+
* Reproducible research supports researchers' career development by facilitating the citation of all research outputs, including both code and data.
4948
* Reproducible research is a strong indicator of rigor, trustworthiness, and transparency in scientific research.
5049
This can increase the quality and speed of peer review, because reviewers can directly access the analytical process described in a manuscript.
51-
It increases the probability that errors are caught early on - by collaborators or during the peer-review process, helping alleviate the reproducibility crisis.
50+
It increases the probability that errors are caught early on, by collaborators or during the peer-review process, helping alleviate the reproducibility crisis.
5251

5352
However, reproducible research often requires that researchers implement new practices and learn new tools.
5453
This course aims to teach some of these practices and tools pertaining to the use of software to conduct reproducible research.
@@ -57,7 +56,7 @@ Review [the Reproducible Research Discussion](./reproducible-research-discussion
5756

5857
::::::::::::::::::::::::::::::
5958

60-
## Practices for building better research software
59+
## Practices for Building Better Research Software
6160

6261
The practices we will cover for building better research software fall into three areas.
6362

@@ -92,7 +91,7 @@ Write your reflections in the shared collaborative document.
9291

9392
::::::::::::::::::
9493

95-
## Our research software project
94+
## Our Research Software Project
9695

9796
You are going to follow a fairly typical experience of a new researcher (e.g. a PhD student or a postdoc) joining a research group.
9897
You were emailed some spacewalks data and analysis code bundled in the `spacewalks.zip` archive, written by another group
@@ -245,7 +244,7 @@ So, we cannot even run the code on our machines.
245244
There is also a number of issues we identified with the software project that could do with improving.
246245
For the rest of this course, we will work on fixing these issues and applying some good software engineering practices.
247246

248-
## Further reading
247+
## Further Reading
249248

250249
We recommend the following resources for some additional reading on reproducible research:
251250

@@ -259,6 +258,6 @@ We recommend the following resources for some additional reading on reproducible
259258
* [Training materials on different aspects of research software engineering][intersect-rse-training] (including open source, reproducibility, research software testing, engineering, design, continuous integration, collaboration, version control, packaging, etc.), compiled by the [INTERSECT project](https://intersect-training.org/)
260259
* [Curated resources][forrt-resources] by the [Framework for Open and Reproducible Research Training](https://forrt.org/) (FORRT)
261260

262-
## Acknowledgements and references
261+
## Acknowledgements and References
263262

264263
The content of this course borrows from or references [various work](learners/reference.md#litref), especially the [original version of this course with python examples][bbrs-py].

episodes/02-better-start-version-control.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Better start with a software project
2+
title: Better Start With a Software Project
33
teaching: 30
44
exercises: 30
55
---
@@ -32,7 +32,7 @@ produces can be trusted and others can build upon it with confidence.
3232
Let's begin by creating a new software project from our existing code,
3333
and start tracking changes to it with version control.
3434

35-
## From script to software project
35+
## From Script to Software Project
3636

3737
In the previous episode you have unzipped `spacewalks.zip` into a directory `spacewalks` in your home directory.
3838

@@ -70,7 +70,7 @@ Over the rest of the course, we will transform a collection of these files into
7070
The first thing you may notice that our software project contains folder `astronaut-data-analysis-old` which presumably tries to keep track of older versions of the code. There is a better way to do that using version control tool, such as Git, and we can delete this folder but will wait until after we set up our version control with git.
7171
This way we can keep that version in our history and can delete it so it isn't currently in our folder.
7272

73-
## Version control
73+
## Version Control
7474

7575
Before we do any further changes to our software, we want to make sure we can keep a history of what changes we have done since we inherited the code from our colleague.
7676

@@ -729,7 +729,7 @@ On branch main
729729
nothing to commit, working tree clean
730730
```
731731

732-
## Interacting with a remote Git server
732+
## Interacting With a Remote Git Server
733733

734734
Git is distributed version control system and lets us synchronise work between multiple copies of the same repository -
735735
which may not be on your machine (called **remote repositories**).
@@ -830,7 +830,7 @@ This command tells Git to update the "main" branch on the "origin" remote.
830830
The `-u` flag (short for `--set-upstream`) sets the 'tracking reference' for the current branch,
831831
so that in future `git push` will default to sending to `origin main`.
832832

833-
## Software project in GitHub
833+
## Software Project in GitHub
834834

835835
We now have our software project in GitHub and have linked it to our local working copy.
836836
We are ready to start more work on software development and publishing and backing up that work on GitHub.
@@ -903,7 +903,7 @@ At this point, the code in your local software project's directory should be as
903903

904904
:::
905905

906-
## Further reading
906+
## Further Reading
907907

908908
We recommend the following resources for some additional reading on the topic of this episode:
909909

episodes/03-reproducible-dev-environment.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Reproducible software environments
2+
title: Reproducible Software Environments
33
teaching: 30
44
exercises: 0
55
---
@@ -59,7 +59,7 @@ If you run into problems not mentioned here, please open an [issue in the lesson
5959

6060
::::::::::::::::::::::::::::::::::::::::::::::::
6161

62-
## Software dependencies
62+
## Software Dependencies
6363

6464
If we have a look at our script, we may notice a few library calls such as `library("tidyverse")` throughout the code.
6565

@@ -74,7 +74,7 @@ As a result, each R project you work on may require a different setup and set of
7474
To prevent conflicts and maintain reproducibility across projects, it’s helpful to keep these configurations isolated.
7575
The typical solution is to create a project-specific environment using tools like {renv}, which maintains its own library of packages and records exact versions in a lockfile—ensuring that the project always runs with the same package set it was developed with.
7676

77-
## What are virtual software environments?
77+
## What Are Virtual Software Environments?
7878

7979
So what exactly are virtual software environments, and why use them?
8080

@@ -119,7 +119,7 @@ We should not let the difficulty of attaining "perfect" reproducibility prevent
119119

120120
::::::::::::::::::::::::::::::
121121

122-
## Managing virtual environments R-style
122+
## Managing Virtual Environments R-Style
123123

124124
Instantiating virtual environments in R is multi-step, multi-tool process.
125125

@@ -375,7 +375,7 @@ Furthermore, your expertise will develop as you get more practice with managing
375375
376376
::::::::::::::::::::::::::::::
377377
378-
## Running the code and reproducing results
378+
## Running the Code and Reproducing Results
379379
380380
We are now setup to run our code from the newly created R project
381381
@@ -452,7 +452,7 @@ At this point, the code in your local software project's directory should be as
452452
453453
::::::
454454
455-
## Further reading
455+
## Further Reading
456456
457457
We recommend the following resources for some additional reading on the topic of this episode:
458458

episodes/04-code-readability.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Code readability
2+
title: Code Readability
33
teaching: 60
44
exercises: 30
55
---
@@ -62,7 +62,7 @@ renv::restore()
6262

6363
:::
6464

65-
## Place `library` functions at the top
65+
## Place `library` Functions at the Top
6666

6767
Let’s look at our code again. One thing that stands out is that we’re calling library() in multiple places throughout the script. By convention, all libraries should be loaded at the top so dependencies are easy to see and not buried in the code. This improves readability and makes the code easier to reuse and maintain.
6868

@@ -152,7 +152,7 @@ Let's make sure we commit our changes.
152152
$ git add eva_data_analysis.R
153153
$ git commit -m "Move library calls to the top of the script"
154154
```
155-
## Rules for variable names in R
155+
## Rules for Variable Names in R
156156

157157
$ git add eva_data_analysis.R
158158
$ git commit -m "Move library calls to the top of the script"
@@ -318,7 +318,7 @@ As we have now updated all the variable names to be more descriptive, we can now
318318
To do so, we open our repository in GitHub, switch to the Issues tab, find the issue to "improve variable names" we created earlier.
319319
There are more automated ways to close issues based on a commit/pull request that we will learn later, for now we will click the "Close issue" button at the bottom of the discussion.
320320

321-
## Remove unused variables and imports
321+
## Remove Unused Variables and Imports
322322

323323
Unused variables or import statements can cause confusion about what the code is doing, making it harder to read and easier to introduce mistakes. Such things may seem harmless as they do not cause immediate syntax errors - but they can potentially lead to subtle program logic errors, unexpected behavior, wrong results and issues later on making them especially tricky to detect and fix. Over time, this makes the codebase more fragile and harder to maintain and extend.
324324

@@ -437,7 +437,7 @@ The IDE understands the underlying structure of the code, which makes these comp
437437

438438

439439

440-
## Use existing packages from known developers
440+
## Use Existing Packages From Known Developers
441441

442442
Our script currently reads the data line-by-line from the JSON data file and uses custom code to manipulate the data. Variables of interest are stored in lists but there are more suitable data structures (e.g. dataframes or tibbles) to store data in our case.
443443

@@ -520,7 +520,7 @@ print(p)
520520

521521
We have committed the code and the environment changes together since they are related and form one logical unit of change.
522522

523-
## Use comments to explain functionality
523+
## Use Comments to Explain Functionality
524524

525525
Commenting is a very useful practice to help convey the context of the code. It can be helpful as a reminder for your future self or your collaborators as to why code is written in a certain way, how it is achieving a specific task, or the real-world implications of your code.
526526

@@ -655,7 +655,7 @@ Commit changes:
655655
$ git push origin main
656656
```
657657

658-
## Separate units of functionality
658+
## Separate Units of Functionality
659659

660660
Functions are a fundamental concept in writing software and are one of the core ways you can organize your code to improve its readability. A function is an isolated section of code that performs a single, *specific* task that can be simple or complex.
661661

@@ -848,7 +848,7 @@ plot_cumulative_time_in_space(eva_tbl, graph_file)
848848

849849
:::
850850

851-
## Use `roxygen2` comments to document functions
851+
## Use `roxygen2` Comments to Document Functions
852852

853853
Now that we’ve written a few functions, it’s time to document them so we can quickly remember what they do. That way, someone reading this code later can understand the intent without having to reverse-engineer the implementation.
854854

@@ -1171,7 +1171,7 @@ At this point, the code in your local software project's directory should be as
11711171

11721172
:::
11731173

1174-
## Further reading
1174+
## Further Reading
11751175

11761176
We recommend the following resources for some additional reading on the topic of this episode:
11771177

episodes/05-code-structure.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Code structure
2+
title: Code Structure
33
teaching: 60
44
exercises: 30
55
---
@@ -52,7 +52,7 @@ $ source venv_spacewalks/Scripts/activate # Windows
5252

5353
:::
5454

55-
## Functions for modular and reusable code
55+
## Functions for Modular and Reusable Code
5656

5757
As we have already seen in the previous episode - functions play a key role in creating modular and reusable code.
5858
After extracting units of functionality into separate functions, the main part of our code became much simpler and more readable, only containing the invocation of the following three functions:
@@ -211,7 +211,7 @@ print("--END--")
211211

212212
Even though our code became a bit longer than previously, it is more readable and new functions we added can potentially be reused elsewhere too.
213213

214-
## Creating a main function
214+
## Creating a Main Function
215215

216216
Now we also want to move the main functionality into a main function.
217217
There is a common code structure (pattern) for writing a main function in Python:
@@ -405,7 +405,7 @@ if __name__ == "__main__":
405405
main(input_file, output_file, graph_file)
406406
```
407407

408-
## Command-line interface to code
408+
## Command-Line Interface to Code
409409

410410
A common way to structure code is to have a command-line interface to allow the passing of various parameters.
411411
For example, we can pass the input data file to be read and the output file
@@ -576,7 +576,7 @@ Remember to commit our changes.
576576
(venv_spacewalks) $ git commit -m "Add command line functionality to script"
577577
```
578578

579-
## Directory structure for software projects
579+
## Directory Structure for Software Projects
580580

581581
Expanding on the code structure theme, following conventions on consistent and informative directory structure
582582
for your projects will ensure people will immediately know where to find things within your project, especially helpful
@@ -823,7 +823,7 @@ At this point, the code in your local software project's directory should be as
823823

824824
::::::
825825

826-
## Further reading
826+
## Further Reading
827827

828828
We recommend the following resources for some additional reading on the topic of this episode:
829829

episodes/06-code-correctness.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Code correctness & testing"
2+
title: "Code Correctness & Testing"
33
teaching: 60
44
exercises: 30
55
---
@@ -55,7 +55,7 @@ $ source venv_spacewalks/Scripts/activate # Windows
5555

5656
:::
5757

58-
## Why use software testing?
58+
## Why Use Software Testing?
5959

6060
Including testing in our research workflow helps us to produce **better software** and conduct **better research**:
6161

@@ -74,7 +74,7 @@ Including testing in our research workflow helps us to produce **better software
7474
step-by-step approach that we can apply to verify that our code is
7575
correct.
7676

77-
## Types of software tests
77+
## Types of Software Tests
7878

7979
There are many different types of software tests, including:
8080

@@ -125,7 +125,7 @@ Fill in the blanks in the sentences below:
125125
:::
126126
:::
127127

128-
## Informal testing
128+
## Informal Testing
129129

130130
How should we test our code? One approach is to copy/paste the code or a function into a Python terminal - *different from a command line terminal* - which allows you to interact with the Python interpreter more directly.
131131
From the Python terminal we can then run one function or a piece of code at a time and check that they behave as expected.
@@ -224,7 +224,7 @@ However, there are limitations to this approach:
224224
:::
225225
::::::
226226

227-
## Formal testing
227+
## Formal Testing
228228

229229
We can overcome some of these limitations by formalising our testing process.
230230
A formal approach to testing our code is to write dedicated test functions to check it.
@@ -397,7 +397,7 @@ To run our remaining tests we would have to manually comment out our failing tes
397397
As our code base grows, testing in this way becomes cumbersome and error-prone.
398398
These limitations can be overcome by automating our tests using a **testing framework**.
399399

400-
## Testing frameworks
400+
## Testing Frameworks
401401

402402
Testing frameworks can automatically find all the tests in our code base, run all of them (so we do not have to invoke
403403
them explicitly or, even worse, forget to invoke them), and present the test results as a readable summary.
@@ -644,7 +644,7 @@ As a result, running the function raises a `NameError` rather than returning a c
644644
:::
645645
:::
646646

647-
## Test suite design
647+
## Test Suite Design
648648

649649
We now have the tools in place to automatically run tests.
650650
However, that alone is not enough to properly test code.
@@ -1187,7 +1187,7 @@ if __name__ == "__main__":
11871187

11881188
There is an [optional exercise](../learners/test-suite-exercise.md) to implement additional tests and practice writing tests some more.
11891189

1190-
## Continuous Integration for automated testing
1190+
## Continuous Integration for Automated Testing
11911191

11921192
Continuous Integration (CI) services provide the infrastructure to automatically run every test function in
11931193
the test code suite every time changes are pushed to a remote repository.
@@ -1220,7 +1220,7 @@ https://github.com/carpentries-incubator/bbrs-software-project/tree/07-software-
12201220

12211221
::::::
12221222

1223-
## Further reading
1223+
## Further Reading
12241224

12251225
We recommend the following resources for some additional reading on the
12261226
topic of this episode:

0 commit comments

Comments
 (0)