Version Control#

class GenerateHandler(*args, **kwargs)[source]#

Tornado Handler class for http requests to /lectures/{lecture_id}/assignments/{assignment_id}/generate.

async put(lecture_id: int, assignment_id: int)[source]#

Generates the release files from the source files of a assignment

Parameters
  • lecture_id (int) – id of the lecture

  • assignment_id (int) – id of the assignment

class GitLogHandler(*args, **kwargs)[source]#

Tornado Handler class for http requests to /lectures/{lecture_id}/assignments/{assignment_id}/log/{repo}.

async get(lecture_id: int, assignment_id: int, repo: str)[source]#

Sends a GET request to the grader service to get the logs of a given repo.

Parameters
  • lecture_id – id of the lecture

  • assignment_id – id of the assignment

  • repo – repo name

Returns

logs of git repo

class GitRemoteStatusHandler(*args, **kwargs)[source]#

Tornado Handler class for http requests to /lectures/{lecture_id}/assignments/{assignment_id}/remote_status/{repo}.

async get(lecture_id: int, assignment_id: int, repo: str)[source]#
class NotebookAccessHandler(*args, **kwargs)[source]#

Tornado Handler class for http requests to /lectures/{lecture_id}/assignments/{assignment_id}/{notebook_name}.

async get(lecture_id: int, assignment_id: int, notebook_name: str)[source]#

Sends a GET request to the grader service to access notebook and redirect to it. :param lecture_id: id of the lecture :param assignment_id: id of the assignment :param notebook_name: notebook name :return: void

class PullHandler(*args, **kwargs)[source]#

Tornado Handler class for http requests to /lectures/{lecture_id}/assignments/{assignment_id}/pull/{repo}.

async get(lecture_id: int, assignment_id: int, repo: str)[source]#

Creates a local repository and pulls the specified repo type

Parameters
  • lecture_id (int) – id of the lecture

  • assignment_id (int) – id of the assignment

  • repo (str) – type of the repository

class PushHandler(*args, **kwargs)[source]#

Tornado Handler class for http requests to /lectures/{lecture_id}/assignments/{assignment_id}/push/{repo}.

async put(lecture_id: int, assignment_id: int, repo: str)[source]#
Pushes from the local repositories to remote

If the repo type is release, it also generate the release files and updates the assignment properties in the grader service

Parameters
  • lecture_id (int) – id of the lecture

  • assignment_id (int) – id of the assignment

  • repo (str) – type of the repository

class ResetHandler(*args, **kwargs)[source]#

Tornado Handler class for http requests to /lectures/{lecture_id}/assignments/{assignment_id}/reset.

async get(lecture_id: int, assignment_id: int)[source]#

Sends a GET request to the grader service that resets the user repo.

Parameters
  • lecture_id – id of the lecture

  • assignment_id – id of the assignment

Returns

void