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 feedback to API #1003

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@samhinshaw
Copy link

samhinshaw commented Aug 16, 2018

Add the feedback() command to the nbgrader API, for programmatic feedback generation in Python.

samhinshaw added some commits Aug 16, 2018

@samhinshaw

This comment has been minimized.

Copy link
Author

samhinshaw commented Aug 16, 2018

The API call seems to work correctly, but I had some trouble writing a proper test. Relevant error also occurs when testing locally: https://travis-ci.org/jupyter/nbgrader/jobs/416929082#L1363

@samhinshaw samhinshaw referenced this pull request Aug 24, 2018

Open

Deployment Note #7

@jhamrick

This comment has been minimized.

Copy link
Member

jhamrick commented Oct 6, 2018

Thanks! From a cursory glance this looks great; I'll have a closer look over the next few days.

@jhamrick jhamrick added this to the 0.6.0 milestone Oct 6, 2018

@jhamrick
Copy link
Member

jhamrick left a comment

Looking good!

For the test, I think rather than adding new files autograded-unchanged.ipynb and autograded-changed.ipynb, you should use the existing submitted-unchanged.ipynb and submitted-changed.ipynb and run the autograder on them to produce the autograded versions (you will also need to run the assign method as well to populate the database---have a look at test_autograde for an example).

I would prefer to also not check verbatim the files that are produced by the feedback, as this comparison will fail if anything changes upstream in how nbconvert produces the html. So I think it's sufficient to just check that the files exist rather than comparing them directly (and so you can remove feedback-unchanged.html and feedback-changed.html from the PR as well).

Let me know if you have any more questions or if you need any help!

with temp_attrs(self.coursedir, assignment_id=assignment_id):
app = Feedback(coursedir=self.coursedir, parent=self)
app.force = force
app.create_assignment = create

This comment has been minimized.

@jhamrick

jhamrick Oct 7, 2018

Member

I think create_assignment is only relevant for nbgrader assign and won't do anything for nbgrader feedback, so you should be able to remove this line.

@@ -861,6 +861,36 @@ def assign(self, assignment_id, force=True, create=True):
app.create_assignment = create
return capture_log(app)

def feedback(self, assignment_id, force=True, create=True):

This comment has been minimized.

@jhamrick

jhamrick Oct 7, 2018

Member

I think this function should also take a student_id (as with the autograde method) and only generate feedback for one student at a time.

@samhinshaw

This comment has been minimized.

Copy link
Author

samhinshaw commented Oct 10, 2018

Thank you for the detailed feedback! I will make look into making these changes ASAP.

FYI @ttimbers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment