You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Break the hard dependency on the Jupyter extension #16102
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.
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.
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?).
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).
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.
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.
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.
Activity
luabud commentedon Apr 30, 2021
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.
claudiaregio commentedon Apr 30, 2021
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.
brettcannon commentedon May 3, 2021
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?).
luabud commentedon May 4, 2021
Great point, that's not for all functionality. Only those who are not obviously done by the Jupyter extension. They are:
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).
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.
joyceerhl commentedon May 6, 2021
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
__vscodeVariableMenuContextproperty 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
brettcannon commentedon May 6, 2021
Since the data viewer won't even show up without Jupyter installed is it still worth shimming it?
joyceerhl commentedon May 6, 2021
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.
greazer commentedon May 7, 2021
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.