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

Port the notebook extensions to JupyterLab #1006

Closed
fperez opened this issue Aug 30, 2018 · 73 comments · Fixed by #1588
Closed

Port the notebook extensions to JupyterLab #1006

fperez opened this issue Aug 30, 2018 · 73 comments · Fixed by #1588

Comments

@fperez
Copy link
Member

fperez commented Aug 30, 2018

This is so we can discuss whether this is the right path to follow for nbgrader, I'm not 100% sure yet but at least we can come to a decision here...

We're still using nbgrader at Cal quite a bit, and as I consider moving the students more to JupyterLab as their "daily driver", the absence of the student-facing extension for submitting notebooks is becoming a more relevant issue.

Curious what @jhamrick @ellisonbg think in this context - how realistic would it be to put some cycles into porting the extension? This is more of an nbgrader than a Lab issue, but it's turning out to be kind of a blocker to our use of Lab by default (which I really want to do :).

CC @jasongrout @ian-r-rose as per recent discussions on blockers and extensions...

@fperez
Copy link
Member Author

fperez commented Aug 30, 2018

ps - forgive me if it's been discussed here already, I did a search and didn't find it but feel free to point me to the right location.

@ellisonbg
Copy link
Contributor

ellisonbg commented Aug 30, 2018 via email

@fperez
Copy link
Member Author

fperez commented Aug 30, 2018

It's the notebook validation button in JS, that gives this kind of feedback:

image

It's really just a thin layer atop the cmd line validation, so we're considering telling the students to run it at the cmd line... But I was wondering if anyone had thought about porting it over to Lab.

@jhamrick
Copy link
Member

jhamrick commented Oct 6, 2018

I unfortunately don't have the cycles to work on porting this over, but I agree it is something that should probably be done...

@jhamrick jhamrick added this to the 0.6.0 milestone Oct 6, 2018
@jhamrick jhamrick changed the title Port at least the student-facing extension to JupyterLab? Port at least the notebook extensions to JupyterLab May 28, 2019
@jhamrick jhamrick changed the title Port at least the notebook extensions to JupyterLab Port the notebook extensions to JupyterLab May 28, 2019
@jhamrick jhamrick modified the milestones: 0.6.0, 0.7.0 Jun 1, 2019
@murhum1
Copy link

murhum1 commented Aug 8, 2019

Might do some work on this - thought I'd start by trying to bring the assignments tab and maybe the notebook validate button to lab side. I'll update once (if) I get anything meaningful done!

@perllaghu
Copy link
Contributor

What would be really useful is to get the assignments [and exchange] code and the formgrader code to be written in the same way, using the same style & idioms: they were written separately, and are very different.

I know that jupyterlab is all angular & typescript in the UI, so there's a chunk of work to just move from javascript to typescript!

(if you can also have space in your thinking for making the exchange a proper API, rather than assumed to be copying files on disk, that would be awesome [it's an outstanding piece of work that was raised at the Edinburgh hackaton... however we've been side-tracked by work & an impending new academic year....])

.... but absolutely: getting nbgrader into jupyterlabs would be fanTASTic!

@pdeitel
Copy link

pdeitel commented Dec 24, 2019

Just checking whether there are more updates on this.

@rkdarst
Copy link
Contributor

rkdarst commented Dec 25, 2019 via email

@pdeitel
Copy link

pdeitel commented Mar 11, 2020

Since it's now March, just thought I'd check in again.

@jasongrout
Copy link
Member

I don't know of any update, but since this brought this to the top of my inbox, I'll reply to a comment earlier:

I know that jupyterlab is all angular & typescript in the UI, so there's a chunk of work to just move from javascript to typescript!

JupyterLab is typescript and Lumino, but you can implement extensions in straight javascript if you like.

@Lawrence37
Copy link
Contributor

Hello everyone. @aalmanza1998, @lxylxy123456, @rkevin-arch, and I will be porting the nbgrader UI to JupyterLab as part of a project for integrating nbgrader with Kubernetes and JupyterLab. We are wrapping up the Kubernetes portion (see jupyterhub/zero-to-jupyterhub-k8s#1556) and starting the JupyterLab part. We hope to provide periodic updates on our progress.

Before we dive too deep, we'd like to gather comments and pointers from the community. Your input will be much appreciated!


Might do some work on this - thought I'd start by trying to bring the assignments tab and maybe the notebook validate button to lab side. I'll update once (if) I get anything meaningful done!

@murhum1 Sounds great! Any updates?

@TRM13
Copy link

TRM13 commented Apr 13, 2020

Thank you very much @aalmanza1998, @lxylxy123456, @rkevin-arch. I've "sidegraded" to Notebook so I can do NBgrader but the Lab interface is my favorite by a large margin. I look forward to kicking the tires on your releases.
I really like the idea of using Kubernetes for isolation with NBgrader.
Thanks again

@perllaghu
Copy link
Contributor

Some thoughts, observations, ..... and questions!

Are you thinking of writing another nbgrader, to be labs-compatible, or writing parallel extensions to enable functionality in either interface? By this, I mean if I switch from /tree to /lab, will I see the same assignments, use the same validators, and configure things the same way... or will they be different?

Write tests. Lots and lots of tests. Our own nbexchange release doesn't have a master branch yet because we don't have enough tests! (If you're really brave - go for a test-driven development environment: you know how the various components currently work - so you can write tests to check them, and then code to pass the tests)

Don't paint yourself into a corner: make sure your exchange is pluggable* (see the afore-mentioned PR for that in the current system). Are there any other aspects that can [should] be abstracted out?

Documentation: It's horrible to write, but ensure that either the existing docs remain valid for the process, or that you have it covered.

Will any of the the areas you'll work in, for lab-mode, actually benefit from improvement in both interfaces, for the code-base as a whole?

[*] To me, having the Notebook App talk to an abstracted API makes even more sense in a K8 cluster: why tightly couple the exchange to the hub when you're in a cloud?

@Lawrence37
Copy link
Contributor

We want to add a UI (labextensions) to nbgrader for JupyterLab and use the same back-end. The assignments, validators, configuration, etc. will be the same. I see that there are tests for the nbextensions. We will write similar tests for the labextensions. We will also write documentation on how to install the labextensions and use nbgrader with the JupyterLab interface.

Don't paint yourself into a corner: make sure your exchange is pluggable* (see the afore-mentioned PR for that in the current system). Are there any other aspects that can [should] be abstracted out?

The ngshare exchange uses the same pluggable exchange as nbexchange. I hope this encourages the adoption of the pluggable exchange into nbgrader. The JupyterLab part of our project is probably independent of the exchange back-end, so there shouldn't be a problem with compatibility.

Will any of the the areas you'll work in, for lab-mode, actually benefit from improvement in both interfaces, for the code-base as a whole?

At this point, I don't have any improvements in mind. We shall see what ideas come up when we port the extensions.

@perllaghu
Copy link
Contributor

We want to add a UI (labextensions) to nbgrader for JupyterLab and use the same back-end. The assignments, validators, configuration, etc. will be the same.

Excellent!
(and this will be a superb addition.)

You'll discover that the formgrader code and the assignments code were written by different people (I thought there was an issue about this, but U can't find it) ... feel free to ignore that & make the two halves of the system consistent :)

The ngshare exchange uses the same pluggable exchange as nbexchange. I hope this encourages the adoption of the pluggable exchange into nbgrader. The JupyterLab part of our project is probably independent of the exchange back-end, so there shouldn't be a problem with compatibility.

  1. I'd love to see more versions/variations of an external exchange .... it's what keeps these exosystems alive.
  2. The one I will note is authentication - not everything will authenticate against the hub. (we don't, for example: we have an external LTI authenticator & then a local cookie )

Will any of the the areas you'll work in, for lab-mode, actually benefit from improvement in both interfaces, for the code-base as a whole?

At this point, I don't have any improvements in mind. We shall see what ideas come up when we port the extensions.

Excellent....

Most of my questions/observations are just to help clarify what you're aiming to do from the outset, and make it harder for "mission-creep" to edge in.

We will definitely be interested in what you come up with, and will be glad you share

@sputnik62
Copy link

sputnik62 commented May 14, 2020

Looking forward to seeing your work. We at the IBM Skills Network wanted to use nbgrader for a while but we are all in on JupyterLab. Have been since v0.23 or something like that.

@eliaswimmer
Copy link

We are working on a new grader service for JupyterHub/Jupyterlab, I hope we will soon be able to publish it.

@davidbrochart
Copy link
Member

Great @eliaswimmer! Is is going to be a port of nbgrader, or something new?

@eliaswimmer
Copy link

It's nbgrader/nbconvert based and works well with Kubernetes. Autograding tasks can be spawned in Kubernetes pods. It's using git for managing the assignments, allows group exercises etc.

@brichet
Copy link
Contributor

brichet commented Apr 19, 2022

There are already several extensions working for JupyterLab from @Lawrence37 and @aalmanza1998 contribution in https://github.com/LibreTexts/nbgrader-to-jupyterlab/tree/lab-common.
These extensions are able to query the existing server extensions, if we fix #1465.
The formgrader extension remains to be done for now, but could be ported (for a first version) by integrating the existing one in a JupyterLab tab.

@brichet brichet mentioned this issue Apr 28, 2022
5 tasks
@orboan
Copy link

orboan commented Apr 30, 2022

We are working on a new grader service for JupyterHub/Jupyterlab, I hope we will soon be able to publish it.

Any updates on this?

@eliaswimmer
Copy link

eliaswimmer commented May 18, 2022

https://github.com/TU-Wien-dataLAB/Grader-Service
This is still mainly untested, I hope we will be able to use our new service for the winter term.
Testing and contribution welcome!

@jhamrick
Copy link
Member

Hi all, as of #1588 JupyterLab is now officially supported! Please test it out, and if you run into any problems open some issues---the plan is to iterate a bit on main before releasing 0.8.0 which will be the official release supporting JupyterLab.

@orboan
Copy link

orboan commented Jun 16, 2022

Congrats Jessica, very good news indeed. I am looking forward to test it in my school. Thanks for your hard work and to all contributors.

@jhamrick
Copy link
Member

Don't thank me---all the hard work was done by @brichet, @fcollonval, @lxylxy123456, @Lawrence37, and @aalmanza1998 ! I just reviewed the PR 😉

@orboan
Copy link

orboan commented Jun 16, 2022

Don't thank me---all the hard work was done by @brichet, @fcollonval, @lxylxy123456, @Lawrence37, and @aalmanza1998 ! I just reviewed the PR 😉

Thanks for the clarification !

Then lots of thanks and big congratulations to @brichet, @fcollonval, @lxylxy123456, @Lawrence37, and @aalmanza1998

Today is a happy day !!

@fperez
Copy link
Member Author

fperez commented Jun 22, 2022

Indeed, huge thanks to all the team who made this possible (@jhamrick very much included 😄) - it's fantastic to see key tools like nbgrader move forward to the JupyterLab-based infrastructure, which will bring us a number of benefits.

It would be great to have input once a release is made on how the real-world experience of regular users is, in case there are any rough edges that warrant attention; we want the transition to be a happy process for all involved!

@hoffm386
Copy link

@jhamrick this is great news! Do you have a prediction of when the 0.8 release will be? We are starting on a project of updating our environments and would love to use JupyterLab if possible, but that will depend on the timing

@spsuri
Copy link

spsuri commented Jul 25, 2022

Hi all, as of #1588 JupyterLab is now officially supported! Please test it out, and if you run into any problems open some issues---the plan is to iterate a bit on main before releasing 0.8.0 which will be the official release supporting JupyterLab.

I have tried taking the pull from a commit but unable to integrate it. Can you guide on how to port nbgrader extension to jupyterlab

@brichet
Copy link
Contributor

brichet commented Aug 12, 2022

The simplest way may be to install it from the prerelease : pip install --pre nbgrader.

You should install it in a fresh environment, some dependencies are not compatible with the notebook version.

You can find some information about settings here... except for the installation command where the --pre argument is missing.

@jhamrick
Copy link
Member

@hoffm386 as @brichet mentioned there is a pre-release out already, so you could consider using that! In terms of the full release, I'm not sure. I think once there's been "sufficient" testing we can convert it to a full release, but I am not sure if we're at that point yet, or if there's anything else pressing that needs to get done first. Perhaps @brichet and @jtpio could comment on the status?

@brichet
Copy link
Contributor

brichet commented Aug 19, 2022

We are currently working on making it compatible with the future versions of Jupyterlab (4) and Notebook (7).
I don't know if we should wait for the release of these projects (and I don't know when it will be, maybe @jtpio knows more about it).

