Skip to content

Commit 4f7165f

Browse files
Add native Pixi locator (#24442)
Sister PR (needs to be merged first): - microsoft/python-environment-tools#172
1 parent 5cec0e0 commit 4f7165f

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/client/pythonEnvironments/base/locators/common/nativePythonTelemetry.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export type RefreshPerformance = {
6767
MacPythonOrg?: number;
6868
MacXCode?: number;
6969
PipEnv?: number;
70+
PixiEnv?: number;
7071
Poetry?: number;
7172
PyEnv?: number;
7273
Venv?: number;
@@ -125,6 +126,7 @@ export function sendNativeTelemetry(
125126
locatorMacPythonOrg: data.data.refreshPerformance.locators.MacPythonOrg || 0,
126127
locatorMacXCode: data.data.refreshPerformance.locators.MacXCode || 0,
127128
locatorPipEnv: data.data.refreshPerformance.locators.PipEnv || 0,
129+
locatorPixiEnv: data.data.refreshPerformance.locators.PixiEnv || 0,
128130
locatorPoetry: data.data.refreshPerformance.locators.Poetry || 0,
129131
locatorPyEnv: data.data.refreshPerformance.locators.PyEnv || 0,
130132
locatorVenv: data.data.refreshPerformance.locators.Venv || 0,

src/client/pythonEnvironments/base/locators/common/nativePythonUtils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { traceError } from '../../../../logging';
77

88
export enum NativePythonEnvironmentKind {
99
Conda = 'Conda',
10+
Pixi = 'Pixi',
1011
Homebrew = 'Homebrew',
1112
Pyenv = 'Pyenv',
1213
GlobalPaths = 'GlobalPaths',
@@ -26,6 +27,7 @@ export enum NativePythonEnvironmentKind {
2627

2728
const mapping = new Map<NativePythonEnvironmentKind, PythonEnvKind>([
2829
[NativePythonEnvironmentKind.Conda, PythonEnvKind.Conda],
30+
[NativePythonEnvironmentKind.Pixi, PythonEnvKind.Pixi],
2931
[NativePythonEnvironmentKind.GlobalPaths, PythonEnvKind.OtherGlobal],
3032
[NativePythonEnvironmentKind.Pyenv, PythonEnvKind.Pyenv],
3133
[NativePythonEnvironmentKind.PyenvVirtualEnv, PythonEnvKind.Pyenv],

src/client/telemetry/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,6 +1749,7 @@ export interface IEventNamePropertyMapping {
17491749
"locatorMacXCode" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" },
17501750
"locatorPipEnv" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" },
17511751
"locatorPoetry" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" },
1752+
"locatorPixi" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" },
17521753
"locatorPyEnv" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" },
17531754
"locatorVenv" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" },
17541755
"locatorVirtualEnv" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" },
@@ -1812,6 +1813,10 @@ export interface IEventNamePropertyMapping {
18121813
* Time taken to find all Pipenv environments.
18131814
*/
18141815
locatorPipEnv?: number;
1816+
/**
1817+
* Time taken to find all Pixi environments.
1818+
*/
1819+
locatorPixi?: number;
18151820
/**
18161821
* Time taken to find all Poetry environments.
18171822
*/

0 commit comments

Comments
 (0)