topic | desc |
---|---|
Gradescope: autograder |
Creating autograded assignments |
The website gradescope.com provides the capability to set up autograded assignments.
We have two courses set up in Gradescope for SPIS 2016:
- The "real" SPIS 2016 Gradescope course
- A SPIS-Autograder-Development test course for testing out new autograded assignments before they are released to students.
The private repo https://github.com/ucsd-cse-spis-2016/PRIVATE-autograder-try01 contains an example of an autograded assignment. This assignment is likely not one that is suitable for SPIS—rather this assignment is one that is set up using the exact example provided by Gradescope's own documentation. The "value added" is this:
-
There is a makefile that when you type
make
, produces the fileautograder.zip
in the format needed by Gradescope. -
It is packaged in its own github repo, one that contains ONLY the Python code needed for a single assignment. (Gradescope's own example contains Java examples also, and lots of other clutter.)
The README.md file in the PRIVATE-autograder-try01 repo contains a description of the contents of the repo, and some advice on adapting it for your own assignment.
To get started:
-
Create a new private repo called, for example,
PRIVATE-autograder-lab02
under theucsd-cse-spis-2016
organization -
Copy the Makefile from PRIVATE-autograder-try01 into your repo.
-
Create a subdirectory in that repo called
autograder
, and under that subdirectory, create one additional subdirectory calledtests
-
Into the
autograder
subdirectory, copy these files, with exactly these names:run_autograder
run_tests.py
setup.sh
-
Edit the
run_autograder
file. In it, the name of the file you expect the students to submit in their assignment, e.g.calculator.py
needs to be changed to what you expect the students to submit, e.g.tempFuncs.py
, orlab05.py
, or whatever.Fortunately,
run_tests.py
andsetup.sh
are pretty standard. Unless you need topip install ...
extra Python modules, you can probably leave them alone. -
Into the tests subdirectory, add your tests.
I suggest copying one of the test files from the example repo and then modifying it to fit your assignment.
You might need an empty init.py as well, as this is present in the example.
-
Use
make
in the top level to generate anautograder.zip
file, and use that to create the assignment on Gradescope.It is good practice to have a separate "Test Course" in which to try the assignment first before uploading it to your real course, since Gradescope does not allow you to delete assignments once there is even a single submission, even if that submission is a test submission from an instructor.
-
optional, but helpful: add these lines to the .gitignore file in the main directory of the repo
# for gradescope autograder autograder.zip # for emacs *~ \#*\# # for mac os .DS_Store
Once you have set up the repo, you can run make clean; make
to generate
the autograder.zip file. What do you do with this? The text and images below
explain the process.
- The "real" SPIS 2016 Gradescope course
- A SPIS-Autograder-Development test course for testing out new autograded assignments before they are released to students.
First, navigate to either:
- the SPIS 2016 autograder practice course, OR
- the real SPIS 2016 course page on Gradescope.
(I strongly recommend trying new assigments in the practice course first.)
Navigate to the assignments page. There may be a "Create Assignment" button on the first page that pops up, but that only works for traditional assignments:
Then, click the "Create Programming Assignment" button as shown in the image below.
It is near the bottom of the instructor UI, and is NOT the same as the regular "Create Assignment" button (at least as of this writing, August 2016. Note that as a web app, Gradscope's UI is subject to change at any time.)
The setup process takes a while. How do you know when its finished? It seems to be the following message at the end of the log:
Successfully installed subprocess32 gradescope-utils
Cleaning up...
---> c33181bc2151
Removing intermediate container 60d1982dedf1
Successfully built c33181bc2151