The two options I see are :

  • waiting for jupyterlab 4 and notebook 7 before releasing nbgrader 8.
  • releasing nbgrader 8 as compatible with notebook < 7 and jupyterlab < 4, and start a version 9 for the compatibility with jupyterlab 4 and notebook 7.

@jhamrick
Copy link
Member

If it's unclear what the timeline is for jupyterlab 4 and notebook 7, releasing nbgrader 8 now seems like a good option to me. That'll also get a wider range of people starting to use the jupyterlab extensions allowing us to battle-test them more.

@jtpio
Copy link
Member

jtpio commented Aug 19, 2022

The best estimate for now would be a JupyterLab 4.0 beta some time in September. Since it is based on JupyterLab, Notebook v7 will be updated a couple of days after each JupyterLab release. After that it'll probably be a couple of weeks more (at least 2 weeks beta, 2 weeks rc) before the final release.

If we're happy with the current state of main we could indeed proceed with the nbgrader 8 final release.

@jasongrout
Copy link
Member

releasing nbgrader 8 as compatible with notebook < 7 and jupyterlab < 4, and start a version 9 for the compatibility with jupyterlab 4 and notebook 7.

From the peanut gallery: given that it may take people a while to migrate to jlab 4 even after it is released (for many probably not until next academic year?), and some may want to stay on notebook 6 for a while, I think it makes a lot of sense to release for jlab 3 and notebook 6 if possible.

@jhamrick
Copy link
Member

jhamrick commented Aug 19, 2022

I'm happy then to do the full release now, if you'd like to go ahead with it @brichet !

@brichet
Copy link
Contributor

brichet commented Aug 22, 2022

Version v0.8.0 is released : https://github.com/jupyter/nbgrader/releases/tag/v0.8.0.

@rubdos
Copy link

rubdos commented Sep 21, 2022

Version v0.8.0 is released : https://github.com/jupyter/nbgrader/releases/tag/v0.8.0.

Any chance we'll see this on conda? It currently still lists 0.7.1, and I'd like to test it thoroughly before the academic year starts :-D

@jtpio
Copy link
Member

jtpio commented Sep 26, 2022

Any chance we'll see this on conda? It currently still lists 0.7.1, and I'd like to test it thoroughly before the academic year starts :-D

Looks like there is a draft PR to update to 0.8.0: conda-forge/nbgrader-feedstock#56

@brichet
Copy link
Contributor

brichet commented Sep 28, 2022

Good new, nbgrader v0.8.1 is available on conda, thanks to @blink1073.

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

Successfully merging a pull request may close this issue.