Open
Description
Implementation Summary
This is the Python equivalent of #6208.
Implement recommendedWorkspaceRuntime()
for the Python extension here:
positron/extensions/positron-python/src/client/positron/manager.ts
Lines 97 to 104 in 4547a45
The method returns a single language runtime metadata based on a few criteria:
- has the user indicated a preferred runtime in some way?
- does the workspace contain files that indicate the preferred runtime?
- .venv or .conda present?
- other files that indicate the python interpreter to use?
- does the user have a default Python runtime set? (there's a bug re: default python; see Respect
python.defaultInterpreterPath
setting #6281)
The startup behaviour of the runtime will also be set for the runtime metadata, based on the following:
- if a specific interpreter is indicated in a .venv/.conda/etc, then use
StartupBehavior.Immediately
- if the Workspace or User level default interpreter is recommended, then use
StartupBehavior.Implicit
- maybe we need to do this? check the global and/or Python-specific startup behaviour to see if
StartupBehavior.Explicit
may need to be used
Activity