Giter Club home page Giter Club logo

xqueue-watcher's Introduction

xqueue_watcher

This is an implementation of a polling XQueue client and grader.

Running

python -m xqueue_watcher -d [path to settings directory]

JSON configuration file

{
	"test-123": {
		"SERVER": "http://127.0.0.1:18040",
		"CONNECTIONS": 1,
		"AUTH": ["lms", "lms"],
		"HANDLERS": [
			{
				"HANDLER": "xqueue_watcher.grader.Grader",
				"KWARGS": {
					"grader_root": "/path/to/course/graders/",
				}
			}
		]
	}
}
  • test-123: the name of the queue
  • SERVER: XQueue server address
  • AUTH: list of username, password
  • CONNECTIONS: how many threads to spawn to watch the queue
  • HANDLERS: list of callables that will be called for each queue submission
    • HANDLER: callable name
    • KWARGS: optional keyword arguments to apply during instantiation

xqueue_watcher.grader.Grader

To implement a pull grader:

Subclass xqueue_watcher.grader.Grader and override the grade method. Then add your grader to the config like "handler": "my_module.MyGrader". The arguments for the grade method are: * grader_path: absolute path to the grader defined for the current problem * grader_config: other configuration particular to the problem * student_response: student-supplied code

Sandboxing

To sandbox python, use CodeJail. In your handler configuration, add:

"CODEJAIL": {
	"name": "python",
	"python_bin": "/path/to/sandbox/python",
	"user": "sandbox_username"
}

Then, codejail_python will automatically be added to the kwargs for your handler. You can then import codejail.jail_code and run jail_code("python", code...). You can define multiple sandboxes and use them as in jail_code("special-python", ...)

xqueue-watcher's People

Contributors

cpennington avatar blarghmatey avatar feanil avatar maxrothman avatar adeelkhan avatar jibsheet avatar noraiz-anwar avatar syed-awais-ali avatar macdiesel avatar gsidebo avatar schenedx avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.