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

Test utility for validating OpenAPI documentation

DRF OpenAPI Tester This is a test utility to validate DRF Test Responses against OpenAPI 2 and 3 schema. It has built-in support for: OpenAPI 2/3 yaml

snok 106 Jan 05, 2023
Get link preview of a website.

Preview Link You may have seen a preview of a link with a title, image, domain, and description when you share a link on social media. This preview ha

SREEHARI K.V 8 Jan 08, 2023
PythonCoding Tutorials - Small functions that would summarize what is needed for python coding

PythonCoding_Tutorials Small functions that would summarize what is needed for p

Hosna Hamdieh 2 Jan 03, 2022
Source Code for 'Practical Python Projects' (video) by Sunil Gupta

Apress Source Code This repository accompanies %Practical Python Projects by Sunil Gupta (Apress, 2021). Download the files as a zip using the green b

Apress 2 Jun 01, 2022
Near Zero-Overhead Python Code Coverage

Slipcover: Near Zero-Overhead Python Code Coverage by Juan Altmayer Pizzorno and Emery Berger at UMass Amherst's PLASMA lab. About Slipcover Slipcover

PLASMA @ UMass 325 Dec 28, 2022
Pydantic model generator for easy conversion of JSON, OpenAPI, JSON Schema, and YAML data sources.

datamodel-code-generator This code generator creates pydantic model from an openapi file and others. Help See documentation for more details. Supporte

Koudai Aono 1.3k Dec 29, 2022
A simple malware that tries to explain the logic of computer viruses with Python.

Simple-Virus-With-Python A simple malware that tries to explain the logic of computer viruses with Python. What Is The Virus ? Computer viruses are ma

Xrypt0 6 Nov 18, 2022
FxBuzzly - Buzzly.art links do not embed in Discord, this fixes them (rudimentarily)

fxBuzzly Buzzly.art links do not embed in Discord, this fixes them (rudimentaril

Dania Rifki 2 Oct 27, 2022
Clases y ejercicios del curso de python diactodo por la UNSAM

Programación en Python En el marco del proyecto de Inteligencia Artificial Interdisciplinaria, la Escuela de Ciencia y Tecnología de la UNSAM vuelve a

Maximiliano Villalva 3 Jan 06, 2022
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
The blazing-fast Discord bot.

Wavy Wavy is an open-source multipurpose Discord bot built with pycord. Wavy is still in development, so use it at your own risk. Tools and services u

Wavy 7 Dec 27, 2022
The mitosheet package, trymito.io, and other public Mito code.

Mito Monorepo Mito is a spreadsheet that lives inside your JupyterLab notebooks. It allows you to edit Pandas dataframes like an Excel file, and gener

Mito 1.4k Dec 31, 2022
A complete kickstart devcontainer repository for python3

A complete kickstart devcontainer repository for python3

Viktor Freiman 3 Dec 23, 2022
Create Python API documentation in Markdown format.

Pydoc-Markdown Pydoc-Markdown is a tool and library to create Python API documentation in Markdown format based on lib2to3, allowing it to parse your

Niklas Rosenstein 375 Jan 05, 2023
An awesome Data Science repository to learn and apply for real world problems.

AWESOME DATA SCIENCE An open source Data Science repository to learn and apply towards solving real world problems. This is a shortcut path to start s

Academic.io 20.3k Jan 09, 2023
script to calculate total GPA out of 4, based on input gpa.csv

gpa_calculator script to calculate total GPA out of 4 based on input gpa.csv to use, create a total.csv file containing only one integer showing the t

Mohamad Bastin 1 Feb 07, 2022
layout-parser 3.4k Dec 30, 2022
📖 Generate markdown API documentation from Google-style Python docstring. The lazy alternative to Sphinx.

lazydocs Generate markdown API documentation for Google-style Python docstring. Getting Started • Features • Documentation • Support • Contribution •

Machine Learning Tooling 118 Dec 31, 2022
A collection and example code of every topic you need to know about in the basics of Python.

The Python Beginners Guide: Master The Python Basics Tonight This guide is a collection of every topic you need to know about in the basics of Python.

Ahmed Baari 1 Dec 19, 2021
Demonstration that AWS IAM policy evaluation docs are incorrect

The flowchart from the AWS IAM policy evaluation documentation page, as of 2021-09-12, and dating back to at least 2018-12-27, is the following: The f

Ben Kehoe 15 Oct 21, 2022