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

You might also like...
πŸ† The 1st Place Submission to AICity Challenge 2021 Natural Language-Based Vehicle Retrieval Track (Alibaba-UTS submission)
πŸ† The 1st Place Submission to AICity Challenge 2021 Natural Language-Based Vehicle Retrieval Track (Alibaba-UTS submission)

AI City 2021: Connecting Language and Vision for Natural Language-Based Vehicle Retrieval πŸ† The 1st Place Submission to AICity Challenge 2021 Natural

πŸ† The 1st Place Submission to AICity Challenge 2021 Natural Language-Based Vehicle Retrieval Track (Alibaba-UTS submission)
πŸ† The 1st Place Submission to AICity Challenge 2021 Natural Language-Based Vehicle Retrieval Track (Alibaba-UTS submission)

πŸ† The 1st Place Submission to AICity Challenge 2021 Natural Language-Based Vehicle Retrieval Track (Alibaba-UTS submission)

A python script to run any executable and pass test cases to it's stdin and compare stdout with correct output.

quera_testcase_checker A python script to run any executable and pass test cases to it's stdin and compare stdout with correct output. proper way to u

Official code for
Official code for "End-to-End Optimization of Scene Layout" -- including VAE, Diff Render, SPADE for colorization (CVPR 2020 Oral)

End-to-End Optimization of Scene Layout Code release for: End-to-End Optimization of Scene Layout CVPR 2020 (Oral) Project site, Bibtex For help conta

Narya API allows you track soccer player from camera inputs, and evaluate them with an Expected Discounted Goal (EDG) Agent

Narya The Narya API allows you track soccer player from camera inputs, and evaluate them with an Expected Discounted Goal (EDG) Agent. This repository

CLI based diff viewer
CLI based diff viewer

Rich Diff CLI based diff viewer

Deskew is a command line tool for deskewing scanned text documents. It uses Hough transform to detect "text lines" in the image. As an output, you get an image rotated so that the lines are horizontal.

Deskew by Marek Mauder https://galfar.vevb.net/deskew https://github.com/galfar/deskew v1.30 2019-06-07 Overview Deskew is a command line tool for des

This is 2nd term discrete maths project done by UCU students that uses backtracking to solve various problems.

Backtracking Project Sponsors This is a project made by UCU students: Olha Liuba - crossword solver implementation Hanna Yershova - sudoku solver impl

Where-Got-Time - An NUS timetable generator which uses a genetic algorithm to optimise timetables to suit the needs of NUS students An NUS timetable generator which uses a genetic algorithm to optimise timetables to suit the needs of NUS students.
An NUS timetable generator which uses a genetic algorithm to optimise timetables to suit the needs of NUS students.

A timetable optimiser for NUS which uses an evolutionary algorithm to "breed" a timetable suited to your needs.

A python based command line tool to compare Github Users or Repositories

gitcomp A simple python package with a CLI to compare GitHub users and repositories by associating a git_score to each entry which is a weighted sum o

A compact version of EDI-Vetter, which uses the TLS output to quickly vet transit signals.
A compact version of EDI-Vetter, which uses the TLS output to quickly vet transit signals.

A compact version of EDI-Vetter, which uses the TLS output to quickly vet transit signals. All your favorite hits in a simplified format.

Visualize and compare datasets, target values and associations, with one line of code.
Visualize and compare datasets, target values and associations, with one line of code.

In-depth EDA (target analysis, comparison, feature analysis, correlation) in two lines of code! Sweetviz is an open-source Python library that generat

Visualize and compare datasets, target values and associations, with one line of code.
Visualize and compare datasets, target values and associations, with one line of code.

In-depth EDA (target analysis, comparison, feature analysis, correlation) in two lines of code! Sweetviz is an open-source Python library that generat

Compare the contents of your hosted and proxy repositories for coordinate collisions

Nexus Repository Manager dependency/namespace confusion checker This repository contains a script to check if you have artifacts containing the same n

Code for
Code for "Single-view robot pose and joint angle estimation via render & compare", CVPR 2021 (Oral).

