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

Official Matplotlib cheat sheets

Official Matplotlib cheat sheets

Matplotlib Developers 6.7k Jan 09, 2023
Soccerdata - Efficiently scrape soccer data from various sources

SoccerData is a collection of wrappers over soccer data from Club Elo, ESPN, FBr

Pieter Robberechts 195 Jan 04, 2023
API spec validator and OpenAPI document generator for Python web frameworks.

API spec validator and OpenAPI document generator for Python web frameworks.

1001001 249 Dec 22, 2022
Code for our SIGIR 2022 accepted paper : P3 Ranker: Mitigating the Gaps between Pre-training and Ranking Fine-tuning with Prompt-based Learning and Pre-finetuning

P3 Ranker Implementation for our SIGIR2022 accepted paper: P3 Ranker: Mitigating the Gaps between Pre-training and Ranking Fine-tuning with Prompt-bas

14 Jan 04, 2023
My solutions to the Advent of Code 2021 problems in Go and Python 🎄

🎄 Advent of Code 2021 🎄 Summary Advent of Code is an annual Advent calendar of programming puzzles. This year I am doing it in Go and Python. Runnin

Orfeas Antoniou 16 Jun 16, 2022
A Json Schema Generator

JSON Schema Generator Author : Eru Michael About A Json Schema Generator. This is a generic program that: Reads a JSON file similar to what's present

1 Nov 10, 2021
OpenTelemetry Python API and SDK

Getting Started • API Documentation • Getting In Touch (GitHub Discussions) Contributing • Examples OpenTelemetry Python This page describes the Pytho

OpenTelemetry - CNCF 1.1k Jan 08, 2023
A course-planning, course-map rendering and GPA-calculation web service, designed for the SFU (Simon Fraser University) student.

SFU Course Planner What is the overall goal of the project (i.e. what does it do, or what problem is it solving)? As the title suggests, this project

Ash Peng 1 Oct 21, 2021
A powerful Sphinx changelog-generating extension.

What is Releases? Releases is a Python (2.7, 3.4+) compatible Sphinx (1.8+) extension designed to help you keep a source control friendly, merge frien

Jeff Forcier 166 Dec 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
:blue_book: Automatic documentation from sources, for MkDocs.

mkdocstrings Automatic documentation from sources, for MkDocs. Features - Python handler - Requirements - Installation - Quick usage Features Language

1.1k Jan 04, 2023
Dev Centric Tools for Mkdocs Based Documentation

docutools MkDocs Documentation Tools For Developers This repo is providing a set of plugins for mkdocs material compatible documentation. It is meant

Axiros GmbH 14 Sep 10, 2022
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
epub2sphinx is a tool to convert epub files to ReST for Sphinx

epub2sphinx epub2sphinx is a tool to convert epub files to ReST for Sphinx. It uses Pandoc for converting HTML data inside epub files into ReST. It cr

Nihaal 8 Dec 15, 2022
Generate YARA rules for OOXML documents using ZIP local header metadata.

apooxml Generate YARA rules for OOXML documents using ZIP local header metadata. To learn more about this tool and the methodology behind it, check ou

MANDIANT 34 Jan 26, 2022
DataRisk Detection Learning Resources

DataRisk Detection Learning Resources Data security: Based on the "data-centric security system" position, it generally refers to the entire security

Liao Wenzhe 59 Dec 05, 2022
Crystal Smp plugin for show scoreboards

MCDR-CrystalScoreboards Crystal plugin for show scoreboards | Only 1.12 Usage !!s : Plugin help message !!s hide : Hide scoreboard !!s show : Show Sco

CristhianCd 3 Oct 12, 2021
A Python module for creating Excel XLSX files.

XlsxWriter XlsxWriter is a Python module for writing files in the Excel 2007+ XLSX file format. XlsxWriter can be used to write text, numbers, formula

John McNamara 3.1k Dec 29, 2022
A system for Python that generates static type annotations by collecting runtime types

MonkeyType MonkeyType collects runtime types of function arguments and return values, and can automatically generate stub files or even add draft type

Instagram 4.1k Jan 07, 2023
My Sublime Text theme

rsms sublime text theme Install: cd path/to/your/sublime/packages git clone https://github.com/rsms/sublime-theme.git rsms-theme You'll also need the

Rasmus 166 Jan 04, 2023