Huge thanks to Ben Wiedermann at HMC for sharing the following.
In Math 158, we will use GitHub to access and submit assignments (no Gradescope). Here is the basic structure of how it will work:
(4. The grader will then knit your file, if it doesn’t knit, you won’t get credit for it. The grader will grade it and push it back to your GitHub repo. You will find the graded assignment on your own repo.)
The following diagram lays out the process, and the rest of the document provides a more detailed set of instructions.
Most importantly, please become familiar with Happy Git and GitHub with R. Happy Git with R is an incredibly user friendly resource which includes help for almost every single thing that might happen when getting started.
The first step is to install R + RStudio + Git on your machine. (If you are planning to use Pomona’s RStudio server, R + RStudio + Git are all three already installed for you.)
Create an account on GitHub (if you already have one, use it!).
Introduce everyone: R + RStudio (should happen automatically); yourself to GitHub (see https://happygitwithr.com/); RStudio + GitHub (see https://happygitwithr.com/).
Follow the rest of the steps that Jenny Bryan spells out in Happy Git and GitHub with R. Most likely, you only need to work through step 12. Step 15 is detailed below after you have gotten the assignment from GitHub.
Each assignment will be provided as a link to GitHub classroom. Click the link. (The link will come to you via an email from Sakai. If you lose the email, or the email goes to your spam folder, check Sakai messages for the assignment link.)
The first assignment will be an individual assignment. Some other assignments will be paired or group assignments. To accept an individual assignment, click the “Accept this assignment” button.
For all joint assignments, you will need to create a team before you can start.
The assignment files will be copied as a private repository that you (and your partner, if applicable) and the course staff have access to.
We will call this version, that lives on your personal GitHub account the GitHub fork.
Once your repository has been created, you should clone the code to whatever computer you are working on. Just like a Google Doc, you can work on the files from different machines at different times. Unlike a Google Doc, you’ll have to make sure to open the repo (clone
or pull
if you’ve aleady clone
d) and save the repo (commit
+ push
) more deliberately.
Clone or download
button and copy the URL.All of the GitHub interaction will take place through the RStudio IDE. The two important steps for getting the assignment back to GitHub are:
pull
If you are working with a colleague or on different machines it is so incredibly important to get in the habit of immediately clicking on pull
when you start your work. (If you are working alone on a single machine pull
won’t hurt! You’ll just be told that your files are already up to date.)
knit
your workDon’t forget to put your name on the assignment. Also, make sure that you knit to pdf. Knit early and often. The more often you knit, the fewer headaches you will have.
commit
your workYou don’t need to commit every file, but you do need to commit files that are integral to the analysis (always commite .Rmd, .pdf, data files, images that created the pdf, etc.).
push
your work to GitHubIt is good practice to use meaningful commit messages to help your future self figure out your past work.
To make sure that the work went through, always check your GitHub repo online to confirm any changes you made.
Once assignments are completely graded, you will be able to see your grade and assignment feedback on your own GitHub repo. Grades will also be recorded in Sakai.
If you see mistakes or want to suggest changes, please create an issue on the source repository.
Text and figures are licensed under Creative Commons Attribution CC BY 4.0. Source code is available at https://github.com/hardin47/m158-lin-mod, unless otherwise noted. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".