Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standalone versions of nbgrader assign, autograde, and feedback #772

Merged
merged 4 commits into from
Jun 5, 2017

Conversation

jhamrick
Copy link
Member

@jhamrick jhamrick commented Jun 4, 2017

Fixes #763

This creates standalone objects that can be used for assigning, autograding, and feedback. For example:

from nbgrader.coursedir import CourseDirectory
from nbgrader.converters import Assign
from traitlets.config import Config

import logging
logging.basicConfig(level="INFO")

c = Config()
c.CourseDirectory.assignment_id = "ps1"
c.Assign.create_assignment = True
c.Assign.force = True

coursedir = CourseDirectory(config=c)
converter = Assign(coursedir=coursedir, config=c)
converter.start()

which will produce the expected nbgrader assign output:

WARNING:traitlets:Removing existing assignment: /private/tmp/course101/release/ps1
INFO:traitlets:Copying /private/tmp/course101/source/./ps1/jupyter.png -> /private/tmp/course101/release/./ps1/jupyter.png
INFO:traitlets:Updating/creating assignment 'ps1': {}
INFO:traitlets:Converting notebook /private/tmp/course101/source/./ps1/problem1.ipynb
INFO:traitlets:Writing 7167 bytes to /private/tmp/course101/release/./ps1/problem1.ipynb
INFO:traitlets:Converting notebook /private/tmp/course101/source/./ps1/problem2.ipynb
INFO:traitlets:Writing 1541 bytes to /private/tmp/course101/release/./ps1/problem2.ipynb
INFO:traitlets:Setting destination file permissions to 644

This is a first step in getting #555 working.

@jhamrick jhamrick added this to the 0.5.0 milestone Jun 4, 2017
@willingc
Copy link
Member

willingc commented Jun 5, 2017

Fantastic!

@jhamrick jhamrick merged commit 5665555 into jupyter:master Jun 5, 2017
@jhamrick jhamrick deleted the standalone branch June 5, 2017 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants