Giter VIP home page Giter VIP logo

go-autograder's Introduction

go-autograder

A template for building Gradescope autograders for Go projects.

Getting started

This autograder works by running all Go tests in a student's submission, parsing the results from stdout, and generating a results.json file in Gradescope's specified format. Only tests that you specify in autograder.config.json are parsed and sent to Gradescope.

When the autograder runs, the student's submission will be copied into /autograder/source/submission. You can make any necessary changes to a student's submission -- such as copying in test suite files -- before the autograder runs by adding shell commands to run_autograder in the indicated area.

File hierarchy

  • autograder.config.json - A JSON file that specifies config options for your autograder suite. Here is where you will define the names of tests and associated point values.
  • setup.sh - A setup (Bash) script that installs all your dependencies. Gradescope uses Docker running on Ubuntu 18.04 images, so you can use apt, or any other means of setting up packages. By default, it simply uses apt-get to install Go.
  • run_autograder - An executable script, in any language (with appropriate #! line), that compiles and runs your autograder suite and produces the output in the correct place.
  • src/test_runner - A Go module containing the code responsible for running go test on a student's submission, parsing the results from stdout, and returning a results.json file in Gradescope's specified format.

autograder.config.json

This JSON file is where you will configure your autograder for your particular assignment. In this file, you must specify the names of the tests you want to use for grading, along with associated point values.

{
    "visibility": "visible", // Optional visibility setting for autograder results: visible, hidden, after_due_date, after_published
    "tests": [
        {
            "name": "TestAddTwoNumbers",  // The name of the test (must match the test name as defined in test files)
            "number": "1.1", // Optional (will just be numbered in order of array if no number given)
            "points": 5, // The point value of the test case
            "visibility": "visible" // Optional visibility setting for test case: visible, hidden, after_due_date, after_published
        },
        {
            "name": "TestAddTwoNegativeNumbers",
            "number": "1.2",
            "points": 5,
            "visibility": "visible"
        },
        {
            "name": "TestAddNums",
            "number": "2.1",
            "points": 5,
            "visibility": "visible"
        },
        {
            "name": "TestAddNumsOne",
            "number": "2.2",
            "points": 5,
            "visibility": "visible"
        }
    ]
}

go-autograder's People

Contributors

nthnluu avatar

Stargazers

 avatar

Watchers

 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.