Skip to content

Break the hard dependency on the Jupyter extension #16102

Closed

Description

We will still install it by default, but you will at least have the option to uninstall it.

Activity

  1. luabud commented on Apr 30, 2021

    @luabud
    Member

    I was talking to Claudia Regio (@claudiaregio) about this and it'd be great if we could have a notification that would pop up if users try to use some functionality that is available only in the Jupyter extension but they don't have it installed, such as the data viewer when debugging or when clicking on "Open interactive window" and "Create new Jupyter notebook" buttons from our start page.

    The notification could say "This feature is available in the Jupyter extension, which isn't currently installed." and then we can add a button with "Install Jupyter extension" that would open it in the marketplace (or install it directly if we can). Users can dismiss the prompt if they don't want to.

  2. claudiaregio commented on Apr 30, 2021

    @claudiaregio

    Yeah it would be great if we could do the above. The reason being users likely don't know what features are powered by Python vs. Jupyter and may uninstall Jupyter thinking they don't need it if they don't use notebooks. They may then think something is broken in the Python extension when no longer seeing the entry points they're used to all of a sudden.

  3. brettcannon commented on May 3, 2021

    @brettcannon
    MemberAuthor

    Luciana Abud (@luabud) then we are going to need a spec of exactly what functionality we have to keep a shim in for regardless of whether the Jupyter extension is installed (unless you intend that for all functionality?).

  4. luabud commented on May 4, 2021

    @luabud
    Member

    Great point, that's not for all functionality. Only those who are not obviously done by the Jupyter extension. They are:

    • Open data viewer from the local variable window when debugging
    • "Create a Jupyter notebook" button in the start page
    • "Create new blank notebook" link in the start page
    • "sample notebook" link in the start page.
    • When clicking on the "use the interactive window to develop Python scripts" command.

    We can also edit the block to change the first bullet point below to be: "- You can create cells on a Python file by typing "#%%". Make sure you have the Jupyter extension installed" (or anything else Claudia Regio (@claudiaregio) thinks would be best).

    image

    Claudia Regio (@claudiaregio) please let me know if you can think of other Jupyter entry points in the Python extension that would be exposed to users that don't have the Jupyter extension installed, but that would not work because of that.

  5. joyceerhl commented on May 6, 2021

    @joyceerhl

    Context re: creating a shim for opening the data viewer from the local variable window: currently the 'View in Data Viewer' context menu item is contributed entirely by the Jupyter extension:
    https://github.com/microsoft/vscode-jupyter/blob/844bca1ba9300230ad6b23ddd1c22752f495e31f/package.json#L1334-L1340

    The item's enablement is based on a special property, __vscodeVariableMenuContext, that the Jupyter extension sets at runtime on each variable that passes through our debug adapter tracker:
    https://github.com/microsoft/vscode-jupyter/blob/fb44efc4d052aa08686ff6eb77aac66c5a36cc95/src/client/datascience/jupyter/debuggerVariables.ts#L311-L318

    To shim this, you would need to implement a debug adapter tracker in the Python extension which handles messages sent from the debug adapter to VS Code and sets the __vscodeVariableMenuContext property on each variable (basically replicate part of the code that we have in the Python extension):
    https://github.com/microsoft/vscode-jupyter/blob/fb44efc4d052aa08686ff6eb77aac66c5a36cc95/src/client/datascience/jupyter/debuggerVariables.ts#L201-L206

  6. added and removed
    needs spikeLabel for issues that need investigation before they can be worked on.
    on May 6, 2021
  7. brettcannon commented on May 6, 2021

    @brettcannon
    MemberAuthor

    Since the data viewer won't even show up without Jupyter installed is it still worth shimming it?

  8. joyceerhl commented on May 6, 2021

    @joyceerhl

    As long as the Jupyter extension is installed as an optional dependency by default, the shim helps Python extension users understand that they need to keep the Jupyter extension installed to use that feature, vs uninstalling the Jupyter extension and then filing bugs saying the feature is broken. I imagine this is more of a question for the Python team.

  9. greazer commented on May 7, 2021

    @greazer

    I doubt most customer notice the Jupyter extension at all, and if they do the intersection of those that care to uninstall and those that suddenly notice the data viewer context menu missing is probably really really small.

  10. locked as resolved and limited conversation to collaborators on Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions