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

Add ability to enable and disable extensions #2409

Merged
merged 13 commits into from Jun 13, 2017

Conversation

@blink1073
Copy link
Member

@blink1073 blink1073 commented Jun 8, 2017

Fixes #2358 and #1192.

Also adds a more verbose output which includes uninstalled and disabled core extensions.

$ jupyter labextension list
JupyterLab v0.23.2
Known labextensions:
   app dir: /Users/ssilvester/anaconda/share/jupyter/lab
        jupyterlab-hub  enabled

Disabled core extensions:
    @jupyterlab/help-extension
@blink1073 blink1073 added this to the Beta milestone Jun 8, 2017
@blink1073 blink1073 changed the title [WIP] Add ability to enable and disable extensions Add ability to enable and disable extensions Jun 8, 2017
@blink1073 blink1073 closed this Jun 8, 2017
@blink1073 blink1073 reopened this Jun 8, 2017
@blink1073 blink1073 mentioned this pull request Jun 9, 2017
5 tasks
Copy link
Contributor

@ellisonbg ellisonbg left a comment

I am trying this locally and wasn't quite sure what to expect. I disabled the help extension, but it was still there in the UI when it launched. Was running in non core-mode for these tests. Playing a bit more to see if I can understand things.


if disabled_core:
print('\nDisabled core extensions:')
[print(item) for item in sorted(disabled_core)]
Copy link
Contributor

@ellisonbg ellisonbg Jun 10, 2017

I would indent these extension by 4 spaces and follow it all by a newline. This part of the output blended into following lines in the terminal making it tough to detect.

@@ -253,10 +308,70 @@ def uninstall_extension(name, app_dir=None):


def list_extensions(app_dir=None):
Copy link
Contributor

@ellisonbg ellisonbg Jun 10, 2017

The improvements in this function are super helpful!

@ellisonbg
Copy link
Contributor

@ellisonbg ellisonbg commented Jun 10, 2017

I did a jupyter lab clean and then disabled the help extension. I see this now:

(python34) $ jupyter labextension list
Known labextensions:

Disabled core extensions:
@jupyterlab/help-extension

But when I run I still see the help extension:

screen shot 2017-06-09 at 6 54 44 pm

The UI shows JupyterLab version 0.23.2. Is this the expected behavior?

@@ -253,10 +308,70 @@ def uninstall_extension(name, app_dir=None):


def list_extensions(app_dir=None):
"""List installed extensions.
"""List the extensions.
Copy link
Contributor

@ellisonbg ellisonbg Jun 10, 2017

Is there a way we can show the JupyterLab version in this information. That would help us in debugging the output of this as it relates to what the user sees in the UI. Also, we might want to somehow expose the app dir in the UI or JS console to help us debug these things. My concern is that users will have multiple builds and we will have a tough time figuring out which is which.

Copy link
Member Author

@blink1073 blink1073 Jun 12, 2017

The app_dir is available in the JS Console in lab.info.

@blink1073
Copy link
Member Author

@blink1073 blink1073 commented Jun 12, 2017

Updated to verify disabling of extensions in the app, made the formatting suggestions.

$ jupyter labextension list
JupyterLab v0.23.2
Known labextensions:
   app dir: /Users/ssilvester/anaconda/share/jupyter/lab
        jupyterlab-hub  enabled

Disabled core extensions:
    @jupyterlab/help-extension

@ellisonbg
Copy link
Contributor

@ellisonbg ellisonbg commented Jun 13, 2017

I finally got this to build, but now see this:

screen shot 2017-06-13 at 2 33 56 pm

@blink1073
Copy link
Member Author

@blink1073 blink1073 commented Jun 13, 2017

Updated to fix the above bug.

@ellisonbg ellisonbg merged commit 943fa6c into jupyterlab:master Jun 13, 2017
2 checks passed
@blink1073 blink1073 mentioned this pull request Jun 14, 2017
@blink1073 blink1073 deleted the disable-extensions branch Jul 10, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants