Skip to contents

A minimal GitHub Classroom replacement in R. Run a course on GitHub without GitHub Classroom: each student gets a private repo in a given organization, starter files get pushed in, and the student is added as a collaborator.

Install

# install.packages("remotes")
remotes::install_github("datadiversitylab/classR")

How to use

library(classR)

setup_github_token() # once: makes, checks, and saves a token
set_org("ISTA421INFO521") # each session

res <- assign_homework("roster.csv", "hw1_files", prefix = "hw1")
check_homework("roster.csv", prefix = "hw1")
update_homework("roster.csv", "hw1_fixes", prefix = "hw1")
collect_homework("roster.csv", prefix = "hw1", dest = "submissions")

Your roster is a CSV with a column named handle:

student1
student2
student3

What each function does

Limitations

  • The organization must already exist.
  • Files are pushed through the contents API, one file per commit.
  • update_homework() overwrites files at the given paths.
  • Collecting needs git on the system.
  • Adding a collaborator sends an invitation the student must accept before they can push.