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

Add command to update metadata #643

Merged
merged 14 commits into from
Jan 14, 2017
Merged

Add command to update metadata #643

merged 14 commits into from
Jan 14, 2017

Conversation

jhamrick
Copy link
Member

Fixes #627

As suggested by @ellisonbg this adds a command line tool for updating the nbgrader metadata to v1. Importantly, commands such as nbgrader assign and nbgrader autograde will now fail if the metadata hasn't been updated. But, when they fail they will print a message indicating the nbgrader update should be run.

This also updates the metadata in all the notebooks it the repo, which I had forgotten to do previously.

Need to fix some tests still.

@jhamrick jhamrick added this to the 0.4.0 milestone Jan 14, 2017
@jhamrick jhamrick changed the title Metadata Add command to update metadata Jan 14, 2017
@ellisonbg
Copy link
Contributor

ellisonbg commented Jan 14, 2017 via email

@jhamrick
Copy link
Member Author

I have already assigned students first homework for the quarter using the
old metadata scheme. After this PR I can update all my notebooks for future
assignments before they are assigned. But what steps do I need to take to
make sure the first homework doesn't cause any problems? Should I just
finish grading it before using this PR?

After you collect the students' assignments you should be able to run nbgrader update on them, and that shouldn't give any trouble. I would probably back copies of the submitted assignments just in case something goes wrong, though.

This only changes the metadata in the notebook, not the db schema right?

Correct. Just in case there are weird interactions with the database, I will add an additional test to this PR that runs nbgrader assign first (while ignoring validation errors), updates the metadata in the submitted assignments, and then makes sure nbgrader autograde works as expected.

What release will current master lead to?

0.4.0, which I am planning to release very soon (today or tomorrow). It will have all those things you listed. I am not planning on merging the formgrader-as-serverextension stuff until after I make the 0.4.0 release.

@jhamrick
Copy link
Member Author

FYI, if you want to run the autograder without needing to update the metadata, you can pass the --CheckCellMetadata.enabled=False flag.

@jhamrick
Copy link
Member Author

Ok @ellisonbg I am going to merge this. I tried to do an extra-thorough job of covering all the edge cases I could think of with tests to make sure this doesn't cause any unexpected issues. But, it would be great if you could try this out and let me know if you have any issues with it (including just any confusion about what to do) so I know it's been tested on at least one real-world case before 0.4.0 is released 😄

@ellisonbg
Copy link
Contributor

I think this looks good. Will test once it has been merged. Feel free to merge when you think it is ready.

@jhamrick jhamrick merged commit 88c3b2c into jupyter:master Jan 14, 2017
@jhamrick jhamrick deleted the metadata branch January 14, 2017 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document how to update notebooks to v1 nbgrader metadata
2 participants