Uses diff command to compare expected output with student's submission output

Overview

AUTOGRADER for GRADESCOPE using diff with partial grading

Description:

Uses diff command to compare expected output with student's submission output

Utilizes partial grading for each test case

Steps for setup:

  1. Preffered start would be to have the solution to the project
  • Redirected input for the projects is assumed - Example: when run from command line: ./a.out < input1.txt
  • input1.txt consists of the input to the program
  1. These test cases are your input files that are stored in the /tests folder
  • Come up with as many test cases as you may want
  • These are to be saved in the format - input1.txt, input2.txt...
  1. For each of the specific test cases, generate the corresponding output files
  • These are to be saved in the format - output1.txt, output2.txt...
  • These are the expected output files to be tested against
  • Stored in the /tests folder
  1. makefile:
  • This is the script that compiles the uploaded cpp file and generates the executable file (exe)
  • The students MUST upload their submissions with the name 'project_test.cpp'
  1. test.bats:
  • You see test cases starting with @test
  • diff_files() is a function where the comparison happens
  • Various options for the diff command can be added here
  • For more info please do 'man diff'
  • variable 'numLines' is the number of lines in the expected output
  • variable 'testCasePoints' is the number of points for each test case (should match the number in weights.txt)
  • If each test cases has different number of lines or worth different points, these above two variables can be declared locally in each test case
  • compiletest: tests if program compiles
  • test1/2/3:
    • runs the exe with redirected input file and stores temperory ouput in testOutput.txt
    • run diff_files calls the diff_files() function with the two parameters (student's output and the expected output)
    • If the outputs do not match:
      • the for loop prints the comparison with the mismatched lines
      • the variable score calculates the partial credit for the test case
      • the \x1F is a unique character that gets parsed by the autograder.py file
  • testclean: makes sure the exe gets cleaned properly
  1. weights.txt: This file holds the breakdown of points for each test case
  2. run_autograder:
  • No changes here
  • This is the master shell script file that runs everything
  1. requirements.txt and setup.sh:
  • No changes here
  1. autograder.py:
  • main python file that grades and assigns points to give it to GradeScope for displaying
  1. The solution program need not be uploaded

Steps to configuring GradeScope:

  1. Go to your course's assignments page
  2. Click on 'Create Assignment' and select 'Programming Assignment'
  3. Fill out the information in the next page and create the assignment
  4. Once created, in the 'Configure AutoGrader' tab on the left:
  • Upload a zip file of all the files from the setup
  • The files need to be zipped directly and should not be one level deep inside a folder
  1. After uploading, click on 'Update Autograder'
  • This might take a couple of mins

You can test the autograder by uploading your solution. You can debug each student's submission by using the debug via ssh button in each student's submission page

Acknowlegments:

  • Aditya Narasimhan
  • Gregory Madra
  • Sanjana Mudduluru
  • Sudhindra Gopal Krishna
  • Monique Shotande

Reference:

https://bats-core.readthedocs.io/en/stable/tutorial.html

Copyright © 2022 adinaras

A curated list of awesome mathematics resources

A curated list of awesome mathematics resources

Cyrille Rossant 6.7k Jan 05, 2023
AiiDA plugin for the HyperQueue metascheduler.

aiida-hyperqueue WARNING: This plugin is still in heavy development. Expect bugs to pop up and the API to change. AiiDA plugin for the HyperQueue meta

AiiDA team 3 Jun 19, 2022
Generate modern Python clients from OpenAPI

openapi-python-client Generate modern Python clients from OpenAPI 3.x documents. This generator does not support OpenAPI 2.x FKA Swagger. If you need

555 Jan 02, 2023
Course Materials for Math 340

UBC Math 340 Materials This repository aims to be the one repository for which you can find everything you about Math 340. Lecture Notes Lecture Notes

2 Nov 25, 2021
Loudchecker - Python script to check files for earrape

loudchecker python script to check files for earrape automatically installs depe

1 Jan 22, 2022
Variable Transformer Calculator

✠ VASCO - VAriable tranSformer CalculatOr Software que calcula informações de transformadores feita para a matéria de "Conversão Eletromecânica de Ene

Arthur Cordeiro Andrade 2 Feb 12, 2022
An interview engine for businesses, interview those who are actually qualified and are worth your time!

easyInterview V0.8B An interview engine for businesses, interview those who are actually qualified and are worth your time! Quick Overview You/the com

Vatsal Shukla 1 Nov 19, 2021
xeuledoc - Fetch information about a public Google document.

xeuledoc - Fetch information about a public Google document.

Malfrats Industries 651 Dec 27, 2022
Fully reproducible, Dockerized, step-by-step, tutorial on how to mock a "real-time" Kafka data stream from a timestamped csv file. Detailed blog post published on Towards Data Science.

time-series-kafka-demo Mock stream producer for time series data using Kafka. I walk through this tutorial and others here on GitHub and on my Medium

Maria Patterson 26 Nov 15, 2022
💻An open-source eBook with 101 Linux commands that everyone should know

This is an open-source eBook with 101 Linux commands that everyone should know. No matter if you are a DevOps/SysOps engineer, developer, or just a Linux enthusiast, you will most likely have to use

Ashfaque Ahmed 0 Oct 29, 2022
step by step guide for beginners for getting started with open source

Step-by-Step Guide for beginners for getting started with Open-Source Here The Contribution Begins 💻 If you are a beginner then this repository is fo

Arpit Jain 66 Jan 03, 2023
💡 Catatan Materi Bahasa Pemrogramman Python

Repository catatan kuliah Andika Tulus Pangestu selama belajar Dasar Pemrograman dengan Python.

0 Oct 10, 2021
Generates, filters, parses, and cleans data regarding the financial disclosures of judges in the American Judicial System

This repository contains code that gets data regarding financial disclosures from the Court Listener API main.py: contains driver code that interacts

Ali Rastegar 2 Aug 06, 2022
Word document generator with python

In this study, real world data is anonymized. The content is completely different, but the structure is the same. It was a script I prepared for the backend of a work using UiPath.

Ezgi Turalı 3 Jan 30, 2022
Data-science-on-gcp - Source code accompanying book: Data Science on the Google Cloud Platform, Valliappa Lakshmanan, O'Reilly 2017

data-science-on-gcp Source code accompanying book: Data Science on the Google Cloud Platform, 2nd Edition Valliappa Lakshmanan O'Reilly, Jan 2022 Bran

Google Cloud Platform 1.2k Dec 28, 2022
[Unofficial] Python PEP in EPUB format

PEPs in EPUB format This is a unofficial repository where I stock all valid PEPs in the EPUB format. Repository Cloning git clone --recursive Mickaël Schoentgen 9 Oct 12, 2022

Main repository for the Sphinx documentation builder

Sphinx Sphinx is a tool that makes it easy to create intelligent and beautiful documentation for Python projects (or other documents consisting of mul

5.1k Jan 04, 2023
Python bindings to OpenSlide

OpenSlide Python OpenSlide Python is a Python interface to the OpenSlide library. OpenSlide is a C library that provides a simple interface for readin

OpenSlide 297 Dec 21, 2022
Legacy python processor for AsciiDoc

AsciiDoc.py This branch is tracking the alpha, in-progress 10.x release. For the stable 9.x code, please go to the 9.x branch! AsciiDoc is a text docu

AsciiDoc.py 178 Dec 25, 2022
A comprehensive and FREE Online Python Development tutorial going step-by-step into the world of Python.

FREE Reverse Engineering Self-Study Course HERE Fundamental Python The book and code repo for the FREE Fundamental Python book by Kevin Thomas. FREE B

Kevin Thomas 7 Mar 19, 2022