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

Test kernel picker commands for Installing the Python Extension or Installing Python #10590

Closed
2 tasks done
IanMatthewHuff opened this issue Jun 27, 2022 · 1 comment
Closed
2 tasks done

Comments

@IanMatthewHuff
Copy link
Member

IanMatthewHuff commented Jun 27, 2022

Refs: #10513, #10548, #10583

Complexity: 4

Create Issue


Complexity bumped up a bit for testing the no python situation with a VM.

Previously we provided a fake "Python 3" kernel that we would show in the notebook kernel picker. This fake kernel was used to fix two scenarios (it showed up any time we didn't find any python kernels).

  1. When the python extension was not installed, the "Python 3" dummy kernel would prompt the user to install the Python Extension when executed.
  2. When the python extension was installed, but no python connections were found, the "Python 3" dummy kernel would open a dialog to direct the user to Python.org to install python.

Now that the ability to put commands into the kernel picker is available we've replaced that dummy kernel with two commands.

Testing "Install Python Extension" command:

  1. Uninstall any globally registered jupyter kernels or start with a clean VM (we want our list of kernels to be empty without the Python extension installed)
  2. Install just the Jupyter Extension independently, do not install the Python Extension. If you install the Python Extension you will have to remove Jupyter along with it.
  3. Open up a Python Notebook, there should be a new "Install Python Extension" command in the kernel picker.
  4. If no other kernels are installed the command should be auto selected into the kernel picker
  5. image
  6. Add some basic python code in a cell and press the run button to run the notebook. You should see a modal dialog pop up informing you that you are installing the python extension. If you click ok, the Python extension should be installed. Assuming that some version of python is installed on your system the Python extension should find a kernel and transfer the execution to that kernel to complete without having to click the run button again.
  7. Uninstall the Python extension to clear the kernel that was found (might need to reload the window here as we cache the controllers that we find). This time, instead of clicking the run button click on the command directly and run the command from the kernel picker menu.
  8. image
  9. In this situation you should not see the modal dialog dialog box, the python extension should just be directly installed. The modal was added only to the scenario with the run button as that action might not make it clear to the user that an extension was being installed.
  10. After running python extension should find a kernel (assuming that you have one on the system) and select it.

Testing "Install Python" command:

  1. Recommend using a VM for this testing as uninstalling python on some systems can be dicey
  2. Remove python from the system. Instructions will vary here based on OS. Windows doesn't ship with a python by default, so a Windows VM maybe a good choice here.
  3. Install the Jupyter extension and the Python Extension.
  4. Now in the kernel picker you should see an "Install Python" command.

image

  1. Clicking this command should bring up a dialog to inform the user that python needs to be installed.
  2. image
  3. Note, it's not the best python install experience here, we're working to address this with the Python extension team.

Verifying that the command goes away:

  1. When the Python Extension is installed and a python kernel of some type is found the "Install Python Extension" and "Install Python" commands should not be seen.
  2. When a notebook is opened that has a different language in the metadata (such as C# with .NET interactive) the commands also should not be found. Just uninstall the Python extension and make sure that a C# extension doesn't show the Install Python Extension command.
@IanMatthewHuff
Copy link
Member Author

@meganrogge and @joyceerhl Thanks much!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants