jupyter/nbgrader — pull request #49 by jhamrick (2014-11-21 02:44:25+00:00)
Title: Add "submit" subcommand to nbgrader

This creates a new subcommand, `nbgrader submit`, that can be used by students to submit their assignments. By default, it will just create a `.tar.gz` of their assignment and then copy it to `~/.submissions` (this will be useful for me to grab their assignments from JupyterHub). It should also be fairly easy to extend to submit it in other ways, though, by overriding the `submit` method -- for example, you could make it submit through email, or by POSTing it to a url somewhere, etc.

Example usage:

```
$ ls
Problem 1.ipynb Problem 2.ipynb

$ nbgrader submit --assignment "Problem Set 1"
[SubmitApp] Using existing profile dir: u'/Users/jhamrick/.ipython/profile_default'
[SubmitApp] 'Problem Set 1' submitted by jhamrick at 2014-11-20 18:42:22.978095

$ nbgrader submit --assignment "Problem Set 1" --log-level 10
[SubmitApp] Config changed:
[SubmitApp] {'SubmitApp': {'assignment_name': u'Problem Set 1', 'log_level': 10}}
[SubmitApp] Using existing profile dir: u'/Users/jhamrick/.ipython/profile_default'
[SubmitApp] Searching path [u'/Users/jhamrick/project/tools/nbgrader/docs/user_guide/release_example/student', u'/Users/jhamrick/.ipython/profile_default', '/usr/local/etc/ipython', '/etc/ipython'] for config files
[SubmitApp] Attempting to load config file: ipython_config.py
[SubmitApp] Loaded config file: /Users/jhamrick/.ipython/profile_default/ipython_config.py
[SubmitApp] Config changed:
[SubmitApp] {'SubmitApp': {'log_level': 10, 'assignment_name': u'Problem Set 1'}, 'InteractiveShellApp': {'exec_lines': ['import sys', 'import os', 'import numpy as np', 'import scipy.stats', 'import matplotlib.pyplot as plt']}, 'TerminalIPythonApp': {'ignore_old_config': False}}
[SubmitApp] Attempting to load config file: nbgrader_submit_config.py
[SubmitApp] Loaded config file: /Users/jhamrick/.ipython/profile_default/nbgrader_submit_config.py
[SubmitApp] Adding 'Problem Set 1/Problem 1.ipynb' to submission
[SubmitApp] Adding 'Problem Set 1/Problem 2.ipynb' to submission
[SubmitApp] Adding 'Problem Set 1/timestamp.txt' to submission
[SubmitApp] Adding 'Problem Set 1/user.txt' to submission
[SubmitApp] Saved to '/Users/jhamrick/.submissions/Problem Set 1.tar.gz'
[SubmitApp] 'Problem Set 1' submitted by jhamrick at 2014-11-20 18:42:26.209151
```

@ellisonbg what do you think about this? Would something like this work with all the email stuff you said you had?