Skip to content

git-mastery/git-autograder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-autograder

Git Autograder used for Git Mastery exercise solutions.

Installation

pip install git-autograder

Usage

GitAutograderRepo initializes and reads the submission repository. It contains critical information for autograding such as the start commit (denoted by git-mastery-start-<first commit short hash>) and user's commits.

For basic usage, you can either initialize the GitAutograderRepo by declaring it as a variable:

from git_autograder.repo import GitAutograderRepo

def grade():
  repo = GitAutograderRepo()
  ...

Or by decorating the grading function with @autograder() where the GitAutograderRepo initialization is handled by the decorator:

from git_autograder.autograder import autograder

@autograder()
def grade(repo: GitAutograderRepo):
  ...

GitAutograderDiffHelper is a wrapper around the git diff between commits:

from git_autograder.diff import GitAutograderDiffHelper

GitAutograderDiffHelper(commit_a, commit_b)

Unit tests

To execute the unit tests, run python -m pytest -s -vv.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages