Skip to content

Commit

Permalink
Enforce one sentence per line
Browse files Browse the repository at this point in the history
Use no-break space (U+00A0) after periods in author names and other
contexts where a period is located within a sentence and should be
followed by a space.
  • Loading branch information
robmoss committed May 7, 2024
1 parent 3b1b791 commit 690ed43
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 6 deletions.
18 changes: 18 additions & 0 deletions check-one-sentence-per-line.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
#
# Detect lines that contain more than one sentence.
#
# We use a regular expression to identify lines that satisfy the following:
#
# 1. They contain at least one letter ('.*[A-Za-z].*'), to ignore numbered
# list items;
#
# 2. They contain a literal period that is not preceded by a literal period
# ('[^.]\.'), to ignore ellipses ('...');
#
# 3. The literal period is followed by a regular space ('\. '), to ignore
# inline periods in common abbreviations (such as 'e.g.,' and 'i.e.,') and
# in author names where non-breaking spaces should be used to separate
# initials (e.g., 'Jesse M. Alston' rather than 'Jesse M. Alston').
#
grep --recursive --include='*.md' '^.*[A-Za-z].*[^.]\. ' docs/ && exit 2
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ In this project, I developed a compartmental model of pertussis to determine app
While plotting some single model simulations, I noticed anomalies in the modelled output for two experiments.
The first experiment had an order of magnitude more people in the infectious compartments than in the second experiment, even though there seemed to be far fewer infections occurring.
This scenario did not fit with the parameter values that were being used.
In the differential equation file for my model, in addition to extracting the state of the model (i.e. the population in each compartment at each time step), for ease of analysis I also extracted the cumulative number of infections up to that time step.
In the differential equation file for my model, in addition to extracting the state of the model (i.e., the population in each compartment at each time step), for ease of analysis I also extracted the cumulative number of infections up to that time step.
The calculation for this extraction of cumulative incidence was incorrect.

## The solution
Expand All @@ -26,4 +26,4 @@ I was able to determine which parts of my results would have been affected by th
## How version control helped

Using a **pen and paper** form of version control enabled me to pinpoint the introduction of the error and identify the affected analyses, but it was a tedious process.
While keeping an immaculate record of changes that I had made was invaluable, imagine how much simpler and faster the process would have been if I had been a regular user of an electronic version control system such as Git!
While keeping an immaculate record of changes that I had made was invaluable, imagine how much simpler and faster the process would have been if I had been a regular user of an electronic version control system such as Git!
3 changes: 2 additions & 1 deletion docs/community/meetings/2023-04-17.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ For example, consider these questions:

- Aim to hold these meetings on a (roughly) monthly basis.

- Prior to each meeting, we will invite community members to propose a topic or discussion point to be the focus of the meeting. This may be an open question or challenge, an example of good research practices, a useful software tool, etc.
- Prior to each meeting, we will invite community members to propose a topic or discussion point to be the focus of the meeting.
This may be an open question or challenge, an example of good research practices, a useful software tool, etc.

- Schedule each meeting to best suit the availability of community members who are particularly interested in the chosen topic.

Expand Down
3 changes: 2 additions & 1 deletion docs/guides/collaborating/continuous-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ This can provide rapid feedback while you develop your code and collaborate with

This book is an example of Continuous Integration: every time a commit is pushed to the [central repository](https://github.com/robmoss/git-is-my-lab-book), the [online book](https://git-is-my-lab-book.net/) is automatically updated.

Because the central repository is hosted on GitHub, we use [GitHub Actions](https://docs.github.com/en/actions/quickstart). Note that this is a GitHub-specific CI system.
Because the central repository is hosted on GitHub, we use [GitHub Actions](https://docs.github.com/en/actions/quickstart).
Note that this is a GitHub-specific CI system.
You can view the update action for this book [here](https://github.com/robmoss/git-is-my-lab-book/blob/master/.github/workflows/deploy.yml).

We also use CI to publish each pull request, so that contributions can be previewed during the review process.
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/reproducibility/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ This section demonstrates how to use version control and software testing to ens

Reproducibility is just as much about simple work habits as the tools used to share data and code.

— [Jesse M. Alston and Jessica A. Rick](https://doi.org/10.1002/bes2.1801)
— [Jesse M. Alston and Jessica A. Rick](https://doi.org/10.1002/bes2.1801)
2 changes: 1 addition & 1 deletion docs/guides/testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Tests check whether your code behaves as intended, and can warn you if you intro

Tests can show the presence of bugs, but **not** their absence.

— [Edsger W. Dijkstra](https://en.wikiquote.org/wiki/Edsger_W._Dijkstra)
— [Edsger W. Dijkstra](https://en.wikiquote.org/wiki/Edsger_W._Dijkstra)

0 comments on commit 690ed43

Please sign in to comment.