Skip to content

Setting up code review

moowiz edited this page Oct 17, 2014 · 4 revisions

The code review process for okpy requires some setup.

There are 2 main steps

  1. Create work queues for the readers
  2. Assign submissions to those work queues

Create work queues for the readers

This, right now, needs to be done from the REST API. This should be fairly simple though.

Work queues (the Queue class in the code) have 3 properties:

  • submissions: The list of submissions in this queue
  • assignment: The assignment this queue is for.
  • assigned_staff: The staff who have to grade this queue.

When you set up these queues from the command line, you only need to worry about the last two properties. You should do a POST to /api/v1/queue/ with something like

{
  "assignment": 1238034039089,
  "assigned_staff": "[email protected]"
}

Do this for each of your readers.

Assign submissions to those work queues

Once you've made the queues, you're basically done! Now, you just need to assign submissions to these queues.

Thankfully, the system will do this for you. All you need to do is do a GET request to the url /assignment/<id>/assign. This will kick off a task queue process which will loop through all the submissions for that assignment, and assign them one at a time to the work queues.

Note that this is done randomly, with no real order. It simply tries to distribute the work as evenly as possible.

(Eventually, this will all be automated through the front-end).