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 adoption of the new Python Extension API #11755

Closed
4 of 17 tasks
DonJayamanne opened this issue Oct 24, 2022 · 15 comments
Closed
4 of 17 tasks

Test adoption of the new Python Extension API #11755

DonJayamanne opened this issue Oct 24, 2022 · 15 comments
Assignees
Milestone

Comments

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Oct 24, 2022

Testing adoption of the new Python Extension API for discovering Python Enviornmnents

Refs: #7583

Complexity: 5

Authors: @DonJayamanne

Create Issue


Pre-Test

  • Keep track of the kernels displayed in the kernel picker

Requirements

  • Install pre-release Jupyter extension
  • Install pre-release Python extension
  • Install VS Code Insiders

Scenarios to test

  • Verify the same kernels (kernel specs and Python environments) are still displayed in the kernle picker

  • New Virtual environments are detected and displayed in the Kernel picker
    Note: You need to have already executed a cell in some notebook
    Then create a virtual environment within VS Code
    I.e. the goal is to test detection of new virtual envs after the extension has been used for a while

    • Verify you are prompted to install IPyKernel into this Python enviornment when running a Notebook cell against this kernel
    • Verify you are prompted to install IPyKernel into this Python enviornment when running an Interactive Window cell such a new Python Environment (either re-create a new env or uninstall IPyKernel)
    • Verify you are prompted to install Pandas data frame into this Python enviornment when using the Data Frame viewer
      To test this, create a few variables, at least one with a list e.g. a = [1,2,3] and use the variable viewer to open the variable a
  • New Conda environments are detected and displayed in the Kernle picker
    Note: You need to have already executed a cell in some notebook
    Then create a conda environment within VS Code
    I.e. the goal is to test detection of new virtual envs after the extension has been used for a while

    • Verify you are prompted to install IPyKernel into this Python enviornment when running a Notebook cell against this kernel
    • Verify you are prompted to install IPyKernel into this Python enviornment when running an Interactive Window cell such a new Python Environment (either re-create a new env or uninstall IPyKernel)
    • Verify you are prompted to install Pandas data frame into this Python enviornment when using the Data Frame viewer
      To test this, create a few variables, at least one with a list e.g. a = [1,2,3] and use the variable viewer to open the variable a
  • Re-load VS Code and verify you can pick a Kernel Spec before Python environments
    I'm hoping some machines are slow enough and we can see Kernel Specifications before Python environments in the kernel picker.
    In the past we regressed in this space and Jupyter extension waited for ALL python environnents to be loaded before displaying Kernel Specs on disc.
    We're verifyhing the fact that some kernels will appear before others

  • Verify local kernel specs appera before Remote Kernel specs
    Connect to a local Jupyter server after having started a jupyter server using jupyter notebook --no-browser --NotebookApp.allow_origin=*
    In the past we regressed in this space and Jupyter extension waited for ALL python environnents to be loaded before displaying Kernel Specs on disc.
    We're verifyhing the fact that some kernels will appear before others

  • Verify debugging works and uses the right Python environment

  • Test other parts of the extension that you believe could be impacted by adopting the new Python Extension API

@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug testplan-item and removed bug Issue identified by VS Code Team member as probable bug labels Oct 24, 2022
@DonJayamanne DonJayamanne added this to the October 2022 milestone Oct 24, 2022
@rebornix
Copy link
Member

rebornix commented Oct 25, 2022

@rebornix 's check list

  • Verify the same kernels (kernel specs and Python environments) are still displayed in the kernle picker

  • New Virtual environments are detected and displayed in the Kernel picker
    Note: You need to have already executed a cell in some notebook
    Then create a virtual environment within VS Code
    I.e. the goal is to test detection of new virtual envs after the extension has been used for a while

    • Verify you are prompted to install IPyKernel into this Python enviornment when running a Notebook cell against this kernel
    • Verify you are prompted to install IPyKernel into this Python enviornment when running an Interactive Window cell such a new Python Environment (either re-create a new env or uninstall IPyKernel)
    • Verify you are prompted to install Pandas data frame into this Python enviornment when using the Data Frame viewer
      To test this, create a few variables, at least one with a list e.g. a = [1,2,3] and use the variable viewer to open the variable a
  • New Conda environments are detected and displayed in the Kernle picker
    Note: You need to have already executed a cell in some notebook
    Then create a conda environment within VS Code
    I.e. the goal is to test detection of new virtual envs after the extension has been used for a while

    • Verify you are prompted to install IPyKernel into this Python enviornment when running a Notebook cell against this kernel
    • Verify you are prompted to install IPyKernel into this Python enviornment when running an Interactive Window cell such a new Python Environment (either re-create a new env or uninstall IPyKernel)
    • Verify you are prompted to install Pandas data frame into this Python enviornment when using the Data Frame viewer
      To test this, create a few variables, at least one with a list e.g. a = [1,2,3] and use the variable viewer to open the variable a
  • Re-load VS Code and verify you can pick a Kernel Spec before Python environments
    I'm hoping some machines are slow enough and we can see Kernel Specifications before Python environments in the kernel picker.
    In the past we regressed in this space and Jupyter extension waited for ALL python environnents to be loaded before displaying Kernel Specs on disc.
    We're verifyhing the fact that some kernels will appear before others

  • Verify local kernel specs appera before Remote Kernel specs
    Connect to a local Jupyter server after having started a jupyter server using jupyter notebook --no-browser --NotebookApp.allow_origin=*
    In the past we regressed in this space and Jupyter extension waited for ALL python environnents to be loaded before displaying Kernel Specs on disc.
    We're verifyhing the fact that some kernels will appear before others

  • Verify debugging works and uses the right Python environment

  • Test other parts of the extension that you believe could be impacted by adopting the new Python Extension API


@amunger
Copy link
Contributor

amunger commented Oct 25, 2022

Then create a conda environment within VS Code

How do I do this? I've only ever used the conda terminal to work directly with conda.

Re-load VS Code and verify you can pick a Kernel Spec before Python environments

Python environments is not an event in time. Do you mean before all python environments are loaded in the kernel picker?

@IanMatthewHuff
Copy link
Member

Re-load VS Code and verify you can pick a Kernel Spec before Python environments
I'm hoping some machines are slow enough and we can see Kernel Specifications before Python environments in the kernel picker.

This exhibits on my machine pretty easily. I do see the Kernel Specs and can pick one before the Python Environments load.

@IanMatthewHuff
Copy link
Member

IanMatthewHuff commented Oct 25, 2022

@IanMatthewHuff 's Copy:

  • Verify the same kernels (kernel specs and Python environments) are still displayed in the kernle picker

  • New Virtual environments are detected and displayed in the Kernel picker
    Note: You need to have already executed a cell in some notebook
    Then create a virtual environment within VS Code
    I.e. the goal is to test detection of new virtual envs after the extension has been used for a while

    • Verify you are prompted to install IPyKernel into this Python enviornment when running a Notebook cell against this kernel
    • Verify you are prompted to install IPyKernel into this Python enviornment when running an Interactive Window cell such a new Python Environment (either re-create a new env or uninstall IPyKernel)
    • Verify you are prompted to install Pandas data frame into this Python enviornment when using the Data Frame viewer
      To test this, create a few variables, at least one with a list e.g. a = [1,2,3] and use the variable viewer to open the variable a
  • New Conda environments are detected and displayed in the Kernle picker
    Note: You need to have already executed a cell in some notebook
    Then create a conda environment within VS Code
    I.e. the goal is to test detection of new virtual envs after the extension has been used for a while

    • Verify you are prompted to install IPyKernel into this Python enviornment when running a Notebook cell against this kernel
    • Verify you are prompted to install IPyKernel into this Python enviornment when running an Interactive Window cell such a new Python Environment (either re-create a new env or uninstall IPyKernel)
    • Verify you are prompted to install Pandas data frame into this Python enviornment when using the Data Frame viewer
      To test this, create a few variables, at least one with a list e.g. a = [1,2,3] and use the variable viewer to open the variable a
  • Re-load VS Code and verify you can pick a Kernel Spec before Python environments
    I'm hoping some machines are slow enough and we can see Kernel Specifications before Python environments in the kernel picker.
    In the past we regressed in this space and Jupyter extension waited for ALL python environnents to be loaded before displaying Kernel Specs on disc.
    We're verifyhing the fact that some kernels will appear before others

  • Verify local kernel specs appera before Remote Kernel specs
    Connect to a local Jupyter server after having started a jupyter server using jupyter notebook --no-browser --NotebookApp.allow_origin=*
    In the past we regressed in this space and Jupyter extension waited for ALL python environnents to be loaded before displaying Kernel Specs on disc.
    We're verifyhing the fact that some kernels will appear before others

  • Verify debugging works and uses the right Python environment

  • Test other parts of the extension that you believe could be impacted by adopting the new Python Extension API

