Skip to main content

Library for autograding Git repositories

Project description

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.

Project details


Release history Release notifications | RSS feed

This version

2.3.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git_autograder-2.3.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_autograder-2.3.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file git_autograder-2.3.0.tar.gz.

File metadata

  • Download URL: git_autograder-2.3.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for git_autograder-2.3.0.tar.gz
Algorithm Hash digest
SHA256 aca5e6276ad765561bcb234de2f63d4f96d31a01bae031cba8d5c37cc5ba8c70
MD5 4969a6cde719338611f8f676e0f38af8
BLAKE2b-256 d0ec7a3d36310cc693a9f9ab0d804c148e5ae78ee67e71df4d7d2f26a719be67

See more details on using hashes here.

File details

Details for the file git_autograder-2.3.0-py3-none-any.whl.

File metadata

  • Download URL: git_autograder-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for git_autograder-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71ef31ed3cdee4b2847bc1e84e6a57063eea81be2508eb0219b9fce98b8c59c1
MD5 6ff54949ad44aa04ed0250adc8ee2097
BLAKE2b-256 dfd674783ae015b25b3115feafc647164379df52e303ca0c2c6e9d157f1b1d65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page