-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
PR: Auto-install spyder-kernels into external environment #24810
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
base: master
Are you sure you want to change the base?
Conversation
ce7060e to
863f39c
Compare
Thanks for checking on this, @dalthviz.
I assume that you mean multiple consoles connected to the same kernel or using the same environment. I'm not sure what to do about that. Since this is being handled by the client, multiple clients using the same environment could independently offer to install spyder-kernels. Maybe some kind of check could be run through the main widget that would prevent multiple offerings on the same environment?
I don't think this has anything to do with multiple consoles. I'm glad that you saw this. I think I saw this as well, but not sure how it's happening, since each individual widget (
I see. Let's talk about the desired UX with the group and see what we can do about it. |
|
UI wise, the message looks rather different from the other messages we show in the console, in terms of layout, background, text, etc, where it looks more like regular console content than the other pane messages we show (errors, empty pane messages, help pane empty message, etc). Maybe for a followup PR for Carlos/Andres to work on, but perhaps some low hanging fruit fixes would be practical in this PR, e.g. centering the text and perhaps adding a border like the other error/informational messages. Also, to be clearer that clicking the "OK" button will actually execute the install on their environment rather than merely just accepting that the environment is outdated, you might want to rename it "Install". Or, perhaps to further clarify what the other option is and that it isn't just giving up, the options could be "Install automatically" and "Install manually"?
It does seem to me that this scenario isn't that likely in practice for actual users, since they are going to get the message on the first console they start in that environment and presumably going to decide to either accept and let it finish or dismiss it before opening another one in the same environment, expecting different results. However, it does seem worth at least making sure that unexpected behavior doesn't result if the user requests multiple installations, e.g. by disabling the "OK" button or not offering the installation if the user opens another console, though it would be better to show a dedicated message that an install is in progress and ideally auto-restart the console when it completes. |
5ec659a to
18e709c
Compare
…environment does not have the appropriate spyder-kernels version.
…pe'" for pip Python 3.9.
kernel_spec.argv will no longer reset the configuration to the default interpreter if spyder-kernels version is not satisfied in the custom interpreter. Rather a SpyderKernelVersionError is raised to branch the code execution to potentially install spyder-kernels.
Adding infowidget to layout in refresh_container is redundant and results in infowidget placed below installwidget.
…ling spyder-kernels. Note that setIconVisibleInMenu(False) at SpyderAction instantiation results in the environment menu item not reflecting its enabled state in the menubar. Removing this, or setting it to True (QAction defaults to True), produces the correct behavior. Also note that menubar items still do not show the icon for macOS (as desired) because setIconVisibleInMenu is called in set_menu_icons.
This reverts commit 2ac8acd.
kernel_spec.argv will no longer reset the configuration to the default interpreter if spyder-kernels version is not satisfied in the custom interpreter. Rather a SpyderKernelVersionError is raised to branch the code execution to potentially install spyder-kernels." This reverts commit dde7a42.
68cfcc0 to
e182791
Compare
|
I don't know why the tests are taking so long and result in being cancelled. The failing tests pass locally on my Windows machine 🤷🏼 . |


Description of Changes
When the selected Python interpreter environment does not have a compatible
spyder-kernelsversion installed, offer to install it.If the user rejects the installation, then the conventional error is displayed.
If the user accepts the installation, then
spyder-kernelsis installed into the environment from the same channel as the environment Python.Upon successful completion, the kernel is automatically connected.
Issue(s) Resolved
Fixes #22855