-
Notifications
You must be signed in to change notification settings - Fork 317
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
Conversation
Great! Two questions:
* 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? This only changes the metadata in
the notebook, not the db schema right?
* What release will current master lead to? Basically this quarter I want
to use nbgrader with:
- formgrade as a managed service
- new db subcommands
- new extension installation/enable stuff
- sdist/setup.py fixes.
But I don't want to use the un-merged formgrade as a serverextension stuff
as I haven't tested it enough yet.
How will we manage the versioning of these things?
…On Fri, Jan 13, 2017 at 7:20 PM, Jessica B. Hamrick < ***@***.***> wrote:
Fixes #627 <#627>
As suggested by @ellisonbg <https://github.com/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.
------------------------------
You can view, comment on, or merge this pull request online at:
#643
Commit Summary
- Add update app and throw errors when metadata is old
- Update metadata in docs
- Update metadata for test notebooks
- Add tests for nbgrader update
- Make sure the frontend saves notebooks with valid metadata
- Update documentation for nbgrader update
File Changes
- *M* nbgrader/apps/__init__.py
<https://github.com/jupyter/nbgrader/pull/643/files#diff-0> (2)
- *M* nbgrader/apps/nbgraderapp.py
<https://github.com/jupyter/nbgrader/pull/643/files#diff-1> (11)
- *A* nbgrader/apps/updateapp.py
<https://github.com/jupyter/nbgrader/pull/643/files#diff-2> (77)
- *M* nbgrader/docs/source/build_docs.py
<https://github.com/jupyter/nbgrader/pull/643/files#diff-3> (1)
- *M* nbgrader/docs/source/command_line_tools/index.rst
<https://github.com/jupyter/nbgrader/pull/643/files#diff-4> (1)
- *M* nbgrader/docs/source/user_guide/source/header.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-5> (6)
- *M* nbgrader/docs/source/user_guide/source/ps1/problem1.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-6> (50)
- *M* nbgrader/docs/source/user_guide/source/ps1/problem2.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-7> (14)
- *M* nbgrader/docs/source/user_guide/submitted/bitdiddle/ps1/
problem1.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-8> (57)
- *M* nbgrader/docs/source/user_guide/submitted/bitdiddle/ps1/
problem2.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-9> (20)
- *M* nbgrader/docs/source/user_guide/submitted/hacker/ps1/
problem1.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-10> (57)
- *M* nbgrader/docs/source/user_guide/submitted/hacker/ps1/
problem2.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-11> (20)
- *M* nbgrader/nbextensions/create_assignment/main.js
<https://github.com/jupyter/nbgrader/pull/643/files#diff-12> (1)
- *M* nbgrader/nbformat/common.py
<https://github.com/jupyter/nbgrader/pull/643/files#diff-13> (8)
- *M* nbgrader/nbformat/v1.py
<https://github.com/jupyter/nbgrader/pull/643/files#diff-14> (17)
- *M* nbgrader/preprocessors/checkcellmetadata.py
<https://github.com/jupyter/nbgrader/pull/643/files#diff-15> (13)
- *M* nbgrader/tests/apps/files/submitted-changed.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-16> (23)
- *M* nbgrader/tests/apps/files/submitted-grade-cell-changed.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-17> (23)
- *M* nbgrader/tests/apps/files/submitted-locked-cell-changed.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-18> (23)
- *M* nbgrader/tests/apps/files/submitted-unchanged.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-19> (25)
- *A* nbgrader/tests/apps/files/test-v0.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-20> (309)
- *M* nbgrader/tests/apps/files/test-with-output.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-21> (51)
- *M* nbgrader/tests/apps/files/test.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-22> (51)
- *A* nbgrader/tests/apps/test_nbgrader_update.py
<https://github.com/jupyter/nbgrader/pull/643/files#diff-23> (39)
- *M* nbgrader/tests/nbextensions/test_create_assignment.py
<https://github.com/jupyter/nbgrader/pull/643/files#diff-24> (24)
- *M* nbgrader/tests/preprocessors/files/bad-markdown-cell-1.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-25> (5)
- *M* nbgrader/tests/preprocessors/files/bad-markdown-cell-2.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-26> (3)
- *M* nbgrader/tests/preprocessors/files/blank-grade-id.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-27> (5)
- *M* nbgrader/tests/preprocessors/files/blank-points.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-28> (5)
- *M* nbgrader/tests/preprocessors/files/duplicate-grade-ids.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-29> (9)
- *M* nbgrader/tests/preprocessors/files/manually-graded-code-
cell.ipynb <https://github.com/jupyter/nbgrader/pull/643/files#diff-30>
(6)
- *M* nbgrader/tests/preprocessors/files/submitted-changed.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-31> (23)
- *M* nbgrader/tests/preprocessors/files/submitted-grade-cell-
changed.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-32> (23)
- *M* nbgrader/tests/preprocessors/files/submitted-locked-cell-
changed.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-33> (23)
- *M* nbgrader/tests/preprocessors/files/submitted-unchanged.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-34> (23)
- *D* nbgrader/tests/preprocessors/files/test-v3.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-35> (433)
- *M* nbgrader/tests/preprocessors/files/test.ipynb
<https://github.com/jupyter/nbgrader/pull/643/files#diff-36> (55)
Patch Links:
- https://github.com/jupyter/nbgrader/pull/643.patch
- https://github.com/jupyter/nbgrader/pull/643.diff
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#643>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABr0HgtPl_EJeTUC4AXIqVFsu2tSn5aks5rSD8IgaJpZM4LjgXC>
.
--
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgranger@calpoly.edu and ellisonbg@gmail.com
|
After you collect the students' assignments you should be able to run
Correct. Just in case there are weird interactions with the database, I will add an additional test to this PR that runs
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. |
FYI, if you want to run the autograder without needing to update the metadata, you can pass the |
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 😄 |
I think this looks good. Will test once it has been merged. Feel free to merge when you think it is ready. |
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
andnbgrader autograde
will now fail if the metadata hasn't been updated. But, when they fail they will print a message indicating thenbgrader 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.