This repository contains a Python script that performs code review on Java programs. It uses the OpenAI GPT-4 model to generate a detailed review of the code.
To run the code review script, follow these steps:
-
Clone the repository:
git clone https://github.com/thisisamank/Grader.git
-
Install the required dependencies:
pip install gitpython openai-async
-
Set up your OpenAI API key by replacing the
open_ai_key
variable in the script with your actual API key. -
Run the script:
python main.py
-
Enter the Git URL of the repository you want to review when prompted.
-
The script will clone the repository, process the Java files, generate a review, and save it as a Markdown file (
review.md
). -
Optionally, you can convert the Markdown file to a PDF using Pandoc:
pandoc review.md -o review.pdf --pdf-engine=xelatex -V geometry:"margin=0.5in"
The generated review will be in the format of a Markdown file and a PDF file (review.pdf
).