jupyterhub / nbgitpuller

Jupyter server extension to sync a git repository one-way to a local path
https://nbgitpuller.readthedocs.io
BSD 3-Clause "New" or "Revised" License
205 stars 84 forks source link

Launch Notebook7 using nbgitpuller link generator #308

Closed balajialg closed 1 year ago

balajialg commented 1 year ago

Proposed change

I would like to launch a beta version of Jupyter Notebook 7 using the nbgitpuller link for testing the a11y upgrades in JN7. https://nbgitpuller.readthedocs.io/en/latest/link.html does not have an entry for launching notebook 7.

Alternative options

There is an entry for "RetroLab". Should I use that to generate links that launch Notebook 7 in hubs where the beta version of JN7 got installed?

Who would use this feature?

We are planning to test the latest stable version of JL 4.0 and JN 7.0 in a summer course if everything falls into place before June 20th. In addition, I would like to use this functionality to test a11y upgrades in Notebook 7 and share these links with instructors who are interested to check the latest updates to the notebook.

(Optional): Suggest a solution A similar change to the nbgitpuller web extension is appreciated - https://github.com/yuvipanda/nbgitpuller-link-generator-webextension

yuvipanda commented 1 year ago

Do you know if the URL structure changes for notebook 7? If not, “classic notebook” should just go to notebook 7

balajialg commented 1 year ago

Thanks, @yuvipanda! URL for the classic notebook and notebook 7 remains the same except for the query string "?factory=Notebook" added to the end of the URL. https://a11y.datahub.berkeley.edu throws a 404 error when I generate a link for a repo using the link generator. I am not sure whether this is due to the a11y hub config (nbgitpuller seems to be installed in this hub) or due to the query string.

yuvipanda commented 1 year ago

Interesting! Do you know if the ?factory=Notebook will be needed long term? @jtpio might know?

jtpio commented 1 year ago

Do you know if the ?factory=Notebook will be needed long term?

Normally it's not needed by default. Documents should open with the default factory (Notebook for a .ipynb, CSV viewer for .csv, ...).

There was a fix recently to avoid appending ?factory=Notebook when it is not needed, which will be available in the next release: https://github.com/jupyter/notebook/pull/6873

yuvipanda commented 1 year ago

@balajialg ah, perhaps then we just need to wait for the next release?

balajialg commented 1 year ago

Thanks a lot for the inputs @yuvipanda @jtpio. I will eagerly wait for the next release of Jupyter Notebook 7.

jtpio commented 1 year ago

I just released 7.0.0b3 if you want to try it out: https://github.com/jupyter/notebook/releases/tag/v7.0.0b3

balajialg commented 1 year ago

Thanks a lot @jtpio! I will check the latest version and report back if that solves the issue (hopefully - early next week).

balajialg commented 1 year ago

Quick update - We upgraded to JN 7.0.0b3 and still faced the 404 error when launched via nbgitpuller. After detailed investigation, @ryanlovett created this PR to upgrade nbclassic and Jupyterhub to the latest version in the hub image which solved this issue.

Selecting the "classic notebook" option in the nbgitpuller link generator launches JN7 directly in the hub! Thanks everyone for your support.