Skip to main content

A CLI tool for reviewing coding assignments and Jupyter notebooks with AI-powered analysis

Project description

mereview

A CLI tool for reviewing coding assignments and Jupyter notebooks with AI-powered analysis.

Features

  • AI Detection: Checks if requirements.md is AI-generated using GPTZero API (optional)
  • Notebook Analysis: Converts Jupyter notebooks to Python and performs diff analysis
  • Diff Reports: Generates both statistical and HTML diff reports
  • Test Validation: Uses Gemini AI to validate test assertions against plans and initial code

Installation

From PyPI (recommended):

pip install mereview

Usage

mereview [OPTIONS]

Options

  • --dir, -d: Directory containing requirements.md and zip file (default: current directory)
  • --output, -o: Output directory for results (default: review_results)
  • --help: Show help message

Example

# Run in current directory
mereview

# Specify directory and output location
mereview --dir ./submissions --output ./reviews

Required Files

The tool expects the following files in the specified directory:

  1. requirements.md - The project requirements document
  2. [name].zip - A zip file containing:
    • A folder starting with TASK_
    • Inside the folder:
      • initial_notebook.ipynb
      • final_notebook.ipynb
      • test_notebook.py

Environment Variables

Set these environment variables before running the tool (optional):

export GPTZERO_API_KEY="your_gptzero_api_key"
export GEMINI_API_KEY="your_gemini_api_key"

If these keys are not provided, the respective steps will be skipped with warnings.

Output

The tool generates the following files in the output directory:

  • initial_notebook.ipynb - Copy of original initial notebook
  • final_notebook.ipynb - Copy of original final notebook
  • test_notebook.py - Copy of original test file
  • initial_notebook.py - Converted initial notebook (Python)
  • final_notebook.py - Converted final notebook (Python)
  • diff_report.html - HTML visualization of code differences
  • gemini_analysis.txt - Gemini AI analysis of test assertions
  • results_summary.json - Complete results summary in JSON format

How It Works

  1. Step 1: Checks if requirements.md is AI-generated (optional with GPTZero)
  2. Step 2: Extracts the zip file and locates the TASK_ folder
  3. Step 3: Copies original notebooks and test file to output directory
  4. Step 4: Converts Jupyter notebooks to Python files
  5. Step 5: Calculates diff statistics with docstrings included
  6. Step 6: Removes docstrings and recalculates diff statistics
  7. Step 7: Generates an HTML diff report
  8. Step 8: Analyzes test file with Gemini AI to check for undocumented assertions
  9. Step 9: Saves all results to the output directory

Requirements

  • Python 3.8+
  • Dependencies listed in requirements.txt

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

mereview-1.0.4.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

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

mereview-1.0.4-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file mereview-1.0.4.tar.gz.

File metadata

  • Download URL: mereview-1.0.4.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for mereview-1.0.4.tar.gz
Algorithm Hash digest
SHA256 d781e0fb8af6cfe7ac1e10c63a3e509cb485e892e1fbd8dfa3210a413253c392
MD5 56dac4ac20caa3ff2bcff2d00fa11114
BLAKE2b-256 a43fab0b6621bf257a1e6ec16e70b44d014a88e87c1932546cd77b92591cfec1

See more details on using hashes here.

File details

Details for the file mereview-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: mereview-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for mereview-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 51a6c3dcc1b22197f81de9365c678c078fbfaa0058ce665f4783f3c0f4974b53
MD5 b8b4bd15db5b065549d877acffa4ac38
BLAKE2b-256 18aebcf0cf9e54c1fd2b0ee0e9e60cc5cf8a71477bacc6495febf9f544fc74b5

See more details on using hashes here.

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