hwmgr : homework manager for github classroom

Setup GitHub

  1. Get a personal access token.
  2. Select repo and admin:org scopes.
  3. In ~/.Renviron file, add a line as below. If you don't know what ~ means, type path.expand("~") on the R console.
GITHUB_PAT = "thelongsequenceofalphanumericcharacters"
  1. Create an organization for the course.
  2. There seems to be no API for individual users.
  3. You may want to request a discount to create private repositories. This takes time.

Install hwmgr

  1. Install devtools if you haven't done this yet.
  1. Install hwmgr package by


  1. Make a course directory my_course and (optionally) make it an RStudio Project. Go to the R console and set that directory as the working directory by setwd("/path/to/my_course") or simply double clicking my_couse.Rpfoj to open RStudio.
  2. Do this in the console:

Configuration options will be collected through interactive dialogues. This command creates the following directory structure by default.

├── assignments/
├── collected/
├── config.yml
├── solutions/
└── templates/
    └── blank/

Create an assignment with hwmgr

  1. Create an assignment by

Configuration options will be collected through interactive dialogues. 2. assignments/homework-code-name is now a git repository, whose origin is set to a newly created org/homework-code-name repository. 3. Edit template, add, commit, and push.

Distribute the assignment with GitHub Classroom.

  1. Go to GitHub Classroom website.
  2. Click "New classroom"
  3. If you see the organization, click it. Otherwise, click the "grant us access" link.
  4. ...
  5. Choose the repository you've pushed in the previous section as the starter code.
  6. ...

Follow the instruction.

kenjisato/hwmgr documentation built on May 18, 2017, 6:40 p.m.