Skip to main content

An automated evaluation framework for Python notebooks and Excel assignments

Project description

Dr. Chandravesh Chaudhari Logo

InstantGrade

An automated evaluation framework for Python notebooks and Excel assignments

PyPI version Python License: MIT Documentation CI codecov


🌱 Dr. Chandravesh Chaudhari

Website LinkedIn Email

Dr. Chandravesh Chaudhari is the maintainer of InstantGrade — an automated evaluation platform currently focused on grading Python Jupyter notebooks and Excel assignments and more to follow in future.

Contact & social links:


📚 Documentation

Read the full documentation →


Introduction

InstantGrade is a comprehensive, extensible evaluation framework designed to automatically grade student submissions against instructor solution files. It supports multiple file formats including Python Jupyter notebooks and Excel files, making it ideal for educational institutions and online learning platforms.

The framework was created to streamline the grading process for programming and data analysis assignments, reducing manual effort while providing detailed, actionable feedback to students. The vision is to expand support to additional file types and programming languages, creating a universal evaluation platform for technical education.

👩‍🏫 About the Maintainer

Dr. Chandravesh Chaudhari

📧 chandraveshchaudhari@gmail.com 🌐 Website 🔗 LinkedIn

Features

  • Automated Evaluation: Compare student submissions against instructor solutions automatically
  • Multiple File Format Support: Currently supports Python Jupyter notebooks (.ipynb) and Excel files (.xlsx, .xls)
  • Comprehensive Reporting: Generate detailed HTML reports with visual feedback and scoring
  • AST Analysis: Deep code comparison using Abstract Syntax Tree analysis for Python code
  • Flexible Configuration: Customizable evaluation criteria through JSON configuration
  • Batch Processing: Evaluate multiple student submissions in one run
  • Extensible Architecture: Easy to add support for new file types and evaluation strategies

Significance

  • Time-Saving: Reduces manual grading effort by 90% for programming assignments
  • Consistency: Ensures uniform evaluation criteria across all student submissions
  • Detailed Feedback: Provides students with specific areas of improvement
  • Scalability: Handles large classes with hundreds of submissions efficiently
  • Educational Focus: Allows instructors to focus on teaching rather than repetitive grading tasks

Installation

This project is available at PyPI. For help in installation check instructions

python3 -m pip install instantgrade  

For development installation:

git clone https://github.com/chandraveshchaudhari/instantgrade.git
cd evaluator
python3 -m pip install -e .

Docker (recommended for notebook isolation)

InstantGrade uses Docker to run student notebooks in an isolated environment. For the Docker-backed grading to work, users should install Docker Desktop (macOS/Windows) or Docker Engine (Linux).

When upgrading InstantGrade (new release), existing local Docker images named instantgrade:latest may be stale and could cause import or runtime errors inside the container. To avoid this, do one of the following after upgrading:

  • Prefetch a new image tagged to the current commit (recommended):
# from the repository root
python tools/docker_build_image.py

# to force a rebuild even if an image exists
python tools/docker_build_image.py --force
  • Or allow the runtime to rebuild automatically by setting the environment variable for a single run:
instantgrade_FORCE_REBUILD=1 instantgrade --solution sample_solutions.ipynb --submissions ./submissions/
  • Developer fast-iteration option: bind-mount the src directory into the container so you don't need to rebuild the image on small changes.

The repository ships a small helper at tools/docker_build_image.py that builds a git-SHA-tagged image (and also tags instantgrade:latest for convenience). This is the recommended step for administrators preparing a new release in their environment.

Dependencies

Required
  • pandas - Data manipulation and analysis for comparison results
  • openpyxl - Reading and writing Excel files
  • nbformat - Working with Jupyter notebook files
  • nbclient - Executing Jupyter notebooks programmatically
  • click - Creating command-line interfaces
Optional
  • xlwings - Advanced Excel automation capabilities (Windows/macOS only)

Usage

Basic Usage

Python API

from instantgrade import Evaluator

# Initialize evaluator with solution and submissions folder
evaluator = Evaluator(
    solution_file_path="path/to/solution.ipynb",
    submission_folder_path="path/to/submissions/"
)

# Run complete evaluation pipeline
report = evaluator.run()

Command Line Interface

# Evaluate Python notebook submissions
instantgrade --solution sample_solutions.ipynb --submissions ./submissions/ --output ./report/

# Evaluate Excel submissions
instantgrade --solution solution.xlsx --submissions ./excel_submissions/ --output ./excel_report/

Supported File Types

Python Jupyter Notebooks (.ipynb)

  • Executes code cells and compares outputs
  • AST-based code structure comparison
  • Variable and function definition verification
  • Exception and error handling analysis

Excel Files (.xlsx, .xls)

  • Cell value comparison across worksheets
  • Formula evaluation and verification
  • Conditional formatting checks
  • Chart and pivot table analysis (with xlwings)

Future Support (Planned)

  • R Markdown files (.Rmd)
  • Python scripts (.py)
  • SQL files (.sql)
  • MATLAB scripts (.m)

Important links

Contribution

All kinds of contributions are appreciated:

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

For detailed contribution guidelines, see the Contributing Guide.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

instantgrade-0.1.18.tar.gz (153.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

instantgrade-0.1.18-py3-none-any.whl (55.5 kB view details)

Uploaded Python 3

File details

Details for the file instantgrade-0.1.18.tar.gz.

File metadata

  • Download URL: instantgrade-0.1.18.tar.gz
  • Upload date:
  • Size: 153.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for instantgrade-0.1.18.tar.gz
Algorithm Hash digest
SHA256 b1765b7328bc108545f1383c8d468de0c0a0fb4e6df202b74c87d944da04ae63
MD5 1a2ee37d57ad123c5a69c4f11f3ac100
BLAKE2b-256 2d6d32d87ca480d55f46e7934c2ede3730c98f2c47c45b9891a649cc81600c6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for instantgrade-0.1.18.tar.gz:

Publisher: publish.yml on chandraveshchaudhari/instantgrade

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file instantgrade-0.1.18-py3-none-any.whl.

File metadata

  • Download URL: instantgrade-0.1.18-py3-none-any.whl
  • Upload date:
  • Size: 55.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for instantgrade-0.1.18-py3-none-any.whl
Algorithm Hash digest
SHA256 0c9178e77d9f3cb6aa2ec935b1921495a32fa7df68aa08e6352fa02e1c895555
MD5 c29bc3c6e6a3b9e52df59616110f01f5
BLAKE2b-256 bcac21aee4a553226c533209d2b54f75bcd6d1791fa2d5b3bc86ec9a8457185b

See more details on using hashes here.

Provenance

The following attestation bundles were made for instantgrade-0.1.18-py3-none-any.whl:

Publisher: publish.yml on chandraveshchaudhari/instantgrade

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page