Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A grading framework for evaluating programming assignments

Project description

Grader

PyPi Build Status

This program uses Docker and Python to easily grade many assignments in an encapsulated, safe manner. The general process starts by creating an image for a class or an assignment. That image can be given a payload, a protected grading script, which has a grading hooks. The grade module, when ran, creates an individual container for each student's assignment and runs a payload hook. The payload then returns a JSON response with stdin, stdout, and additional response information depending on the image ran.

Getting Started

See the tutorial for an idea of how to get started using grader.

Setup

This project is setup using buildout. It's super easy to get grader up and running:

You'll probably need the following libraries...

  • build-essential
  • libncurses-dev
  • python3-dev

And, of course, you'll want Docker if you plan to do anything interesting at all. Grader requires docker with API version >= 1.20. We use put_archive (PUT /containers/(id)/archive) from docker-py.

# Bootstrap buildout
python3 bin/bootstrap-buildout.py

# Setup your development environment with buildout
bin/buildout

Now you're done! When it sets up your environment, buildout creates a couple of executables and places them in bin/ for you. They are:

  • buildout : That's buildout. Run it whenever you add eggs to grader/setup.py or modify buildout.cfg
  • grader : That's grader!
  • python : "What? Another Python!?" Yeah... This is an ipython interpreter. It's handy because it has access to all the same packages that were installed for grader.

Check your style

It's important to keep our code looking consistent. There's a tool installed by buildout called flake8 that will check your Python source for issues in style. Simply run it like this:

  # Make sure you run this in your grader directory. flake8 will recursively check source files for style issues.
  bin/flake8 grader/

Project details


Release history Release notifications

Download files

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

Files for redkyn-grader, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size redkyn_grader-0.1.0-py3-none-any.whl (6.2 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size redkyn-grader-0.1.0.tar.gz (27.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page