Single-view robot pose and joint angle estimation via render & compare Yann LabbΓ©, Justin Carpentier, Mathieu Aubry, Josef Sivic CVPR: Conference on C

A simple Streamlit Component to  compare images in Streamlit apps. It integrates Knightlab's JuxtaposeJS
A simple Streamlit Component to compare images in Streamlit apps. It integrates Knightlab's JuxtaposeJS

streamlit-image-juxtapose A simple Streamlit Component to compare images in Streamlit apps using Knightlab's JuxtaposeJS. The images are saved to the

Owner
null
Members: Thomas Longuevergne Program: Network Security Course: 1DV501 Date of submission: 2021-11-02

Mini-project report Members: Thomas Longuevergne Program: Network Security Course: 1DV501 Date of submission: 2021-11-02 Introduction This project was

null 1 Nov 8, 2021
Cleaner script to normalize knock's output EPUBs

clean-epub The excellent knock application by Benton Edmondson outputs EPUBs that seem to be DRM-free. However, if you run the application twice on th

null 2 Dec 16, 2022
Data-Scrapping SEO - the project uses various data scrapping and Google autocompletes API tools to provide relevant points of different keywords so that search engines can be optimized

Data-Scrapping SEO - the project uses various data scrapping and Google autocompletes API tools to provide relevant points of different keywords so that search engines can be optimized; as this information is gathered, the marketing team can target the top keywords to get your company’s website higher on a results page.

Vibhav Kumar Dixit 2 Jul 18, 2022
An introduction to hikari, complete with different examples for different command handlers.

An intro to hikari This repo provides some simple examples to get you started with hikari. Contained in this repo are bots designed with both the hika

Ethan Henderson 18 Nov 29, 2022
DocumentPy is a Python application that runs in a command-line interface environment, made for creating HTML documents.

DocumentPy DocumentPy is a Python application that runs in a command-line interface environment, made for creating HTML documents. Usage DocumentPy, a

Lotus 0 Jul 15, 2021
JTEX is a command line tool (CLI) for rendering LaTeX documents from jinja-style templates.

JTEX JTEX is a command line tool (CLI) for rendering LaTeX documents from jinja-style templates. This package uses Jinja2 as the template engine with

Curvenote 15 Dec 21, 2022
The sarge package provides a wrapper for subprocess which provides command pipeline functionality.

Overview The sarge package provides a wrapper for subprocess which provides command pipeline functionality. This package leverages subprocess to provi

Vinay Sajip 14 Dec 18, 2022
Manage your WordPress installation directly from SublimeText SideBar and Command Palette.

WordpressPluginManager Manage your WordPress installation directly from SublimeText SideBar and Command Palette. Installation Dependencies You will ne

Art-i desenvolvimento 1 Dec 14, 2021
Pystm32ai - A Python wrapper for the stm32ai command-line tool

PySTM32.AI A python wrapper for the stm32ai command-line tool to analyse deep le

Thibaut Vercueil 5 Jul 28, 2022
Fully Automated YouTube Channel ▢️with Added Extra Features.

Fully Automated Youtube Channel β–’β–ˆβ–€β–€β–ˆ β–ˆβ–€β–€β–ˆ β–€β–€β–ˆβ–€β–€ β–€β–€β–ˆβ–€β–€ β–ˆβ–‘β–‘β–ˆ β–ˆβ–€β–€β–„ β–ˆβ–€β–€ β–ˆβ–€β–€β–ˆ β–’β–ˆβ–€β–€β–„ β–ˆβ–‘β–‘β–ˆ β–‘β–‘β–ˆβ–‘β–‘ β–‘β–’β–ˆβ–‘β–‘ β–ˆβ–‘β–‘β–ˆ β–ˆβ–€β–€β–„ β–ˆβ–€β–€ β–ˆβ–„β–„β–€ β–’β–ˆβ–„β–„β–ˆ β–€β–€β–€β–€ β–‘β–‘β–€β–‘β–‘ β–‘β–’β–ˆβ–‘β–‘ β–‘β–€β–€β–€ β–€β–€β–€β–‘

sam-sepiol 249 Jan 2, 2023