-
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
Integrate the formgrader into the notebook #622
Conversation
Very cool, excited about this! I haven't looked too closely at the code here, but have some questions that maybe @minrk can help with: First, I was under the impression that serverextensions would automatically inherit the full auth of the notebook server, including its group permissions if run as a service. I think that logic is here: https://github.com/jupyterhub/jupyterhub/blob/master/jupyterhub/singleuser.py#L44 @minrk is there anything that a serverextension needs to do auth wise? Is there a base handler its handlers should inherit from? I ask because there is still a good amount of auth logic in this PR that I was expecting to go away. Second, I think it does make sense to have the FormGrade app remain and be an alias to Cheers, Brian |
Technically, there isn't actually any "auth" going on here -- all the logic is for how to remap the URLs properly, i.e. to go from
I'm not sure I totally understand. The formgrader needs to inherit that information from the notebook so that it can correctly transform its handlers and URLs to point to the correct place. Could you maybe give me an example of how you are envisioning doing the configuration? |
$('<li>') | ||
.append( | ||
$('<a>') | ||
.attr('href', '/formgrader') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This path can be configured on the server extension side. Can it also be configured through the javascript? If not, then it should probably not be configurable on the server extension side at all, because if it is changed there then this will just break.
Oh, I think maybe I understand what you're thinking now. Let me back up and try to explain how everything works currently, and then how I envision it working (this is partially for me too just to put all my thoughts down in the same place). How it currently worksCurrently, when you run JupyterHubWhen using the formgrader with JupyterHub, we run formgrader's own tornado process and proxy to it using JupyterHub. We then need to perform the following things, which are handled in
NotebookWhen using the formgrader with the notebook, there is already a tornado server running (the one launched by the notebook). So, rather than proxying as with JupyterHub, we want to just take the handlers defined by the formgrader and add them as handlers on the notebook as well. We then need to perform the following things, which are handled in
Any actual "authentication" is handled by the notebook server itself (I just tested this though, and currently appears to not the case...). How it will workWhen you run |
Ok, @ellisonbg , I think this is perhaps more along the lines of what you were thinking. I have gotten rid of all the auth stuff entirely, and the formgrader is purely a notebook extension. You can access it by clicking the "Formgrader" tab, which is another tree nbextension: This is actually nice because it lays the groundwork too for incorporating more of the nbgrader stuff in a webapp UI later down the line. |
Given jupyterhub/jupyterhub#924 , I think this should work out-of-the-box with JupyterHub as long as the server extension is installed. Woohoo, that means I can get rid of all the bulky JupyterHub tests! 🎉 |
Tests are passing. Still need to update the docs. FYI, I am not planning to merge this until after 0.4.0 is released. I think this is too major a change to make right before a new release... I would rather have it sit on master for a while first to get a bit of battle-testing. |
I think that makes sense to delay post 0.4.0.
…On Sat, Jan 7, 2017 at 9:13 PM, Jessica B. Hamrick ***@***.*** > wrote:
Tests are passing. Still need to update the docs.
FYI, I am not planning to merge this until after 0.4.0 is released. I
think this is too major a change to make right before a new release... I
would rather have it sit on master for a while first to get a bit of
battle-testing.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#622 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AABr0IZcy390XEMLwQv0H8TS87GlLOlnks5rQGJdgaJpZM4LdhEg>
.
--
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
[email protected] and [email protected]
|
9c06d8a
to
195f50f
Compare
195f50f
to
12aefe6
Compare
94bb2ca
to
701b78b
Compare
701b78b
to
9c149c0
Compare
This PR migrates the
notebookauth.py
andformgrader_extension.py
from https://github.com/jhamrick/nbgrader-demo to the official nbgrader repository.My plan for this is to make
nbgrader formgrade
actually an alias for launching the notebook, except that instead of automatically popping up the notebook tree, it will open the formgrader interface.This is the first step towards addressing what has been discussed in #67.
cc @ellisonbg