Skip to content

Commit

Permalink
Merge branch 'swcarpentry:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyhodges authored Jul 31, 2024
2 parents 191b36b + a6c060a commit cc891c2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This directory contains workflows to be used for Lessons using the {sandpaper}
lesson infrastructure. Two of these workflows require R (`sandpaper-main.yaml`
and `pr-recieve.yaml`) and the rest are bots to handle pull request management.
and `pr-receive.yaml`) and the rest are bots to handle pull request management.

These workflows will likely change as {sandpaper} evolves, so it is important to
keep them up-to-date. To do this in your lesson you can do the following in your
Expand Down Expand Up @@ -94,7 +94,7 @@ branch called `update/workflows` and a pull request is created. Maintainers are
encouraged to review the changes and accept the pull request if the outputs
are okay.

This update is run ~~weekly or~~ on demand.
This update is run weekly or on demand.

### 03 Maintain: Update Package Cache (update-cache.yaml)

Expand Down Expand Up @@ -140,7 +140,7 @@ Once the checks are finished, a comment is issued to the pull request, which
will allow maintainers to determine if it is safe to run the
"Receive Pull Request" workflow from new contributors.

### Recieve Pull Request (pr-recieve.yaml)
### Receive Pull Request (pr-receive.yaml)

**Note of caution:** This workflow runs arbitrary code by anyone who creates a
pull request. GitHub has safeguarded the token used in this workflow to have no
Expand Down Expand Up @@ -171,7 +171,7 @@ The artifacts produced are used by the next workflow.

### Comment on Pull Request (pr-comment.yaml)

This workflow is triggered if the `pr-recieve.yaml` workflow is successful.
This workflow is triggered if the `pr-receive.yaml` workflow is successful.
The steps in this workflow are:

1. Test if the workflow is valid and comment the validity of the workflow to the
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sandpaper-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.13.0
0.16.5
12 changes: 8 additions & 4 deletions episodes/16-writing-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -573,21 +573,25 @@ density. In the model, time takes discrete values 0, 1, 2, ...

## Solution

1. ```python
1.
```python
def logistic_map(x, r):
return r * x * (1 - x)
```

2. ```python
2.
```python
initial_population = 0.5
t_final = 10
r = 1.0
population = [initial_population]

for t in range(t_final):
population.append( logistic_map(population[t], r) )
```

3. ```python
3.
```python
def iterate(initial_population, t_final, r):
population = [initial_population]
for t in range(t_final):
Expand All @@ -598,7 +602,7 @@ density. In the model, time takes discrete values 0, 1, 2, ...
population = iterate(0.5, period, 1)
print(population[-1])
```

```output
0.06945089389714401
0.009395779870614648
Expand Down

0 comments on commit cc891c2

Please sign in to comment.