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:
- requirements.md - The project requirements document
- [name].zip - A zip file containing:
- A folder starting with
TASK_ - Inside the folder:
initial_notebook.ipynbfinal_notebook.ipynbtest_notebook.py
- A folder starting with
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"
GPTZERO_API_KEY(optional): API key for GPTZero AI detection service - Get from https://gptzero.me/GEMINI_API_KEY(optional): API key for Google Gemini AI analysis - Get from https://ai.google.dev/
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 notebookfinal_notebook.ipynb- Copy of original final notebooktest_notebook.py- Copy of original test fileinitial_notebook.py- Converted initial notebook (Python)final_notebook.py- Converted final notebook (Python)diff_report.html- HTML visualization of code differencesgemini_analysis.txt- Gemini AI analysis of test assertionsresults_summary.json- Complete results summary in JSON format
How It Works
- Step 1: Checks if requirements.md is AI-generated (optional with GPTZero)
- Step 2: Extracts the zip file and locates the TASK_ folder
- Step 3: Copies original notebooks and test file to output directory
- Step 4: Converts Jupyter notebooks to Python files
- Step 5: Calculates diff statistics with docstrings included
- Step 6: Removes docstrings and recalculates diff statistics
- Step 7: Generates an HTML diff report
- Step 8: Analyzes test file with Gemini AI to check for undocumented assertions
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d781e0fb8af6cfe7ac1e10c63a3e509cb485e892e1fbd8dfa3210a413253c392
|
|
| MD5 |
56dac4ac20caa3ff2bcff2d00fa11114
|
|
| BLAKE2b-256 |
a43fab0b6621bf257a1e6ec16e70b44d014a88e87c1932546cd77b92591cfec1
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51a6c3dcc1b22197f81de9365c678c078fbfaa0058ce665f4783f3c0f4974b53
|
|
| MD5 |
b8b4bd15db5b065549d877acffa4ac38
|
|
| BLAKE2b-256 |
18aebcf0cf9e54c1fd2b0ee0e9e60cc5cf8a71477bacc6495febf9f544fc74b5
|