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

Globally disable installing pytest if missing #24727

Open
adament opened this issue Jan 16, 2025 · 4 comments
Open

Globally disable installing pytest if missing #24727

adament opened this issue Jan 16, 2025 · 4 comments
Assignees
Labels
feature-request Request for new features or functionality info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team

Comments

@adament
Copy link

adament commented Jan 16, 2025

I spend a frustraring amount of time and mental energy having to uninstall packages that this extension "helpfully" installed for me, such as pytest or ipykernel. Would it be possible to add a global toggle to disable this behaviour? I.e. for the extension to only ever advise about missing packages such as pytest and ipykernel and never call out to conda install or similar?

I want to manage my own environments, and make sure that the environment is only changed when I intended to do it. It surprises me everytime this extension feels entitled to modify my environments, and 9 times out 10, I did not want that extension installed and it was only missing because I had the wrong environment activated.

@adament adament added the feature-request Request for new features or functionality label Jan 16, 2025
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jan 16, 2025
@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug and removed feature-request Request for new features or functionality labels Jan 20, 2025
@karthiknadig karthiknadig changed the title Globally disable vscode “helpfully” installing stuff. Globally disable installing pytest if missing Jan 20, 2025
@karthiknadig karthiknadig added feature-request Request for new features or functionality and removed bug Issue identified by VS Code Team member as probable bug labels Jan 20, 2025
@karthiknadig
Copy link
Member

In this extension we only pytest if testing is enabled and it is missing. I agree it should ask before installing pytest.

For ipykernel please file a bug on the Jupyter extension.

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Jan 20, 2025
@karthiknadig
Copy link
Member

Can you provide details of the extension version installed? It seems like this might actually be a bug.

@eleanorjboyd eleanorjboyd self-assigned this Jan 21, 2025
@adament
Copy link
Author

adament commented Jan 23, 2025

I am very sorry, I forgot that of course it is the jupyter extension that installs ipykernel, I will report that there.

As for pytest it just happened to me again when I wanted to configure python testing and as part of that configuration pytest was installed without further confirmation than just choosing pytest as framework and choosing the test folder. Because I had forgotten to activate the correct environment for a newly cloned repository.

Is it relevant that the incorrectly active environment was a pixi environment?

I currently have 2024.222 installed:

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Jan 23, 2025
@eleanorjboyd
Copy link
Member

eleanorjboyd commented Jan 24, 2025

Hi @adament - thanks for submitting the issue!

Going to approach this in a few parts- long term we are moving to this new environments extension and will have a whole flow there that we need to iterate on for package approval and notification of installation. see here

in the meantime I am going to look into why its being triggered too much and add a notification. I will work on this and update this issue as I go. Thanks

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

3 participants