Skip to content

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

14 Commits

Folders and files

Repository files navigation

Overview

This repository contains scripts which may be useful for courses which use GitHub Classroom for assignment submission. This is especially true for courses which use assignment series, where one assignment builds on the previous. It was originally developed for use in University of Colorado course ECEN 5823.

Running on Windows

Ensure you have Python 3 installed and in your PATH or run with the full path to the python 3 interpreter. Execute using

python ./github-classroom-scripts/pr-setup.py

or subtitute the python command with the path to your Python 3 interpreter. If you need to support multiple python environments you may also consider anaconda or virtualenv

Using These Scripts

  1. Add this repository as a git submodule on a parent repository used by instructors/student assistants for assignment grading. This would typically be a private repository which contains completed assignments for reference by instructors and teaching assistants.
  2. Add a scripts_config/classroom_roster.csv file in the parent repository containing the list of students exported from the Roster Mangement->Download section of your GitHub classroom, where the scripts_config folder is at the same directory as the github-classroom-scripts submodule folder. You may need to prune this to remove teaching assistants and yourself from the list, as well as any students who haven't actually submitted an assignment (perhaps dropped the course). Make sure you check this into a private repository to avoid sharing student information publicly.
  3. Setup your assignment and GithubClassroom using a scripts_config/assignconfig.txt file. An example config file is provided in the assignconfig_example.txt file.
  4. Run pip3 install -r requirements.txt to install requirements in your python3 environment
  5. Run the scripts from the base directory using ./github-classroom-scripts/scriptname.py or python ./github-classroom-scripts/scriptname.py where python refers to a python 3 interpreter in your PATH. You need to run from the base directory containing your scripts_config folder and not this folder, so the script can find the roster file and assignconfig.txt file, also so the git commands will work on the appropriate repository.

See sections below for individual script details.

SSH Agent

To avoid the need to re-enter credentials, use this script with an ssh agent and your authorized key

eval `ssh-agent`
ssh-add /path/to/key

prsetup.py

This script works with an assignment series where assignments start with a base set of code and then build on each other throughout the semester. It sets up pull request in each student's repository which allow you to easily compare the changes made between the previous/current assignments. This pull request will not actually be merged, but will be a place where instructors and student assistants can add code review comments which students can see and respond to.

The script creates:

  • A remote named student_assignmentnumber_remote pointing to the student's submission repository.
  • A local branch named student_assignmentnumber_submission containing the content of the student's assignment submission.
  • Remote branches in the student's repository with the same branch names above, containing the current and previous submission or, in the case that this is the first assignment, the difference between the current submission and the assignment used as the base submission.

The script also opens a page which compares the current and previous submission branches. Clicking the "Create PR" button on this page creates a pull request.

Start by editing the variables at the top of the script to point to your github classroom page and assignments.

Run the script with no arguments for usage instructions.

Typically the first person on the team who runs this script would run:

./github-classroom-scripts/prsetup.py --create_local --push_remote

To both create local repositories to track student assignments as well as update remote branches on github. This person would also use the opened PR pages to create pull requests.

The next people on the team would run

./github-classroom-scripts/prsetup.py --create_local

To create their local repositories, and the script would open browser pages to each pull request.

If you've already created the local repositories and remote repositories for a given assignment and just want to open pull request pages, run with no command arguments.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages