Skip to content

Commit

Permalink
Merge branch 'main' into update-late-tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
amanda-minter authored Dec 19, 2023
2 parents ef0b11f + 46ef385 commit 9c386ce
Show file tree
Hide file tree
Showing 6 changed files with 179 additions and 20 deletions.
57 changes: 47 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ three.

### Contribution roles

For a tutorial your role could be of a __Developer__, __Reviewer__, or __Maintainer__. Our goal is to keep an homogeneous package environment among Developers and Reviewers of a “development branch” different to main. This implies that:
For a tutorial your role could be of a __Developer__, __Reviewer__, or __Maintainer__. Our goal is to keep an homogeneous package environment among Developers and Reviewers of a “feature branch” different to main. This implies that:

- We will use [`sandpaper::use_package_cache()`](https://carpentries.github.io/sandpaper/reference/package_cache.html#background) in the R project.
- The Developer will need to register the package version to use in a `renv.lock` file.
Expand All @@ -82,6 +82,20 @@ For a tutorial your role could be of a __Developer__, __Reviewer__, or __Maintai

#### Developer:

You can follow these steps:

- [Update](https://carpentries.github.io/workbench/#updating) the set of workbench packages:

```r
install.packages(c("sandpaper", "varnish", "pegboard", "tinkr"),
repos = c("https://carpentries.r-universe.dev/", getOption("repos")))
```

To contribute with a new episode:

- [Create](https://happygitwithr.com/git-branches#create-a-new-branch) a new feature branch. Write in there your contribution.
- [Create](https://carpentries.github.io/sandpaper-docs/aio.html#episodes) a new episode with `sandpaper::create_episode_md("Episode Name")`

If you need to work with the most recent versions of packages:

- Use [`sandpaper::update_cache()`](https://carpentries.github.io/sandpaper/reference/dependency_management.html). This will:
Expand All @@ -97,10 +111,32 @@ If you need to work with a specific stable version of a package:
+ Update the cache.
- Push the updated `renv.lock` file.

If you need the version of a package that is not programmatically loaded, i.e., is loaded as part of the dependency tree of an specific package:

- [Create](https://carpentries.github.io/sandpaper/articles/building-with-renv.html#adding-new-packages-to-the-cache) an `episodes/install.R` file that lists the installation scripts for the packages in your lesson.
- Run the `episodes/install.R` file to install the list of packages.
- Run `sandpaper::update_cache()`. Before you accept the update, verify that the expected version number is listed as an update. After this, review the `renv.lock` file if this modified the file as expected.
To merge your new episodes:

- Make a Pull request (PR). You can follow the stesp on [using GitHub](#using-github).
- Keep branches up to date with `main`.
- This encourage to keep the history as linear as possible, prioritizing actions like ["rebase and merge"](https://epiverse-trace.github.io/blueprints/git-branching-merging.html#merging-pull-requests-merge-commits-vs-squash-and-merge-vs-rebase-and-merge) to accept the PR.
- Do this in your local repository only. In your feature branch:
- Go to the terminal. [Run `git pull origin main`](https://docs.gitlab.com/ee/topics/git/git_rebase.html) to rebase the feature branch.
- Go to Git tab in the environments pane. Click on `Pull options` > `Pull with rebase`.


#### Reviewer:

You can follow these steps:

- [Install](https://carpentries.github.io/workbench/#installation) the set of workbench packages:

```r
install.packages(c("sandpaper", "varnish", "pegboard", "tinkr"),
repos = c("https://carpentries.r-universe.dev/", getOption("repos")))
```

- [Clone](https://happygitwithr.com/new-github-first.html#new-rstudio-project-via-git) the repository or [Pull](https://www.epirhandbook.com/en/version-control-and-collaboration-with-git-and-github.html?q=github#in-rstudio-1) to update the branch to review on Rstudio.
- [Checkout](https://happygitwithr.com/git-branches#switching-branches) or [Switch](https://rstudio.github.io/cheatsheets/html/rstudio-ide.html#version-control) to the branch to review.
- Use [`sandpaper::manage_deps()`](https://carpentries.github.io/sandpaper/reference/dependency_management.html) to align the packages in your cache with the ones in the `renv.lock` file (defined by the Developer).
Expand All @@ -110,24 +146,24 @@ You can follow these steps:
If you have issues at the Render step, follow these two steps:

- Verify or wait until the branch is under Pull Request (PR) with all checks passed.
- Access to the [`md-outputs-PR-##` branch](https://github.com/epiverse-trace/tutorials/branches) on GitHub to read the `.md` files for each episode.
- Access to the [`md-outputs-PR-##` branch][repo-branches] on GitHub to read the `.md` files for each episode.

Consider that:

- The number `##` is equal to the PR number.
- `.md` files contain [generated lesson content](https://carpentries.github.io/sandpaper-docs/deployment.html) for review with knitted text, code, and figures.
- These `.md` files generate the `.html` of the website and look similar to how it's going to look like online.
- Locally, after switching to the review branch in Rstudio, you can use the [Visual editor](https://posit.co/blog/exploring-rstudio-visual-markdown-editor/), or Preview it as an HTML file (which later you will need to delete).
<!-- - Locally, after switching to the review branch in Rstudio, you can use the [Visual editor](https://posit.co/blog/exploring-rstudio-visual-markdown-editor/), or Preview it as an HTML file (which later you will need to delete).-->
- Make any edit suggestions in the [PR online on GitHub](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request).

#### Maintainer:

You can follow this references:
You can follow this reference:

- Update steps above from any discussion on issues.
- Keep branches up to date with `main`.
- Update steps above from any discussion on [issues][repo-issues].
- Review how to [maintain a Healthy Infrastructure](https://carpentries.github.io/sandpaper-docs/update.html).
- Review how to [Automate a Pull Request](https://carpentries.github.io/sandpaper-docs/pull-request.html#automated-pull-requests). Lessons outside of the carpentries need to [set up a Pull Request bot](https://carpentries.github.io/sandpaper-docs/pull-request.html#automated-pull-requests) with the [Carpentries Apprentice bot](https://github.com/carpentries-bot).
- Review how to [Automate a Pull Request](https://carpentries.github.io/sandpaper-docs/pull-request.html#automated-pull-requests).
- Review topics on [Collaborative Lesson Development](https://carpentries.github.io/lesson-development-training/)

### Writing guidelines

Expand All @@ -138,8 +174,8 @@ To write a new episode, follow these guidelines
- Add required data sets to the `episodes/data/` folder.
- Add glossary terms to `learners/reference.md`.
- Add commonly used links to `links.md`.
- Add a visible callout for prerequisites at the beginning following the [ETK modules notation](https://github.com/epiverse-trace/tutorials/issues/19)
- Add an [introduction section](https://github.com/epiverse-trace/tutorials/issues/17) with the expected summative assessment
- Add a visible callout for prerequisites at the beginning following the [ETK modules notation](https://github.com/epiverse-trace/tutorials/issues/19).
- Add an [introduction section](https://github.com/epiverse-trace/tutorials/issues/17) with the expected summative assessment.
- Add diagrams using Diagrammer with greek letters for parameters to [visually represent mathematical models](https://github.com/epiverse-trace/tutorials/issues/21).
- Use [callouts](https://carpentries.github.io/sandpaper-docs/instructor/component-guide.html) for complementary concepts and function arguments details.
- Review how callouts need to be [coded in plain text](https://github.com/carpentries/sandpaper-docs/blob/main/learners/component-guide.md?plain=1).
Expand Down Expand Up @@ -175,7 +211,7 @@ community listed at <https://github.com/epiverse-trace/> including via social
media, slack, newsletters, and email lists. You can also [reach us by
email][contact].

[repo]: https://github.com/epiverse-trace/tutorials/
[repo]: https://github.com/epiverse-trace/tutorials
[repo-issues]: https://github.com/epiverse-trace/tutorials/issues
[contact]: mailto:[email protected]
[cp-site]: https://epiverse-trace.github.io/
Expand All @@ -194,3 +230,4 @@ email][contact].
[swc-site]: https://software-carpentry.org/
[lc-site]: https://librarycarpentry.org/
[template-doc]: https://carpentries.github.io/workbench/
[repo-branches]: https://github.com/epiverse-trace/tutorials/branches
3 changes: 1 addition & 2 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,5 @@ profiles:
#
# This space below is where custom yaml items (e.g. pinning
# sandpaper and varnish versions) should live

varnish: epiverse-trace/varnish@epiversetheme
sandpaper: 'carpentries/sandpaper#533'

121 changes: 121 additions & 0 deletions episodes/data/ebola_cases.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
"date","confirm"
2014-05-18,1
2014-05-20,2
2014-05-21,4
2014-05-22,6
2014-05-23,1
2014-05-24,2
2014-05-26,10
2014-05-27,8
2014-05-28,2
2014-05-29,12
2014-05-30,7
2014-05-31,2
2014-06-01,5
2014-06-02,2
2014-06-03,1
2014-06-05,3
2014-06-06,7
2014-06-07,4
2014-06-08,6
2014-06-09,1
2014-06-10,29
2014-06-11,1
2014-06-12,10
2014-06-13,20
2014-06-14,17
2014-06-15,4
2014-06-16,1
2014-06-17,4
2014-06-18,8
2014-06-19,11
2014-06-20,9
2014-06-21,3
2014-06-22,3
2014-06-23,2
2014-06-24,9
2014-06-25,9
2014-06-26,14
2014-06-27,15
2014-06-28,21
2014-06-29,9
2014-06-30,15
2014-07-01,12
2014-07-02,11
2014-07-03,4
2014-07-04,11
2014-07-05,17
2014-07-06,9
2014-07-07,18
2014-07-08,11
2014-07-09,8
2014-07-10,14
2014-07-11,8
2014-07-12,7
2014-07-13,4
2014-07-14,7
2014-07-15,5
2014-07-16,7
2014-07-17,8
2014-07-18,10
2014-07-19,13
2014-07-20,13
2014-07-21,18
2014-07-22,9
2014-07-23,13
2014-07-24,10
2014-07-25,40
2014-07-26,8
2014-07-27,7
2014-07-28,14
2014-07-29,9
2014-07-30,14
2014-07-31,12
2014-08-01,12
2014-08-02,15
2014-08-03,14
2014-08-04,5
2014-08-05,13
2014-08-06,8
2014-08-07,8
2014-08-08,13
2014-08-09,8
2014-08-10,13
2014-08-11,4
2014-08-12,9
2014-08-13,6
2014-08-14,8
2014-08-15,5
2014-08-16,1
2014-08-17,5
2014-08-18,17
2014-08-19,18
2014-08-20,35
2014-08-21,18
2014-08-22,16
2014-08-23,18
2014-08-24,38
2014-08-25,25
2014-08-26,42
2014-08-27,16
2014-08-28,26
2014-08-29,30
2014-08-30,23
2014-08-31,24
2014-09-01,29
2014-09-02,29
2014-09-03,43
2014-09-04,41
2014-09-05,15
2014-09-06,44
2014-09-07,30
2014-09-08,42
2014-09-09,38
2014-09-10,21
2014-09-11,39
2014-09-12,37
2014-09-13,38
2014-09-14,49
2014-09-15,68
2014-09-16,84
2014-09-17,56
7 changes: 4 additions & 3 deletions episodes/simulating-transmission.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Learners should familiarise themselves with following concept dependencies befor

## Introduction

Mathematical models are useful tools for generating future trajectories of disease spread. In this tutorial, we will use the R package `{epidemics}` to generate disease trajectories of an influenza strain with pandemic potential. By the end of this tutorial, you will be able to generate the trajectory below showing the number of infectious individuals in different age categories through time.
Mathematical models are useful tools for generating future trajectories of disease spread. In this tutorial, we will use the R package `{epidemics}` to generate disease trajectories of an influenza strain with pandemic potential. By the end of this tutorial, you will be able to generate the trajectory below showing the number of infectious individuals in different age categories over time.

```{r traj, echo = FALSE, message = FALSE, fig.width = 10, eval = TRUE}
# load contact and population data from socialmixr::polymod
Expand Down Expand Up @@ -150,9 +150,10 @@ By the end of this tutorial, learners should be able to replicate the above imag
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::



## Simulating disease spread
To generate trajectories of disease spread, we must first select a mathematical model to use. In `epidemics` models are prefixed with `model` and suffixed by the name of infection (e.g. Ebola) or a different identifier (e.g. default), and whether the model has a R or [C++](../learners/reference.md#cplusplus) code base.

To generate predictions of infectious disease trajectories, we must first select a mathematical model to use.
There is a library of models to choose from in `epidemics`. Models in `epidemics` are prefixed with `model` and suffixed by the name of infection (e.g. Ebola) or a different identifier (e.g. default), and whether the model has a R or [C++](../learners/reference.md#cplusplus) code base.

In this tutorial, we will use the default model in `epidemics`, `model_default_cpp()` which is an age-structured SEIR model described by a system of [ordinary differential equations](../learners/reference.md#ordinary). For each age group $i$, individuals are classed as either susceptible $S$, infected but not yet infectious $E$, infectious $I$ or recovered $R$.

Expand Down
9 changes: 5 additions & 4 deletions learners/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: 'Glossary of Terms: Epiverse-TRACE'
## A

[Airborne transmission]{#airborne}
: Individuals become infected via contact with infectious particles in the air. Examples include influenza, COVID-19. [More information on airborne transmission](https://www.ncbi.nlm.nih.gov/books/NBK531468/).
: Individuals become infected via contact with infectious particles in the air. Examples include influenza and COVID-19. Atler et al. (2023) discuss about [factors and management procedures](https://www.ncbi.nlm.nih.gov/books/NBK531468/) of airborne transmission.

<!-- ## B -->

Expand All @@ -20,7 +20,7 @@ title: 'Glossary of Terms: Epiverse-TRACE'
## D

[Deterministic model]{#deterministic}
: Models that will always have the same trajectory for given initial conditions and parameters. Examples include ordinary differential equations and difference equations.
: Models that will always have the same trajectory for given initial conditions and parameter values. Examples include ordinary differential equations and difference equations.

[Direct transmission]{#direct}
: Individuals become infected via direct contact with other infected humans. Airborne transmitted infections are often modelled as directly transmitted infections as they require close contact with infected individuals for successful transmission.
Expand Down Expand Up @@ -80,7 +80,7 @@ title: 'Glossary of Terms: Epiverse-TRACE'
: The state variables in a model represented by [ordinary differential equations](#ordinary) are the disease states that individuals can be in e.g. if individuals can be susceptible, infectious or recovered the state variables are $S$, $I$ and $R$. There is an ordinary differential equation for each state variable.

[Stochastic model]{#stochastic}
: A model that includes some stochastic process resulting in variation in model simulations for the same initial conditions and parameters. Examples include stochastic differential equations, branching process models. For more detail see [Allen (2017)](https://doi.org/10.1016/j.idm.2017.03.001).
: A model that includes some stochastic process resulting in variation in model simulations for the same initial conditions and parameter values. Examples include stochastic differential equations and branching process models. For more detail see [Allen (2017)](https://doi.org/10.1016/j.idm.2017.03.001).


<!-- ## T -->
Expand All @@ -90,7 +90,8 @@ title: 'Glossary of Terms: Epiverse-TRACE'
## V

[Vector-borne transmission]{#vectorborne}
: Vector-borne transmission requires a vector (e.g. mosquitoes) to pass on a pathogen to humans (or animals). Examples of vector-borne diseases include malaria and dengue. [More information on vector-borne transmission](https://www.who.int/news-room/fact-sheets/detail/vector-borne-diseases).
: Vector-borne transmission means an infection can be passed from a vector (e.g. mosquitoes) to humans. Examples of vector-borne diseases include malaria and dengue. The World Health Organization have a [Fact sheet about Vector-borne diseases](https://www.who.int/news-room/fact-sheets/detail/vector-borne-diseases) with key information and a list of them according to their vector.



<!-- ## W -->
Expand Down
2 changes: 1 addition & 1 deletion profiles/learner-profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Who are these tutorials for?

## Who are these tutorials for?

We thought about Lucia, Patricia, and Anya as learner personas in designing the contents of this training:
We thought about Lucia, Patricia, and Vania as learner personas in designing the contents of this training:

- [Lucia](https://epiverse-trace.github.io/personas/lucia-outbreaks.html), a Field Epidemiologist in a National Health Agency that uses R for data cleaning, plotting and automated reports.

Expand Down

0 comments on commit 9c386ce

Please sign in to comment.