Zsailer / jpserver-extension-check

A repository for testing jupyter server extensions.
0 stars 0 forks source link

Check List CLI #2

Open blink1073 opened 4 years ago

blink1073 commented 4 years ago

Example:

jupyter server extension list 1>serverextensions 2>&1
cat serverextensions | grep "nbdime.*OK"
Zsailer commented 4 years ago

All "old" extensions are going to fail this test until they switch from jupyter_notebook_config.d to jupyter_server_config.d.

NBClassic enables the ServerApp to find these extensions, even when their config exists in the old location (jupyter_notebook_config.d), but the jupyter server extension list command won't show these extensions. They only appear with the jupyter serverextension list (no space) entrypoint from the notebook package.

blink1073 commented 4 years ago

Hmm, I think server extension list should show them then with a note.

Zsailer commented 4 years ago

I think the only way to do this is to add a shim directly in jupyter_server. Ideally, we might hijack this in nbclassic, but I think this would be tricky and (possibly) buggy.

Zsailer commented 4 years ago

I'll look at this more this afternoon.

blink1073 commented 4 years ago

Hmm, what happens if a package has metadata for both? Do we load it as a new style extension? If so, then that would be a way for folks to bridge the gap.

Zsailer commented 4 years ago

Hmm, what happens if a package has metadata for both? Do we load it as a new style extension?

That's actually an important question that I haven't verified... The answer should be yes. jupyter_server_config.d should supersede jupyter_notebook_config.d. I'll make sure that's working.

In that case, if the package has metadata for both, both will get installed and jupyter server extension list will show that extension using the config in jupyter_server_config.d. We can make PRs to server extensions to add this config...

Zsailer commented 4 years ago

jupyterlab/nbclassic#22 ensures jupyter_server_config supercedes jupyter_notebook_config. Now, an extension could install both, and jupyter_server will only use the jupyter_server_config content.

Zsailer commented 4 years ago

This doesn't solve the issue here of course. I think this means we need to: 1) submit PRs to all server extensions with the new extension config, 2) add a message to jupyter_server's list command saying this won't list items in jupyter_notebook_config, or 3) add logic in jupyter_server to list these items temporarily...

blink1073 commented 4 years ago

I think server should be able to list them but not have logic to load them, at least during a transitional period.

blink1073 commented 4 years ago

I think it should also warn if it finds them but nbclassic is not installed.