Releasing an Assignment using Otter Grader
This is one of many ways to release an assignment that students will complete on DataHub and be graded with Otter Grader. Data Science Undergraduate Education recommends this method where all development takes place on DataHub.
Note: If you are working on an assignment that will be released to students on a course specific hub, please supply that hub whenever this guide references “DataHub” or “the hub” For example, Data 100 uses data100.datahub, instead of DataHub.
Before the start of the semester
- Review what Python packages your class is using.
- If you are not developing or altering assignments, you can use files like
requirements.txt
and look at yourimport
statements. - For a systematic way to gather this information, we’ll later provide a notebook that gathers all requirements into a a text file.
- If you are not developing or altering assignments, you can use files like
-
Check that all Python packages are available on the DataHub offering that your course is using.
-
If you need to request a package for your hub, fill out a GitHub Issue. More information on requesting packages and testing for package compatibility on the hub here.
- Ensure that the packages AND THEIR VERSIONS on the hub match your
requirements.txt
used by otter. To check a package version, use Python to import the package and print out its version like so:
import numpy
numpy.__version__
Before an assignment is released
Confirm that the source notebook (the one passed to otter assign
) is accessible. See here for more guidance.
Run otter assign
on DataHub. We do NOT recommend to run this command locally, even if you’re using a virtual environment. You can clone the development repo in DataHub via the command line/terminal.
Ensure that the solution runs on DataHub without issue; i.e. “Run All Cells” on the solution notebook generated from otter assign
and ensure that all tests pass.
Ensure that the autograder builds on Gradescope and submit the solution notebook generated from otter assign
to test the autograder. All tests should pass.
Only push to the student facing repository once all changes have been made. You don’t want to accidentally break an nbgitpuller link.
Create your nbgitpuller link using this plug in. Ensure that the JupyterHub URL is for the intended DataHub. You should redownload this plug in every semester because updates are unfortunately not automatic.