Skip to content
Aaron edited this page Feb 9, 2018 · 4 revisions

Wiki Home - GitHub Course Assignment

Prerequisites

  1. A GitHub organisation account.
  2. An API token (either from the organisation account or one with read/write permissions to the organisation).
  3. Clone the repository and install the required libraries listed in requirements.txt

Setup

Step 1: Alter the configuration JSON

Each course is managed through a JSON file located in the /config directory of this project. A sample JSON is included with the project.

{
  "url": "https://github.com/Example-Org",
  "github_api_token": "YOUR_API_TOKEN",
  "org": "Example-Org",
  "org_username": "exampleorg",
  "name": "Name of Organisation",
  "prefix": "TEST1000_2018_S1",
  "team_instructors": "instructors",
  "team_students": "students",
  "repo_instructors": "instructors",
  "repo_instructors_path_config": "config",
  "repo_update_branch": "instructor_updates"
}
  • url: The URL to the organisation.
  • github_api_token: The API token generated in the prerequisites section.
  • org: The name of the organisation (used in notifications).
  • org_username: The account name of the organisation, like that in the URL.
  • name: The name of the organisation (used in notifications).
  • prefix: The unique identifier for this course offering, all teams and repositories will take this as a prefix.
  • team_instructors: The team name for the instructors.
  • team_students: The team name for the students.
  • repo_instructors: The repository name for the instructors.
  • repo_instructors_path_config: The path to the configuration directory stored in the instructors repository.
  • repo_update_branch: The name of the branch used for pushing assignment changes.

Step 2: Launch the admin_course.ipynb file.

Follow the instructions in the file to setup the base objects.

Step 3: Launch the admin_assessment.ipynb file.

Follow the instructions in the file to control assessment objects.

Notes

Execution

All administration methods are contained within the GitHubLink class. To reduce the amount of API calls to GitHub the package needs to only be initialised once as shown below. This is handled in the Jupyter Notebooks.

from ghca.gitlink import GitHubLink
ghl = GitHubLink('config/TEST000_2018_S1.json')

Note that only one instance of the GitHubLink should be used to modify objects as objects can become desynchronised.