NbGrader extension for automatically generating test code.
Note: This code has been merged upstream into NbGrader itself. See jupyter/nbgrader#1817 .
To run the demo, make sure Docker is installed on your machine, and run the following in the root folder of the repository:
docker-compose up
This will build a docker image, bind mount the demo/source and demo/release folders,
and start a Jupyter notebook server. Open your browser and navigate to localhost:8888;
this should open the Jupyter notebook interface.
You will likely need to give read/write permissions to the demo/source and demo/release folders
(so that the jupyter user inside the docker container can read/write to them).
Again in the root folder of the repository, run:
chmod a+rwx demo/source
chmod a+rwx demo/release
We have included a few example autograded notebooks in this demo container.
For example, you can use Autotest to process the ps3 assignment.
In the Jupyter notebook interface in your browser, open a terminal (New -> Terminal)
and type:
nbgrader generate_assignment --force ps3
To see how Autotest processes your questions, you can instead run with debug flags:
nbgrader generate_assignment --force --debug ps3
The release version of the assignment will appear with generated test code in the release/ folder.
See the source/ folder for other demo assignments. You can also add your own in the demo/source/ folder
of this repository. Make sure to give a+rwx permissions to each assignment you add to the folder,
as otherwise the jupyter user won't be able to read/write to them.
You can watch a brief explainer video here. More technical details will be added here in the README soon.
- Create a python virtual environment:
- Activate this virtual environment
- Clone this repository to local
- Install the requirements:
pip install -r requirements.txt - Execute
./install_autotest.shunder the root of this repository, it will automatically installautotest generationmodule over the nbgrader package - Install extensions
jupyter nbextension install --sys-prefix --py nbgrader --overwrite
jupyter nbextension enable --sys-prefix --py nbgrader
jupyter serverextension enable --sys-prefix --py nbgraderAutotest currently supports NbGrader version 0.6.2. An updated version of Autotest for the newest version of NbGrader is under development.

