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.
Figure 2: Flowchart of assignment process.
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.
Figure 3: The more you read Happy Git with R, the better your life will be.
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.
Figure 4: Accept the assignment to create a different repository for every assignment.
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 cloned) and save the repo (commit + push) more deliberately.
Figure 5: Clink on the link to your assignment repository to get started.
Clone or download button and copy the URL.
Figure 6: Copy the HTTPS URL, and use it to create a new project in RStudio.
All of the GitHub interaction will take place through the RStudio IDE. The two important steps for getting the assignment back to GitHub are:
pullIf 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.)
Figure 7: Always pull before you start. pull-work-save-commit-push
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.
Figure 8: Always pull before you start. pull-work-knit-commit-push
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.).
Figure 9: pull-work-knit-commit-push
push your work to GitHubIt is good practice to use meaningful commit messages to help your future self figure out your past work.
Figure 10: pull-work-knit-commit-push
To make sure that the work went through, always check your GitHub repo online to confirm any changes you made.
Figure 11: Check that your changes are correct.
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 ...".