Machine Learning Services extension with package management feature (#8622)

* Machine Learning Services extension with package management feature
This commit is contained in:
Leila Lali
2019-12-17 09:55:42 -08:00
committed by GitHub
parent ef8c0e91e6
commit 0a6dc2720d
34 changed files with 3923 additions and 11 deletions

View File

@@ -0,0 +1,63 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
import * as azdata from 'azdata';
/**
* The API provided by this extension.
*
* @export
*/
export interface IExtensionApi {
getJupyterController(): IJupyterController;
registerPackageManager(providerId: string, packageManagerProvider: IPackageManageProvider): void
getPackageManagers(): Map<string, IPackageManageProvider>
}
export interface IJupyterController {
jupyterInstallation: IJupyterServerInstallation;
}
export interface IJupyterServerInstallation {
installPipPackages(packages: IPackageDetails[], useMinVersion: boolean): Promise<void>;
uninstallPipPackages(packages: IPackageDetails[]): Promise<void>;
installCondaPackages(packages: IPackageDetails[], useMinVersion: boolean): Promise<void>;
uninstallCondaPackages(packages: IPackageDetails[]): Promise<void>;
getInstalledPipPackages(): Promise<IPackageDetails[]>;
pythonExecutable: string;
pythonInstallationPath: string;
executeBufferedCommand(command: string): Promise<string>;
executeStreamedCommand(command: string): Promise<void>;
installPythonPackage(backgroundOperation: azdata.BackgroundOperation, usingExistingPython: boolean, pythonInstallationPath: string, outputChannel: vscode.OutputChannel): Promise<void>;
}
export interface IPackageDetails {
name: string;
version: string;
}
export interface IPackageTarget {
location: string;
packageType: string;
}
export interface IPackageOverview {
name: string;
versions: string[];
summary: string;
}
export interface IPackageManageProvider {
providerId: string;
packageTarget: IPackageTarget;
listPackages(): Promise<IPackageDetails[]>
installPackages(package: IPackageDetails[], useMinVersion: boolean): Promise<void>;
uninstallPackages(package: IPackageDetails[]): Promise<void>;
canUseProvider(): Promise<boolean>;
getLocationTitle(): Promise<string>;
getPackageOverview(packageName: string): Promise<IPackageOverview>
}

View File

@@ -0,0 +1,9 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/// <reference path='../../../../src/vs/vscode.d.ts'/>
/// <reference path='../../../../src/sql/azdata.d.ts'/>
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
/// <reference types='@types/node'/>