A Jupyter Notebook server extension which adds:
- Async capabilities to
nbgrader's auto-grading service. - Export grades as a CSV file for the
Canvas LMS
- Clone this repo and install the pacakage with
pip:
git clone https://github.com/illumidesk/async-nbgrader
cd async-nbgrader
pip install -e .- Create and activate your virtual environment:
virtualenv -p python3 venv
source venv/bin/activate- Install and Activate Extensions
Install and activate client and server extensions:
jupyter nbextension install --sys-prefix --py async_nbgrader --overwrite
jupyter nbextension enable --sys-prefix --py async_nbgrader
jupyter serverextension enable --sys-prefix --py async_nbgraderThis package leverages the same Python API available with nbgrader. Therefore no additional changes are required to run the auto-grader. For example, once you have collected assignments, run the following command to auto-grade assignments with the async-nbgrader server extension:
nbgrader autograde "<assignment-name>"This package includes the option to set an environment variable to toggle whether to use the asyncronous version of the autograder or the syncrononous version (default is async):
| Environment Variable | Description | Default |
|---|---|---|
| NBGRADER_ASYNC_MODE | Used to set whether the autograder runs syncronous or asyncronous mode | "true" |
Follow the steps below to export grades from the nbgrader database to a *.csv (default is canvas_grades.csv) file:
-
Export the Canvas LMS grades as a CSV file from your Course's gradebook by following these instructions.
-
Copy the CSV file to a location where the
ildcommand has access to the exported CSV. (Theildcommand is used to export grades from thenbgraderdatabase). -
Run the
ild exportcommand to export grades from thenbgraderdatabase:
ild export --canvas_import=/path/to/my/grades-from-canvas.csv --canvas_export=/path/to/my/grades-for-canvas.csvBy default, the ild export command uses the canvas.csv as the file to import grades from and the canvas_grades.csv to export grades to. You can override these values with the --canvas_import and the --canvas_export flags to designate the path and file name for the CSV file to import and export, respectively.
The ild command is a wrapper for the nbgrader command. Therefore all other flags included with the nbgrader CLI are available with the ild command, such as the --debug flag.
If successful, the output in the terminal should look similar to:
[ExportApp | WARNING] No nbgrader_config.py file found (rerun with --debug to see where nbgrader is looking)
[ExportApp | INFO] Using exporter: CanvasCsvExportPlugin
[ExportApp | INFO] Exporting grades to canvas_grades.csv
[ExportApp | INFO] Skipping second row
[ExportApp | INFO] Finding student with ID 358
[ExportApp | INFO] Finding submission of Student '358' for Assignment 'postgres-migration-test'For general contribution guidelines, please refer to IllumiDesk's contributing guidelines.
The async_nbgrader package installs the nbgrader package as a required dependency, therefore you should not have to install it explicitly.
The
async_nbgraderpackage overridesnbgrader's default auto-grading service (included with theFormgraderextension) by converting the grading service from asyncronousservice to anasyncronousservice. Thefore it's a good idea to get familiar with thenbgraderdocumentation (although not a must) to setup your local environment by following these instructions.
Use pytest to run tests:
pytest -vApache 2.0