Usage
Grading Flow
When you configure the script correctly, the expected flow is:
Class list CSV is parsed to get the list of students to grade.
Students are filtered down to only those that still need a grade for the assignment (tracked in deductions YAML files).
Students are formed into their groups (groups of 1 for individual assignments)
For each student:
Student code is retrieved (from Github or Learning Suite zip file) and copied into a per-group working folder.
Callbacks are made to your code, where you can build and run the student’s code.
If your callback returns
None, the TA is prompted to enter deductions interactively. If your callback returns a list of deduction tuples, those are applied automatically.Deductions YAML file is updated to track the student’s grade.
In the above process, you will only need to write the callback code to build and run the student’s code.
File Organization
The typical usage model is that you create your own grader repository for your class, and then use this package in your own grading scripts. This is demonstrated in the ygrader-example repository, which you may fork as a good starting point.
I typically give TAs access to this grading repo, and put them in charge of both exporting CSVs from Learning Suite, and importing them after grading.
Setup
Start by creating a Grader object where you assign a name to what you are grading and provide the path of a CSV file containing the class list (exported from LearningSuite with Net ID, first name, and last name columns).
grader = ygrader.Grader(lab_name="lab1", class_list_csv_path="class_list.csv")
Next, indicate what item(s) you want to grade, and provide a callback function that you want to be run for each student’s submission. You must also specify a path to a YAML file where deductions will be stored.
grader.add_item_to_grade( item_name="lab_report.txt", grading_fcn=my_callback, deductions_yaml_path="deductions/lab_report.yaml", max_points=10, )
Set the submission system to either:
a. Learning Suite: In this case you need to provide the zip file from the Batch Download of submissions on LearningSuite.
grader.set_submission_system_learning_suite("learning_suite/lab1_submissions.zip")
b. Github: In this case you need to provide a git tag/branch name that contains the student’s submissions, as well as a CSV file that contains a list of student Net IDs and their github URL.
grader.set_submission_system_github("lab1_submission", "github_urls.csv")
(Optional) Provide groups for team-based assignments:
grader.set_learning_suite_groups("groups.csv")
(Optional) Set any optional arguments:
grader.set_other_options(format_code=True)
Run!
grader.run()