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.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 plans.txt 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.3.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.3-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mereview-1.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 663ffd8c4a89161119e14261a364bc2a92a38cc925f2b9dcc1830dba44801630
MD5 fe7ed63eab75c66e6c0cb3b13595a585
BLAKE2b-256 447e833ebbb1673135ad24c0fd84e40d6eab3ec666c181aa438b2a34dd6bbc33

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mereview-1.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d7cabb22d78dbe6a5876e22f396d34a3485da09ef84f7f9c2b25152b5ff0b786
MD5 e29d1b4a1da78e5924bdcbab4fcfc910
BLAKE2b-256 8e8d0f7e7f69b4db10791170c202f3ab0d06bbcd505c33294020068366adc7ce

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