Configuring Rudaux
Assumptions
Rudaux makes some important assumptions. In the future we hope to abstract away these assumptions. For reproducible provisioning of a compatible course infrastructure, see the DSCI 100 course infrastructure repository.
Note: The infrastructure repository is still under development, and may undergo significant changes before the course's release in January 2019.
-
You have a two-repository, instructors/students model for your course:
- The instructors repository contains everything that nbgrader needs to operate.
- The students repository just contains the release versions of assignments.
- You wish rudaux to pull, commit, and push to git on your behalf. This may be made optional.
- You have a Canvas Access Token in an environment variable accessible to rudaux.
- Because autograding is containerized, it is assumed your user will be able to execute
docker run
commands. - If you schedule autograding: The machine you are executing rudaux commands on will be the same machine that autograding is executed on.
- If you wish to perform ZFS snapshotting: Rudaux does not perform ZFS snapshotting, but will look for a snapshot with the name of the assignment in question. Scheduling ZFS snapshots may be implemented.
- You have SSH keys or deploy keys set up for your repositories on the server you run rudaux. If you use HTTPS rather than SSH for git remotes, you will be prompted for your password. However, this will impair autograding.
Configuration Options
A configuration file should be included in the same directory where nbgrader operates. When creating your configuration file, you have two options:
- Save the options in a file named rudaux_config.py. This will keep your options for each program separate.
- Save the options in your nbgrader_config.py file. This will allow you to only maintain one config file.
Canvas
c.Canvas.course_url
- str-
The URL of your Canvas distribution.
Example:
'https://canvas.institution.edu'
c.Canvas.course_id
- int-
The Canvas ID of your course. If you open your course in canvas, this will appear as:
https://canvas.institution.edu/courses/<course_id>/assignments
c.Canvas.token_name
(str)-
The name of the environment variable holding your Canvas Access Token.
Default:
'CANVAS_TOKEN'
c.Canvas.external_tool_name
- str-
The name of your external tool in Canvas which represents your JupyterHub server. For more information read the
ltiauthenticator documentation, which contains information on how to set up an external tool in Canvas.
Default:
'Jupyter'
c.Canvas.external_tool_level
- str-
The
level
at which your external tool was created in Canvas.
Acceptable values:
['course', 'account', 'group']
Default:'course'
Note: external_tool_name
and external_tool_level
are used to locate the ID of your external tool in Canvas to attach it to your assignment links. This links your LTI Consumer Key and LTI Consumer Secret to each launch request, authenticating your users.
GitHub
c.GitHub.ins_repo_url
- str-
The location of your instructors repository where you will keep your solutions, graded assignments, and gradebook.db.
Rudaux will detect the type of URL provided (HTTPS vs SSH).
c.GitHub.stu_repo_url
- str-
The location of your public student repository this will contain the release versions of your assignments.
Rudaux will detect the type of URL provided (HTTPS vs SSH).
-
c.GitHub.assignment_release_path
- str -
The subpath of the student repository where assignments will be deposited.
Default:
'materials'
JupyterHub
c.JupyterHub.hub_url
- str- The URL of your JupyterHub server.
c.JupyterHub.base_url
- str-
A JupyterHub prefix, if one is specified. In your jupyterhub_config.py, this would be named "c.JupyterHub.base_url"
Default:
""
(an empty string)
Example:'/jupyter'
c.JupyterHub.storage_path
- str-
The location of your students' persistent storage.
Example:
'/tank/home/dsci100'
c.JupyterHub.zfs
- bool-
Are ZFS snapshots available? If so, we will utilize snapshotting to ensure that we are using a precise copy of the students' notebooks at the time the assignment closes. If not, we will simply read from the student directories.
Default:
False
c.JupyterHub.zfs_regex
- str-
A regular expression that matches your snapshot timestamp. Use None if the snapshot name is a timestamp.
Default:
r'\d{4}-\d{2}-\d{2}-\d{4}'
c.JupyterHub.zfs_datetime_pattern
- str-
The pattern of your timestamp in token format, for pendulum parsing: https://pendulum.eustace.io/docs/#tokens
Default:
'YYYY-MM-DD-HHmm'
Course
c.Course.tmp_dir
- str-
The temporary directory that rudaux will clone your students' repository into for assignment release.
Default:
'~/tmp'
c.Course.timezone
- str-
The timezone which your due dates will be set and parsed in.
Example:
'US/Pacific'
c.Course.grading_image
-
The docker image you will use to run nbgrader autograding. This should essentially be a copy of your students' docker image, plus nbgrader.
Example:
'ubcdsci/r-dsci-grading'
Example Dockerfiles from DSCI 100: c.Course.assignments
-
A list of your assignments with the following fields:
name
- str-
Required. Unique. The name of the assignment. Must conform to nbgrader naming conventions (i.e. must be the name of the folder containing the jupyter notebook).
Example:
'homework_1'
duedate
- str-
Required. The date the assignment is due.
Example:
'2019-03-14'
duetime
- str-
Optional. The time the assignment is due.
Default:
'23:59:59'
points
- int-
Optional. The maximum possible points for this assignment.
Default:
1
manual
- bool-
Optional. Does the assignment require manual input (i.e. TA feedback)? If so, feedback reports will not be generated and grades will not be submitted to Canvas automatically.
Default:
False
Note: Rudaux parses datetimes with the pendulum library—acceptable date strings are listed in the pendulum docs. For example, if
duedate
were'2019-03-14'
andduetime
were'22:00:00'
, they would be joined and parsed as'2019-03-14T22:00:00'
.