jupyter / nbgrader

A system for assigning and grading notebooks
https://nbgrader.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.28k stars 316 forks source link

nbgrader as a service? #949

Open geoff-va opened 6 years ago

geoff-va commented 6 years ago

Is it possible to user nbgrader as a service instead of requiring the entire infrastructure, eg, filesystem layout, database, etc?

The workflow I'm looking for is something more akin to:

Essentially, I'm not interested in the database component - just an interface to say:

Maybe this is possible with the current API and I just haven't determined how to make that work? But so far, seems everything requires a backend of some kind.

jhamrick commented 6 years ago

Unfortunately, this functionality is not currently supported and it would require a major redesign of nbgrader to add it 😞

It is currently possible to generate the assignments without the database (by passing the --no-db flag or setting Assign.no_database = True and SaveCells.enabled = False), but this still requires the filesystem layout.

A similar functionality does not exist for autograding. Much of the heavy lifting that the autograder does is to do things like ensure the student hasn't changed test cells (and overwrite the contents of those cells with what's stored in the database if they have changed). I could have the autograder bypass the database but then you would lose this functionality (and importantly there would be no guarantees against students having done something like change the number of points a cell is worth). A significant redesign of nbgrader could optionally pull this information from a reference notebook rather than from the database, but this would unfortunately be something that I think is outside the current scope of the project.

If you are interested in having the autograder bypass the database (with the caveats above) I can certainly add that feature, and then add a new method to the api (something like autograde_json) which returns the json results of grading. However, it would unfortunately still depend on the filesystem layout.

geoff-va commented 6 years ago

No, I don't think having the autograder bypass those checks is worthwhile. Accurate results are more important than convenient results :) Thanks though!