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

Support wildcard and array options for python.venvPath setting #24369

Open
artsiommiksiuk opened this issue Oct 31, 2024 · 2 comments
Open

Support wildcard and array options for python.venvPath setting #24369

artsiommiksiuk opened this issue Oct 31, 2024 · 2 comments
Assignees
Labels
feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team

Comments

@artsiommiksiuk
Copy link

Following the trail of this issue: #1019, I'd like to request venvPath to support array of paths and wildcards in them.

My use case touches monorepos and as part of monorepo (poly language repo), each project may have one or even many venvs created. Workaround I'm using for now is creating named venvs in the root, which isn't ideal of course, but seems to be do the trick.

Having an ability to have venvs co located with actual projects will remove this artificial limitation. Thus, expected format would be something as discussed in the ticket attached, where we just rename the venvPath to become venvPaths (plural):

"python.venvPaths": ["${workspaceFolder}/apps/*"],

Arrays might be beneficial in case of more granular separation in repo, like "public-apps", "internal-apps".

@artsiommiksiuk artsiommiksiuk added the feature-request Request for new features or functionality label Oct 31, 2024
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Oct 31, 2024
@karthiknadig
Copy link
Member

@artsiommiksiuk We have this setting as "python.venvFolders": [] .

you should be able to pass:

"python.venvFolders": ["${workspaceFolder}/apps/"]

Give that a try.

@karthiknadig karthiknadig self-assigned this Oct 31, 2024
@github-actions github-actions bot added the info-needed Issue requires more information from poster label Oct 31, 2024
@artsiommiksiuk
Copy link
Author

@karthiknadig, thanks for the suggestion! It works only for non wildcard paths. E.g. I have several apps in ${workspaceFolder}/apps folder, therefore I need a way to describe them all once, like with wildcard, instead of ${workspaceFolder}/apps/app1, ${workspaceFolder}/apps/app2.

I think it was also discussed in the ticket I've attached. To sum it up, from both tickets, it would be great to have:

  1. Single venv lookup option, instead of venvFolders and venvPath. Looks like venvFolders is already covering cases of venvPath.
  2. Add wildcards support for venvFolders, so we can specify more complex cases like ${workspaceFolder}/apps/*.

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Nov 4, 2024
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 triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants