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

Improve default interpreter path suggestion in quickpick UI #16971

Closed
3 tasks done
karthiknadig opened this issue Aug 13, 2021 · 3 comments · Fixed by #16972
Closed
3 tasks done

Improve default interpreter path suggestion in quickpick UI #16971

karthiknadig opened this issue Aug 13, 2021 · 3 comments · Fixed by #16972
Labels
area-environments Features relating to handling interpreter environments feature-request Request for new features or functionality on-testplan Added to test plan
Milestone

Comments

@karthiknadig
Copy link
Member

karthiknadig commented Aug 13, 2021

  • Move "star" icon next to the suggested interpreter in quickpick list instead of showing it as a new entry
  • Show default Interpreter path suggestion only if user has set python.defaultInterpreterPath entry
  • In the above case show default Interpreter path entry at the top of the list instead, but below "Enter interpreter path" suggestion. Make it the active entry.

https://github.com/microsoft/vscode-python-internalbacklog/issues/277

@karthiknadig karthiknadig added feature-request Request for new features or functionality needs PR triage-needed Needs assignment to the proper sub-team area-environments Features relating to handling interpreter environments labels Aug 13, 2021
@karthiknadig karthiknadig added this to the August 2021 milestone Aug 13, 2021
@karthiknadig karthiknadig self-assigned this Aug 13, 2021
@karthiknadig karthiknadig removed the triage-needed Needs assignment to the proper sub-team label Aug 13, 2021
@karthiknadig karthiknadig added the verification-steps-needed Steps to verify are needed for verification label Aug 19, 2021
@karthiknadig karthiknadig added the verification-needed Verification of issue is requested label Aug 20, 2021
@kimadeline
Copy link

kimadeline commented Aug 20, 2021

### Verification steps:

1. Make sure you have "python.experiments.optInto": ["All"], in your user settings. If not, add it and reload.
2. Create 2 workspaces with Python files in it, and create a virtual environment in one of them (python -m venv .venv). Let's name them with and without

#### 1. python .defaultInterpreterPath not set, no virtual environment

1. Make sure that the python.defaultIntepreterPath entries in your user and workspace settings are at their default value python
2. Open the without workspace, wait for the extension to load, and click on the interpreter in the status bar on the bottom left:
image
3. Make sure that the interpreter that is currently highlighted in the quickpick is the same as the one that is currently selected (same path being shown in Current: ....), that the entry label starts with star ⭐️ , and that its description says "Recommended"
4. Make sure that there is no "Use Python from python.defaultInterpreterPath setting" entry

#### 2. python.defaultInterpreterPath set, no virtual environment

1. Set one of the python.defaultIntepreterPath entries in your user and workspace settings to a valid Python interpreter path that is not python (for example /usr/local/bin/python3)
2. Open the without workspace, wait for the extension to load, and click on the interpreter in the status bar on the bottom left
2. Make sure that the interpreter currently selected has the same path as what's in python.defaultInterpreterPath
2. Make sure there is a "Use Python from python.defaultInterpreterPath setting" entry with the same path, that this entry is highlighted, and that it's the second on the list starting from the top (right below "Enter interpreter path...")

#### 3. python.defaultInterpreterPath not set, with virtual environment

1. Make sure the python.defaultIntepreterPath entry in your user and workspace settings are at their default value python
2. Open the with workspace, wait for the extension to load
3. Make sure that the interpreter in the status bar on the bottom left is the .venv virtual environment you created above, and then click it
3. Make sure that the interpreter that is currently highlighted in the quickpick is the .venv one, that the entry should be the second one from the top, that its label starts with a star ⭐️, and that its description says "Recommended"
3. Make sure that there are no duplicate entries with the same interpreter path
4. Make sure that there is no "Use Python from python.defaultInterpreterPath setting" entry

#### 4. python.defaultInterpreterPath set, with virtual environment

1. Set one of the python.defaultIntepreterPath entries in your user and workspace settings to a valid Python interpreter path that is not python (for example /usr/local/bin/python3)
2. Open the with workspace, wait for the extension to load, and click on the interpreter in the status bar on the bottom left
2. Make sure that the interpreter currently selected has the same path as what's in python.defaultInterpreterPath
2. Make sure there is a "Use Python from python.defaultInterpreterPath setting" entry with the same path, that this entry is highlighted, and that it's the second on the list starting from the top (right below "Enter interpreter path...")
3. Make sure that the third entry is the .venv environment, that its label starts with a star ⭐️, and that its description says "Recommended"

@kimadeline kimadeline removed the verification-steps-needed Steps to verify are needed for verification label Aug 20, 2021
@karthiknadig
Copy link
Member Author

karthiknadig commented Aug 20, 2021

@kimadeline This looks like it has enough steps to be a test plan item on its own. I had to turn one of mine to test-plan item as well.

@kimadeline
Copy link

Sounds good, I'll move it to a test plan. Thanks!

@kimadeline kimadeline added on-testplan Added to test plan and removed verification-needed Verification of issue is requested labels Aug 23, 2021
@kimadeline kimadeline removed their assignment Aug 23, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments feature-request Request for new features or functionality on-testplan Added to test plan
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants