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 plans.txt 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 plans.txt 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. plans.txt - The project plans 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.py - Converted initial notebook
  • final_notebook.py - Converted final notebook
  • 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 plans.txt is AI-generated (optional with GPTZero)
  2. Step 2: Extracts the zip file and locates the TASK_ folder
  3. Step 3: Converts Jupyter notebooks to Python files
  4. Step 4: Calculates diff statistics with docstrings included
  5. Step 5: Removes docstrings and recalculates diff statistics
  6. Step 6: Generates an HTML diff report
  7. Step 7: Analyzes test file with Gemini AI to check for undocumented assertions
  8. Step 8: 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.1.tar.gz (7.7 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.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mereview-1.0.1.tar.gz
  • Upload date:
  • Size: 7.7 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.1.tar.gz
Algorithm Hash digest
SHA256 d17f4c6afb2b4f394a5aab29b7a1bfec3bbb4272315f9d26665a3194764f481b
MD5 2624b1d0747fbf17905d415fd1993f39
BLAKE2b-256 67bd8fdc789cabd697246293daad2ba979840a737b893149128c6ffdcafd9750

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mereview-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7fb0ba48c150b98b73a55974f3cf5a9b65595f62a784bc0f8f1e91603a9266f7
MD5 ed56451f4946c3a9b9d79170639f9b52
BLAKE2b-256 fbc61e5ec286b72cb61da0a83f895f503eaa104869893d8253d9ca35993058f4

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