Skip to content

Commit

Permalink
Merge branch 'main' into all-contributors/add-fiveop
Browse files Browse the repository at this point in the history
  • Loading branch information
BeastyBlacksmith authored Nov 15, 2024
2 parents b91a1e3 + f102b57 commit fc072bd
Show file tree
Hide file tree
Showing 9 changed files with 233 additions and 24 deletions.
108 changes: 108 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,114 @@
"profile": "https://gitlab.com/fiveop",
"contributions": [
"content"
]
},
{
"login": "gus-pendleton",
"name": "Gus Pendleton",
"avatar_url": "https://avatars.githubusercontent.com/u/56881090?v=4",
"profile": "https://gus-pendleton.github.io/",
"contributions": [
"content"
]
},
{
"login": "ocaisa",
"name": "ocaisa",
"avatar_url": "https://avatars.githubusercontent.com/u/3840437?v=4",
"profile": "https://github.com/ocaisa",
"contributions": [
"infra"
]
},
{
"login": "MCMaurer",
"name": "Michael Culshaw-Maurer",
"avatar_url": "https://avatars.githubusercontent.com/u/15881370?v=4",
"profile": "http://michaelc-m.com",
"contributions": [
"content"
]
},
{
"login": "Myrkwid",
"name": "Myrkwid",
"avatar_url": "https://avatars.githubusercontent.com/u/102226458?v=4",
"profile": "https://github.com/Myrkwid",
"contributions": [
"code"
]
},
{
"login": "tkphd",
"name": "Trevor Keller",
"avatar_url": "https://avatars.githubusercontent.com/u/2179347?v=4",
"profile": "http://www.trevorkeller.com",
"contributions": [
"content"
]
},
{
"login": "sstevens2",
"name": "Sarah Stevens",
"avatar_url": "https://avatars.githubusercontent.com/u/5558419?v=4",
"profile": "https://sarahlrstevens.info",
"contributions": [
"design"
]
},
{
"login": "lokamani",
"name": "lokamani",
"avatar_url": "https://avatars.githubusercontent.com/u/64150921?v=4",
"profile": "https://github.com/lokamani",
"contributions": [
"content"
]
},
{
"login": "lucaferranti",
"name": "Luca Ferranti",
"avatar_url": "https://avatars.githubusercontent.com/u/49938764?v=4",
"profile": "https://github.com/lucaferranti",
"contributions": [
"content"
]
},
{
"login": "fmichonneau",
"name": "François Michonneau",
"avatar_url": "https://avatars.githubusercontent.com/u/5502922?v=4",
"profile": "https://francoismichonneau.net/",
"contributions": [
"infra"
]
},
{
"login": "amanmdesai",
"name": "Aman Desai",
"avatar_url": "https://avatars.githubusercontent.com/u/98302868?v=4",
"profile": "https://github.com/amanmdesai",
"contributions": [
"userTesting"
]
},
{
"login": "giordano",
"name": "Mosè Giordano",
"avatar_url": "https://avatars.githubusercontent.com/u/765740?v=4",
"profile": "https://giordano.github.io",
"contributions": [
"userTesting"
]
},
{
"login": "tobyhodges",
"name": "Toby Hodges",
"avatar_url": "https://avatars.githubusercontent.com/u/9694524?v=4",
"profile": "https://tbyhdgs.info",
"contributions": [
"infra"
]
}
]
Expand Down
10 changes: 5 additions & 5 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,9 +94,9 @@ 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 Pacakge Cache (update-cache.yaml)
### 03 Maintain: Update Package Cache (update-cache.yaml)

For lessons that have generated content, we use {renv} to ensure that the output
is stable. This is controlled by a single lockfile which documents the packages
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
1 change: 1 addition & 0 deletions .github/workflows/pr-receive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ jobs:
with:
name: pr
path: ${{ env.PR }}
overwrite: true

