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

pip install -e .

Or install dependencies directly:

pip install -r requirements.txt

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.0.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.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mereview-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 f46e59d3b6da53c353e406347d1945d159f3c3197388cb83300ec80b9ce011ae
MD5 6e126993ce6eb37477b847993051697e
BLAKE2b-256 2c4df1c5060e17ac3fc23f2e26801c14a4e14686de19632bbe21409f0af40ac9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mereview-1.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3350a688c7f0c7a5f019786aa2a80b5f5dff6da8d274e1fd816d605f20fdbe60
MD5 04696ebcaa70cc7d983d1818530554cb
BLAKE2b-256 46ef845412a446dc8c95297cda351e9e12af83c981ab3e4680f04255709b8898

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