diff --git a/.all-contributorsrc b/.all-contributorsrc index 9625cb4f..fc6a397e 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -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" ] } ] diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 101967e4..7076ddd9 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/pr-receive.yaml b/.github/workflows/pr-receive.yaml index 2d7d5dbf..0204cc17 100644 --- a/.github/workflows/pr-receive.yaml +++ b/.github/workflows/pr-receive.yaml @@ -111,6 +111,7 @@ jobs: with: name: pr path: ${{ env.PR }} + overwrite: true - name: "Upload Diff" uses: actions/upload-artifact@v4 diff --git a/.github/workflows/sandpaper-version.txt b/.github/workflows/sandpaper-version.txt index bd0119f9..427cda05 100644 --- a/.github/workflows/sandpaper-version.txt +++ b/.github/workflows/sandpaper-version.txt @@ -1 +1 @@ -0.11.12 +0.16.7 diff --git a/README.md b/README.md index 2be06bd1..dc8931c9 100644 --- a/README.md +++ b/README.md @@ -61,9 +61,25 @@ Current maintainers of this lesson are + + + + + + + + + + + + + + + + diff --git a/episodes/02_Getting_started.md b/episodes/02_Getting_started.md index 3a47fe0b..9f939192 100644 --- a/episodes/02_Getting_started.md +++ b/episodes/02_Getting_started.md @@ -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 backspace. +:::::: 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 ;. The prompt has now changed: @@ -167,7 +189,69 @@ Like before, hit backspace 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 `. 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!")`. diff --git a/episodes/04_Using_the_package_manager.md b/episodes/04_Using_the_package_manager.md index d7ea7cd4..e9e685bf 100644 --- a/episodes/04_Using_the_package_manager.md +++ b/episodes/04_Using_the_package_manager.md @@ -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 ```` diff --git a/episodes/07_Loops.md b/episodes/07_Loops.md index 95640009..7235f1cc 100644 --- a/episodes/07_Loops.md +++ b/episodes/07_Loops.md @@ -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. @@ -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_. @@ -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 diff --git a/episodes/10_Adding_tests.md b/episodes/10_Adding_tests.md index 5653620f..f791c0a8 100644 --- a/episodes/10_Adding_tests.md +++ b/episodes/10_Adding_tests.md @@ -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:
Aman Desai
Aman Desai

📓
Federico Marotta
Federico Marotta

🖋
Gus Pendleton
Gus Pendleton

🖋
François Michonneau
François Michonneau

🚇
Kevin Bonham
Kevin Bonham

👀
Philipp Matthias Schäfer
Philipp Matthias Schäfer

🖋
ocaisa
ocaisa

🚇
Michael Culshaw-Maurer
Michael Culshaw-Maurer

🖋
Myrkwid
Myrkwid

💻
Sarah Stevens
Sarah Stevens

🎨
lokamani
lokamani

🖋
Luca Ferranti
Luca Ferranti

🖋
Mosè Giordano
Mosè Giordano

📓
Toby Hodges
Toby Hodges

🚇
Trevor Keller
Trevor Keller

🖋
snotskie
snotskie

🤔