Skip to content

Commit bd8db4f

Browse files
eleanorjboydcwebster-99karthiknadig
authored
Apply suggestions from code review
Co-authored-by: Courtney Webster <60238438+cwebster-99@users.noreply.github.com> Co-authored-by: Karthik Nadig <kanadig@microsoft.com>
1 parent 4cbb230 commit bd8db4f

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

docs/design.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
# Python Environments API
3-
The following helps describe the technical design of the Python Environments Extension for use mainly by contributing extension authors. This extension is the entry point which will surface the entire environment management experience for Python in VS Code and its modularity should allow for individual tools / libraries to implement these methods for their tool making them usable in VS Code.
3+
The following guide describes the technical design of the Python Environments Extension. Its intended use is mainly for contributing extension authors. This extension is the entry point which will surface the entire environment management experience for Python in VS Code and its modularity should allow for individual tools / libraries to implement these methods for their tool making them usable in VS Code.
44

55

66
**Table of Contents**
@@ -21,7 +21,7 @@ The following helps describe the technical design of the Python Environments Ext
2121

2222

2323
## Functionalities of Extension & its API
24-
The python environment extension has four main functionalities:
24+
The Python Environments extension has four main functionalities:
2525
- getting / setting environments (including the packages found in them)
2626
- terminal activation
2727
- code execution
@@ -37,16 +37,16 @@ The python environment extension has four main functionalities:
3737

3838
## Objects in Extension API
3939
The core components are as follows:
40-
- `PythonEnvironment`: a python environment
40+
- `PythonEnvironment`: a python environment (created using `createPythonEnvironmentItem`)
4141
- Has unique id and correlates to a `EnvironmentManager`
4242
- Contains `PythonEnvironmentExecutionInfo`
4343
- `EnvironmentManager`: an object which manages `PythonEnvironment`
44-
- registered by an extension in form with id `<publisher-id>.<extension-id>:<manager-name>`
44+
- registered by an extension in form with id `<publisher-id>.<extension-id>:<manager-name>` (id is generated internally by extension)
4545
- acts on an environment (get, set, etc) `PythonEnvironment`
4646
- one `EnvironmentManager` can create many `PythonEnvironment` objects
4747
- `PackageManagementOptions`: actions relating to, and specifying packages
4848
- `PackageManager`: an object which manages packages
49-
- registered by an extension in form with id `<publisher-id>.<extension-id>:<manager-name>`
49+
- registered by an extension in form with id `<publisher-id>.<extension-id>:<manager-name>` (Id is generated internally by the extension)
5050
- performs actions for packages using `PackageManagementOptions`
5151

5252

@@ -56,7 +56,7 @@ Generally in the extension, the PackageManagers and EnvironmentManagers handle t
5656

5757
### Workspace and Environments
5858
The relationship between **workspaces** and **environments** in the extension can be any of the following configurations:
59-
| workspace | environment | description | example |
59+
| Workspace | Environment | Description | Example |
6060
| -------- | ------- | -------- | ------- |
6161
| 1 | 1 | single workspace, single environment | simplest, think Django app in a workspace |
6262
| 1 | n | single workspace, multiple environments | one workspace with a client and server which have diff envs OR monorepo with multiple environments |
@@ -90,8 +90,10 @@ A `PackageManager` provides a variety of action which can be taken on an environ
9090

9191
| EnvironmentManager | PackageManager |
9292
| -------- | ------- |
93-
| venv | pip |
93+
| venv | pip/uv |
9494
| conda | conda |
95+
| pyenv | pip/uv |
96+
| poetry | poetry |
9597

9698

9799
Note two things in the table, a given python tool like conda can be both a `EnvironmentManager` and a `PackageManager`. Secondly an `EnvironmentManager`'s preferred `PackageManager` is an opinionated selection made by the manager's author but can be overruled in specific package actions (ie install packageA using into envA using packageManager X). For the default `EnvironmentManager` (venv) the default `PackageManager` is `pip`.

0 commit comments

Comments
 (0)