Giter VIP home page Giter VIP logo

check-assignments's Introduction

check-assignments

A tool for checking programming assignments. Currently supports checking assignments in Java, Python and Haskell.

Prerequisites

General

Language-specific

Java

Python

Installation

Copy the file check-assignments (Linux, Mac) or check-assignments.bat to some place in the path. Then edit the copied file and adjust the variables in the file to match the paths on your local machine. Now you should be able to execute check-assignments in your shell.

Usage

check-assignments has several commands. Simple invoke check-assignments --help to get an overview. To see details for a command CMD, invoke check-assignments CMD --help.

The directory layout for checking submissions for some assignments looks like this:

check.yml         (configuration file)
build.gradle      (optional, only required for java)
tests/            (contains test files supplied by the teaching staff)
rating.xlsx       (optional)
STUDENT_1/
...
STUDENT_n/

STUDENT_1 ... STUDENT_n contain the students' submissions, rating.xlsx is a spreadsheet for recording credits for the individual assignments (optional). If you download submission from moodle, then the import command can be used to generate rating.xlsx

You must invoked all commands from within the top-level directory of the submissions.

The workflow of checking the submissions is triggered by invoking check-assignments runTests --interactive. The tool then iterates through all submission and runs the tests for each assignment, pausing after each exercise so that you can inspect the source code and records the credits for the exercise.

Configuration

The assignments are configured in the file check.yml. See test-data/submissions/check.yml for an example.

Top-level keys

  • test-dir: directory for test files, default to tests inside the root directory.
  • assignments: Under the assignments key each assignment is listed with its number. The keys for individual assignments are listed in the subsection "assignment specific keys".

Assignment specific keys

For each assignment, you have the following options available.

  • points: the number of points for the assignment.
  • kind: the programming language in which the solution is expected.

Keys for kind: "java"

  • test-filter: a package name with wildcards. The value of this key can be used as ${testFilter} in the build.gradle file.

Keys for kind: "python"

  • main-file: the main file the student is expected to submit
  • test-file: file inside tests with tests provided by the teaching staff.

Value lookup

Note: you can also place assignment-specific key-value pairs at the top-level. The values than act as a default to the key.

Checking Java code

Running tests for Java code are executed using gradle. Your top-level directory must contain a build.gradle file. See test-data/submissions/build.gradle for an example. You can use the following properties (using the ${PROP_NAME} notation) in your build.gradle file:

  • testFilter: for running tests in only certain packages. The value of this property is set via the test-filter key in check.yml.
  • studentDir: directory of the students code
  • testDir: directory of the test code

Checking Python code

Python code is check via write-your-python-program (WYPP, see https://github.com/skogsbaer/write-your-python-program) You can supply your tests either via WYPP's check function or you can write regular unittests. See test-data/submissions/tests/Test-01.py for an example.

check-assignments's People

Contributors

skogsbaer 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.