Skip to content

Commit

Permalink
Add native Pixi locator (#24442)
Browse files Browse the repository at this point in the history
Sister PR (needs to be merged first):
- microsoft/python-environment-tools#172
  • Loading branch information
renan-r-santos authored Nov 26, 2024
1 parent 5cec0e0 commit 4f7165f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export type RefreshPerformance = {
MacPythonOrg?: number;
MacXCode?: number;
PipEnv?: number;
PixiEnv?: number;
Poetry?: number;
PyEnv?: number;
Venv?: number;
Expand Down Expand Up @@ -125,6 +126,7 @@ export function sendNativeTelemetry(
locatorMacPythonOrg: data.data.refreshPerformance.locators.MacPythonOrg || 0,
locatorMacXCode: data.data.refreshPerformance.locators.MacXCode || 0,
locatorPipEnv: data.data.refreshPerformance.locators.PipEnv || 0,
locatorPixiEnv: data.data.refreshPerformance.locators.PixiEnv || 0,
locatorPoetry: data.data.refreshPerformance.locators.Poetry || 0,
locatorPyEnv: data.data.refreshPerformance.locators.PyEnv || 0,
locatorVenv: data.data.refreshPerformance.locators.Venv || 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { traceError } from '../../../../logging';

export enum NativePythonEnvironmentKind {
Conda = 'Conda',
Pixi = 'Pixi',
Homebrew = 'Homebrew',
Pyenv = 'Pyenv',
GlobalPaths = 'GlobalPaths',
Expand All @@ -26,6 +27,7 @@ export enum NativePythonEnvironmentKind {

const mapping = new Map<NativePythonEnvironmentKind, PythonEnvKind>([
[NativePythonEnvironmentKind.Conda, PythonEnvKind.Conda],
[NativePythonEnvironmentKind.Pixi, PythonEnvKind.Pixi],
[NativePythonEnvironmentKind.GlobalPaths, PythonEnvKind.OtherGlobal],
[NativePythonEnvironmentKind.Pyenv, PythonEnvKind.Pyenv],
[NativePythonEnvironmentKind.PyenvVirtualEnv, PythonEnvKind.Pyenv],
Expand Down
5 changes: 5 additions & 0 deletions src/client/telemetry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1749,6 +1749,7 @@ export interface IEventNamePropertyMapping {
"locatorMacXCode" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" },
"locatorPipEnv" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" },
"locatorPoetry" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" },
"locatorPixi" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" },
"locatorPyEnv" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" },
"locatorVenv" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" },
"locatorVirtualEnv" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" },
Expand Down Expand Up @@ -1812,6 +1813,10 @@ export interface IEventNamePropertyMapping {
* Time taken to find all Pipenv environments.
*/
locatorPipEnv?: number;
/**
* Time taken to find all Pixi environments.
*/
locatorPixi?: number;
/**
* Time taken to find all Poetry environments.
*/
Expand Down

0 comments on commit 4f7165f

Please sign in to comment.