- name: "Upload Diff"
uses: actions/upload-artifact@v4
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.11.12
0.16.7
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,25 @@ Current maintainers of this lesson are
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/amanmdesai"><img src="https://avatars.githubusercontent.com/u/98302868?v=4?s=100" width="100px;" alt="Aman Desai"/><br /><sub><b>Aman Desai</b></sub></a><br /><a href="#userTesting-amanmdesai" title="User Testing">📓</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/fmarotta"><img src="https://avatars.githubusercontent.com/u/26001460?v=4?s=100" width="100px;" alt="Federico Marotta"/><br /><sub><b>Federico Marotta</b></sub></a><br /><a href="#content-fmarotta" title="Content">🖋</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://gus-pendleton.github.io/"><img src="https://avatars.githubusercontent.com/u/56881090?v=4?s=100" width="100px;" alt="Gus Pendleton"/><br /><sub><b>Gus Pendleton</b></sub></a><br /><a href="#content-gus-pendleton" title="Content">🖋</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://francoismichonneau.net/"><img src="https://avatars.githubusercontent.com/u/5502922?v=4?s=100" width="100px;" alt="François Michonneau"/><br /><sub><b>François Michonneau</b></sub></a><br /><a href="#infra-fmichonneau" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://blog.bonham.ch"><img src="https://avatars.githubusercontent.com/u/3502975?v=4?s=100" width="100px;" alt="Kevin Bonham"/><br /><sub><b>Kevin Bonham</b></sub></a><br /><a href="#review-kescobo" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/fiveop"><img src="https://avatars.githubusercontent.com/u/65829?v=4?s=100" width="100px;" alt="Philipp Matthias Schäfer"/><br /><sub><b>Philipp Matthias Schäfer</b></sub></a><br /><a href="#content-fiveop" title="Content">🖋</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ocaisa"><img src="https://avatars.githubusercontent.com/u/3840437?v=4?s=100" width="100px;" alt="ocaisa"/><br /><sub><b>ocaisa</b></sub></a><br /><a href="#infra-ocaisa" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://michaelc-m.com"><img src="https://avatars.githubusercontent.com/u/15881370?v=4?s=100" width="100px;" alt="Michael Culshaw-Maurer"/><br /><sub><b>Michael Culshaw-Maurer</b></sub></a><br /><a href="#content-MCMaurer" title="Content">🖋</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Myrkwid"><img src="https://avatars.githubusercontent.com/u/102226458?v=4?s=100" width="100px;" alt="Myrkwid"/><br /><sub><b>Myrkwid</b></sub></a><br /><a href="#code-Myrkwid" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://sarahlrstevens.info"><img src="https://avatars.githubusercontent.com/u/5558419?v=4?s=100" width="100px;" alt="Sarah Stevens"/><br /><sub><b>Sarah Stevens</b></sub></a><br /><a href="#design-sstevens2" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lokamani"><img src="https://avatars.githubusercontent.com/u/64150921?v=4?s=100" width="100px;" alt="lokamani"/><br /><sub><b>lokamani</b></sub></a><br /><a href="#content-lokamani" title="Content">🖋</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lucaferranti"><img src="https://avatars.githubusercontent.com/u/49938764?v=4?s=100" width="100px;" alt="Luca Ferranti"/><br /><sub><b>Luca Ferranti</b></sub></a><br /><a href="#content-lucaferranti" title="Content">🖋</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://giordano.github.io"><img src="https://avatars.githubusercontent.com/u/765740?v=4?s=100" width="100px;" alt="Mosè Giordano"/><br /><sub><b>Mosè Giordano</b></sub></a><br /><a href="#userTesting-giordano" title="User Testing">📓</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://tbyhdgs.info"><img src="https://avatars.githubusercontent.com/u/9694524?v=4?s=100" width="100px;" alt="Toby Hodges"/><br /><sub><b>Toby Hodges</b></sub></a><br /><a href="#infra-tobyhodges" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://www.trevorkeller.com"><img src="https://avatars.githubusercontent.com/u/2179347?v=4?s=100" width="100px;" alt="Trevor Keller"/><br /><sub><b>Trevor Keller</b></sub></a><br /><a href="#content-tkphd" title="Content">🖋</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://snotskie.com/bio"><img src="https://avatars.githubusercontent.com/u/2658495?v=4?s=100" width="100px;" alt="snotskie"/><br /><sub><b>snotskie</b></sub></a><br /><a href="#ideas-snotskie" title="Ideas, Planning, & Feedback">🤔</a></td>
</tr>
</tbody>
Expand Down
86 changes: 85 additions & 1 deletion episodes/02_Getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,28 @@ help?> ∂
Great! This way she can easily look up the names she needs.
She gets back to normal mode by pressing <kbd>backspace</kbd>.

:::::: challenge

## Exploring Julia's Help Mode

Help mode can also be used to look up the documentation for Julia functions.
Use Julia's help mode to read the documentation for the `varinfo()` function.

:::::: solution

## Solution


::::::

If you are not already in help mode, type `?` to enter it. Then write `varinfo` and press enter.

```julia
?varinfo
```

::::::

Another useful mode is the *shell mode* that can be
entered by pressing <kbd>;</kbd>. The prompt has now changed:

Expand All @@ -167,7 +189,69 @@ Like before, hit <kbd>backspace</kbd> to get back to the Julia prompt.

:::::: challenge

## Hello, `shell>` !
## Hello, `shell>` (`pwd` and `cd`) !

Two commonly used shell commands are `pwd` (**p**rint **w**orking **d**irectory) and `cd` (**c**hange **d**irectory).

