Skip to content

Commit 405bc4c

Browse files
authored
Merge branch 'main' into bizarre-smelt
2 parents a72947b + ac8abbd commit 405bc4c

10 files changed

Lines changed: 307 additions & 75 deletions

File tree

.github/workflows/issue-labels.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,7 @@
2727
"prettier.tabWidth": 4,
2828
"python-envs.defaultEnvManager": "ms-python.python:venv",
2929
"python-envs.pythonProjects": [],
30-
"git.branchRandomName.enable": true
30+
"git.branchRandomName.enable": true,
31+
"git.branchProtection": ["main"],
32+
"git.branchProtectionPrompt": "alwaysCommitToNewBranch"
3133
}

README.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,33 @@ All commands can be accessed via the Command Palette (`ctrl/cmd + Shift + P`):
125125

126126
## Settings Reference
127127

128-
| Setting (python-envs.) | Default | Description |
129-
| --------------------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
130-
| defaultEnvManager | `"ms-python.python:venv"` | The default environment manager used for creating and managing environments. |
131-
| defaultPackageManager | `"ms-python.python:pip"` | The default package manager to use for installing and managing packages. This is often dictated by the default environment manager but can be customized. |
132-
| pythonProjects | `[]` | A list of Python workspaces, specified by the path, in which you can set particular environment and package managers. You can set information for a workspace as `[{"path": "/path/to/workspace", "envManager": "ms-python.python:venv", "packageManager": "ms-python.python:pip"]}`. |
133-
| terminal.showActivateButton | `false` | (experimental) Show a button in the terminal to activate/deactivate the current environment for the terminal. This button is only shown if the active terminal is associated with a project that has an activatable environment. |
134-
| python-envs.terminal.autoActivationType | `command` | Specifies how the extension can activate an environment in a terminal. Utilizing Shell Startup requires changes to the shell script file and is only enabled for the following shells: zsh, fsh, pwsh, bash, cmd. When set to `command`, any shell can be activated. This setting applies only when terminals are created, so you will need to restart your terminals for it to take effect. To revert changes made during shellStartup, run `Python Envs: Revert Shell Startup Script Changes`. |
128+
### Python Environments Settings (`python-envs.`)
129+
130+
| Setting (python-envs.) | Default | Description |
131+
| ---------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
132+
| defaultEnvManager | `"ms-python.python:venv"` | The default environment manager used for creating and managing environments. |
133+
| defaultPackageManager | `"ms-python.python:pip"` | The default package manager to use for installing and managing packages. This is often dictated by the default environment manager but can be customized. |
134+
| pythonProjects | `[]` | A list of Python workspaces, specified by the path, in which you can set particular environment and package managers. You can set information for a workspace as `[{"path": "/path/to/workspace", "envManager": "ms-python.python:venv", "packageManager": "ms-python.python:pip"]}`. |
135+
| terminal.showActivateButton | `false` | (experimental) Show a button in the terminal to activate/deactivate the current environment for the terminal. This button is only shown if the active terminal is associated with a project that has an activatable environment. |
136+
| terminal.autoActivationType | `"command"` | Specifies how the extension can activate an environment in a terminal. Accepted values: `command` (execute activation command in terminal), `shellStartup` (`terminal.integrated.shellIntegration.enabled` successfully enabled or we may modify shell startup scripts ), `off` (no auto-activation). Shell startup is only supported for: zsh, fish, pwsh, bash, cmd. **Takes precedence over** `python.terminal.activateEnvironment`. Restart terminals after changing this setting. To revert shell startup changes, run `Python Envs: Revert Shell Startup Script Changes`. |
137+
| alwaysUseUv | `true` | When `true`, [uv](https://github.com/astral-sh/uv) will be used to manage all virtual environments if available. When `false`, uv will only manage virtual environments explicitly created by uv. |
138+
| globalSearchPaths | `[]` | Global search paths for Python environments. Array of absolute directory paths to search for environments at the user level. This setting is merged with the legacy `python.venvPath` and `python.venvFolders` settings. |
139+
| workspaceSearchPaths | `[]` | Workspace search paths for Python environments. Can be absolute paths or relative directory paths searched within the workspace. |
140+
141+
### Supported Legacy Python Settings (`python.`)
142+
143+
The following settings from the Python extension (`python.*`) are also supported by Python Environments.
144+
145+
| Setting (`python.`) | Default | Description |
146+
| ------------------------------ | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
147+
| condaPath | `""` | Path to the conda executable. Used to locate and run conda for environment discovery and management. |
148+
| defaultInterpreterPath | `"python"` | Path to the default Python interpreter. |
149+
| envFile | `"${workspaceFolder}/.env"` | Path to the environment file (`.env`) containing environment variable definitions. Used with `python.terminal.useEnvFile` to inject environment variables into terminals. |
150+
| terminal.activateEnvironment | `true` | Legacy setting for terminal auto-activation. If `python-envs.terminal.autoActivationType` is not set and this is `false`, terminal auto-activation will be disabled. **Superseded by** `python-envs.terminal.autoActivationType` which takes precedence when configured. |
151+
| terminal.executeInFileDir | `false` | When `true`, the terminal's working directory will be set to the directory containing the Python file being executed, rather than the project root directory. |
152+
| terminal.useEnvFile | `false` | Controls whether environment variables from `.env` files (specified by `python.envFile`) are injected into terminals. |
153+
| venvFolders | `[]` | Array of folder names to search for virtual environments. These folders are searched in addition to the standard locations. **Note:** This setting is merged with `python-envs.globalSearchPaths`. Consider migrating to `python-envs.globalSearchPaths` for future compatibility. |
154+
| venvPath | `""` | Path to a folder containing virtual environments. **Note:** This setting is merged with `python-envs.globalSearchPaths`. Consider migrating to `python-envs.globalSearchPaths` for future compatibility. |
135155

136156
## Extensibility
137157

package-lock.json

Lines changed: 7 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,18 @@
111111
"default": false,
112112
"scope": "resource"
113113
},
114-
"python-env.globalSearchPaths": {
114+
"python-envs.globalSearchPaths": {
115115
"type": "array",
116-
"markdownDescription": "%python-env.globalSearchPaths.description%",
116+
"markdownDescription": "%python-envs.globalSearchPaths.description%",
117117
"default": [],
118118
"scope": "machine",
119119
"items": {
120120
"type": "string"
121121
}
122122
},
123-
"python-env.workspaceSearchPaths": {
123+
"python-envs.workspaceSearchPaths": {
124124
"type": "array",
125-
"description": "%python-env.workspaceSearchPaths.description%",
125+
"description": "%python-envs.workspaceSearchPaths.description%",
126126
"default": [],
127127
"scope": "resource",
128128
"items": {

0 commit comments

Comments
 (0)