GithubHelp home page GithubHelp logo

codereview's Introduction

Code Review for CIS120

Web application to assist with grading homeworks and assessing code style.

Dependencies

  1. Python
  2. flask

Installing Code Review

# Install python and flask if you haven't already
sudo apt-get install python
sudo pip install flask

# Download and setup the directories
git clone https://github.com/patrickhulce/codereview.git
cd codereview
mkdir -p data/_projects

# Run Code Review
python app.py

Open your browser to localhost:8000 and enjoy!

Usage

Overview

Code Review operates on the idea of assignments. An assignment is presented in Code Review by a JSON file that describes the basic settings (people, files, problems, templates, etc) and the comments themselves.

Workflow

The basic workflow of Code Review involves the following steps.

  1. Enter your student information under Settings > People
  2. Enter each problem and its corresponding file under Settings > Files
  3. (Optional) Enter the issues you expect to see under Settings > Issue Templates
  4. Copy your students' code into the data folder you created during the installation step in a subfolder bearing the assignment's name. For example, if you're grading an assignment called lab01 put each student's code into a codereview/data/lab01/studentid folder.
  5. Enter the name of the assignment (make sure this matches the folder name you used in step 4) under Settings.
  6. Make your comments (see Making Comments for details).
  7. Edit your email template under Settings > Email Templates
  8. Make your grades for each student under Email.

Loading/Saving

Because the assignment contains not only the settings, but the comments themselves. Code Review automatically saves your assignment to data/_projects/assignment_name.json every minute. You can manually save or load a project. For other ways to import a project see Importing/Exporting.

Importing/Exporting

In the settings tab, there is a textbox with import and export buttons. Pressing Export will populate the textbox with the JSON string of the current value of the assignment, allowing for easy sharing of issue templates, people, and files. Pressing Import will parse the text in the textbox and set the value of the people, files, templates, and comments accordingly. This is currently the safest way to load assignments from a previous session.

Making Comments

After you've entered the necessary settings and copied the files into the data/assignment_name folder, you're ready to start commenting on the code. Start by opening the Code tab, selecting a student's name, and selecting a file. The student's file should appear in the code pane on the left. Now click on a problem to get started. A tabbed interface should appear on the right. The General section is where you'll mark the student's overall style in solving the given problem as well as his or her test coverage by using the radio buttons. The Issues section is where you'll provide comments on specific errors or style violations that could be improved. To assist in making comments, common issues can be automatically filled in by starting to type the name of the issue template and hitting enter once the name is highlighted. This will automatically populate the description and severity based on the corresponding issue template. After making the necessary comment, be sure to click Add to add the comment to the assignment.

Settings

People

Each assigment contains a set of people we expect to review. Three attributes need to be known about a person: their id (used for retrieving their code from the data/assignment_name/studentid folder), their name (used in the email template), and their email (used for the mailto link when sending out grades).

Files

Each assignment contains a set of files we expect to review. Each student's files must be located at data/assignment_name/studentid/filename in order to be pulled up by Code Review.

Problems

Each file contains a set of problems we expect to review. Each problem contains a friendly name, which is used for navigation within Code Review and for displaying in student comments, and a signature, which is used to automatically navigate to the relevant code block when reviewing a file. When filling out the signature, it is wise to include the minimum text that is likely to be common to all students' implementations. Currently, any spaces are replaced with RegEx that will match between 0 and 4 spaces, and any use of the rec keyword will be replaced with RegEx that optionally matches against it.

Issue Templates

Each assignment contains a set of issue templates that can be used to automatically fill in the description and severity of code problems that are likely to be common across many students. When actually making comments, autocomplete will match against any word in the name or description.

codereview's People

Contributors

patrickhulce avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

codereview's Issues

Config files

I was thinking a bit about how to organize the config files so that projects are easier to set up. My thinking was that we could divide everything into three files: a project file that holds all the info about files/questions and grading breakdowns, an issue templates file, and a student data file that can be reused every assignment.

There are some mockups of the files that I was messing around with up at https://gist.github.com/DoronShapiro/6954176. Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.