1. Use `pwd` to find out what is your current working directory.
2. Type the command `cd` in shell mode, which by default will bring you to your "home directory".
3. Use `pwd` again. Did you get a different result from before? Why or why not?

:::::: solution

## Solution

```julia
shell> pwd
```

```julia
shell> cd
```

```julia
shell> pwd
```

::::::

The working directory is the location from which you launched Julia.
To navigate to a different directory, you can use the `cd` command by entering: `cd <directory>`. By default, this command will return you to your home directory if a specific directory is not given.
If you initially launched Julia from your home directory, the working directory remains unchanged, so the output of the second `pwd` command will be identical to the first.
Conversely, if you were in a different directory when you started Julia, the results of the two `pwd` commands will differ.
You can use `cd -` to go back to your previous location.

::::::

:::::: challenge

## Hello, `shell>` (`ls`)!

Another useful shell command is `ls` (*list files*).
Use it to show the contents of your home directory.

:::::: solution

## Solution

```julia
shell> cd
```

```julia
shell> ls
```

::::::

The first `cd` command will bring you to your home directory.
`ls` will print a list of the files and directorys in your current location.

::::::

:::::: challenge

## Hello, `shell>` (`nano` and `cat`)!

Use the shell mode to create a file called `hello.jl` with the nano terminal text editor.
Inside that file write the simple hello world program `print("Hello World!")`.
Expand Down
2 changes: 1 addition & 1 deletion episodes/04_Using_the_package_manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ environment.
````
Status `~/projects/trebuchet/Project.toml`
[f6369f11] ForwardDiff v0.10.38
[295af30f] Revise v3.6.2
[295af30f] Revise v3.6.3
[98b73d46] Trebuchet v0.2.2
````
Expand Down
30 changes: 15 additions & 15 deletions episodes/07_Loops.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ Trebuchet( rand() * 500, rand() * pi/2 )

````output
2-element Trebuchet:
301.45863866265444
0.5147801124901857
228.38576259167743
1.0428133782844782
````

will give her a Trebuchet with a weight between 0 and 500 and a release angle between 0 and pi/2 radians at random.
Expand All @@ -121,9 +121,9 @@ distances = [shoot_distance(Trebuchet(rand() * 500, rand() * pi / 2), env) for _

````output
3-element Vector{Float64}:
107.31486215571258
116.5961233156913
3.006112235174449
75.81435701587722
83.01842049268829
67.14411448705451
````

This is called an _array comprehension_.
Expand All @@ -138,16 +138,16 @@ distances = [(w,a) => shoot_distance(Trebuchet(w, a), env) for (w, a) in zip(wei

````output
10-element Vector{Pair{Tuple{Float64, Float64}, Float64}}:
(316.3006668666567, 0.2763285950708336) => 101.94306047739477
(184.81067380921974, 0.21663020097625554) => 87.01600131363767
(118.28342636599143, 0.16251023948500737) => 71.41041926553547
(495.4627412106457, 0.2337213045007839) => 100.84254397856022
(121.54718006057836, 1.2933538749770221) => 44.31450096256152
(50.49083319279707, 1.3999293689100087) => 18.58057814648708
(463.0506320312314, 0.32643937336190937) => 108.22484752113716
(296.1556297915833, 0.035353940515857406) => 62.1859221237384
(134.340007097649, 1.2511802453356395) => 51.71612933008983
(493.7526856775179, 0.5068383250394274) => 118.81200975980546
(3.3334597480246253, 0.7838682352298685) => 0.6815707596179541
(210.78228935379622, 1.381946534840864) => 35.85286633327975
(401.5993709331619, 0.2185755446723246) => 96.9029165112703
(174.8500444474639, 1.3802675063026215) => 34.83498096430634
(459.5195474131575, 0.6388081196321991) => 117.62925382680423
(325.9792258612826, 1.4742042308383514) => 23.118879918525415
(424.04535348026496, 0.13367159006587603) => 84.32898973441384
(367.203106692998, 0.6088354356429886) => 117.46105246416498
(12.984772128024124, 1.5235451260228559) => 0.6815707596179541
(10.485349585032166, 0.6353974863672037) => 0.6815707596179541
````

### Gradient descent
Expand Down
2 changes: 1 addition & 1 deletion episodes/10_Adding_tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ end
````

````output
Test.DefaultTestSet("Test arithmetic equalities", Any[], 1, false, false, true, 1.731584626736792e9, 1.731584626767338e9, false)
Test.DefaultTestSet("Test arithmetic equalities", Any[], 1, false, false, true, 1.731669987513481e9, 1.731669987543832e9, false)
````

With this Melissa can run her test using the pkg mode of the REPL:
Expand Down

0 comments on commit fc072bd

Please sign in to comment.