@amunger
Copy link
Contributor

amunger commented Oct 25, 2022

Verify the same kernels (kernel specs and Python environments) are still displayed in the kernle picker

There are more kernels listed now since it's finding all venvs in other workspaces, but I think you expected that?

@IanMatthewHuff
Copy link
Member

How do I do this? I've only ever used the conda terminal to work directly with conda.

Python did add a new Python Create Environment Command, I'm testing both that and creating one manually.

@amunger
Copy link
Contributor

amunger commented Oct 25, 2022

Here is my kernel loading experience, zero for quite a while, then the cached kernel(I assume), then a julia kernel and then all the rest.

KernelLoading

@rebornix
Copy link
Member

rebornix commented Oct 25, 2022

I couldn't get conda to work, similar to what @amunger was seeing. Other than this, it works great in overall, filed a couple of issues but they don't seem to be new.

Good job @DonJayamanne 👍

@amunger
Copy link
Contributor

amunger commented Oct 25, 2022

Verify local kernel specs appera before Remote Kernel specs

A few show up before the remotes are listed, but the remotes come in quite a bit before the bulk of the local ones show up.

@amunger amunger removed their assignment Oct 25, 2022
@amunger
Copy link
Contributor

amunger commented Oct 25, 2022

also had the same feedback as @IanMatthewHuff mentioned at one point - the list is a lot bigger now, and it is difficult to find my typical kernel that I use since it's buried within all the kernels from other workspaces

@roblourens
Copy link
Member

Testing the jupyter web extension providing completions when typing in a notebook.

This isn't actually related right?

@DonJayamanne
Copy link
Contributor Author

Oops, no, you're right

@roblourens
Copy link
Member

I literally spent all afternoon and evening trying to get python installed in WSL. I finally have a working setup, was able to get started, will finish testing first thing tomorrow.

@roblourens
Copy link
Member

roblourens commented Oct 26, 2022

Same question as Aaron about

Re-load VS Code and verify you can pick a Kernel Spec before Python environments

#11755 (comment)

Does this just mean I should see environments loaded gradually, rather than none until they are all available? Or is this specifically about the ordering of particular types of environments, like are you looking for kernel specs that I registered to show up before global Python environments?

@DonJayamanne
Copy link
Contributor Author

Does this just mean I should see environments loaded gradually, rather than none until they are all available?

If you are lucky to have a slow machine, then yo'll see environments load gradually.
Its unlikely you'll have none, as the Python Extension API returns the active interpreter pretty quickly, hence you'll most likely see at least one python env in the list.

Re-load VS Code and verify you can pick a Kernel Spec before Python environments

Sorry, I should have been more specific. I shoudl have stated that you can pick kernel specs before ALL python envrionmetns are loaded. I.e. over time you should see more & more python envs getting added to the list.
However kernel specs should be loaded very quickly in comparison.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 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