Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiment: move ipywidgets into notebooks #10903

Merged
merged 7 commits into from
Jul 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 33 additions & 33 deletions TELEMETRY.md
Original file line number Diff line number Diff line change
Expand Up @@ -1566,8 +1566,8 @@ No properties for event

[src/kernels/execution/kernelExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/kernelExecution.ts)
```typescript
this.documentExecutions.set(document, newCellExecutionQueue);
return newCellExecutionQueue;
traceInfoIfCI(`Dispose KernelExecution`);
this.disposables.forEach((d) => d.dispose());
}
@captureTelemetry(Telemetry.Interrupt)
@captureTelemetry(Telemetry.InterruptJupyterTime)
Expand Down Expand Up @@ -6031,13 +6031,13 @@ No properties for event

[src/kernels/execution/kernelExecution.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/execution/kernelExecution.ts)
```typescript
return newCellExecutionQueue;
this.disposables.forEach((d) => d.dispose());
}
@captureTelemetry(Telemetry.Interrupt)
@captureTelemetry(Telemetry.InterruptJupyterTime)
private async interruptExecution(
session: IKernelConnectionSession,
pendingCells: Promise<unknown>
pendingExecutions: Promise<unknown>
```

</details>
Expand Down Expand Up @@ -6092,7 +6092,7 @@ No properties for event

## Locations Used

[src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts)
[src/notebooks/controllers/ipywidgets/scriptSourceProvider/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/ipywidgets/scriptSourceProvider/baseIPyWidgetScriptManager.ts)
```typescript
)}`
);
Expand Down Expand Up @@ -6143,7 +6143,7 @@ No properties for event

## Locations Used

[src/kernels/ipywidgets/ipyWidgetScriptSource.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/ipyWidgetScriptSource.ts)
[src/notebooks/controllers/ipywidgets/scriptSourceProvider/ipyWidgetScriptSource.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/ipywidgets/scriptSourceProvider/ipyWidgetScriptSource.ts)
```typescript
}
} catch (ex) {
Expand Down Expand Up @@ -6174,7 +6174,7 @@ No properties for event

## Locations Used

[src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts)
[src/notebooks/controllers/ipywidgets/scriptSourceProvider/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/ipywidgets/scriptSourceProvider/baseIPyWidgetScriptManager.ts)
```typescript
}

Expand All @@ -6186,7 +6186,7 @@ No properties for event
```


[src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts)
[src/notebooks/controllers/ipywidgets/scriptSourceProvider/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/ipywidgets/scriptSourceProvider/baseIPyWidgetScriptManager.ts)
```typescript
// Find the end bracket for the require config call.
const endBracket = contents.indexOf(')', indexOfRequireConfig);
Expand All @@ -6198,7 +6198,7 @@ No properties for event
```


[src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts)
[src/notebooks/controllers/ipywidgets/scriptSourceProvider/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/ipywidgets/scriptSourceProvider/baseIPyWidgetScriptManager.ts)
```typescript
});

Expand All @@ -6210,7 +6210,7 @@ No properties for event
```


[src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts)
[src/notebooks/controllers/ipywidgets/scriptSourceProvider/baseIPyWidgetScriptManager.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/ipywidgets/scriptSourceProvider/baseIPyWidgetScriptManager.ts)
```typescript
});
return;
Expand Down Expand Up @@ -6261,7 +6261,7 @@ No properties for event

## Locations Used

[src/kernels/ipywidgets/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/commonMessageCoordinator.ts)
[src/notebooks/controllers/ipywidgets/message/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/ipywidgets/message/commonMessageCoordinator.ts)
```typescript
}
traceError(`Widget load failure ${errorMessage}`, payload);
Expand Down Expand Up @@ -6291,7 +6291,7 @@ No properties for event

## Locations Used

[src/kernels/ipywidgets/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/commonMessageCoordinator.ts)
[src/notebooks/controllers/ipywidgets/message/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/ipywidgets/message/commonMessageCoordinator.ts)
```typescript

private sendLoadSucceededTelemetry(payload: LoadIPyWidgetClassLoadAction) {
Expand Down Expand Up @@ -6321,7 +6321,7 @@ No properties for event

## Locations Used

[src/kernels/ipywidgets/ipyWidgetMessageDispatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/ipyWidgetMessageDispatcher.ts)
[src/notebooks/controllers/ipywidgets/message/ipyWidgetMessageDispatcher.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/ipywidgets/message/ipyWidgetMessageDispatcher.ts)
```typescript
}

Expand Down Expand Up @@ -6352,7 +6352,7 @@ No properties for event

## Locations Used

[src/kernels/ipywidgets/cdnWidgetScriptSourceProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/cdnWidgetScriptSourceProvider.ts)
[src/notebooks/controllers/ipywidgets/scriptSourceProvider/cdnWidgetScriptSourceProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/ipywidgets/scriptSourceProvider/cdnWidgetScriptSourceProvider.ts)
```typescript
return this.configurationPromise.promise;
}
Expand Down Expand Up @@ -6382,7 +6382,7 @@ No properties for event

## Locations Used

[src/kernels/ipywidgets/cdnWidgetScriptSourceProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/cdnWidgetScriptSourceProvider.ts)
[src/notebooks/controllers/ipywidgets/scriptSourceProvider/cdnWidgetScriptSourceProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/ipywidgets/scriptSourceProvider/cdnWidgetScriptSourceProvider.ts)
```typescript
break;
}
Expand Down Expand Up @@ -6412,7 +6412,7 @@ No properties for event

## Locations Used

[src/kernels/ipywidgets/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/commonMessageCoordinator.ts)
[src/notebooks/controllers/ipywidgets/message/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/ipywidgets/message/commonMessageCoordinator.ts)
```typescript
private sendRenderFailureTelemetry(payload: Error) {
try {
Expand Down Expand Up @@ -6463,7 +6463,7 @@ No properties for event

## Locations Used

[src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts)
[src/notebooks/controllers/ipywidgets/scriptSourceProvider/localIPyWidgetScriptManager.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/ipywidgets/scriptSourceProvider/localIPyWidgetScriptManager.node.ts)
```typescript
LocalIPyWidgetScriptManager.nbExtensionsCopiedKernelConnectionList.add(
this.kernel.kernelConnectionMetadata.id
Expand All @@ -6475,7 +6475,7 @@ No properties for event
```


[src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts)
[src/notebooks/controllers/ipywidgets/scriptSourceProvider/localIPyWidgetScriptManager.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/ipywidgets/scriptSourceProvider/localIPyWidgetScriptManager.node.ts)
```typescript
sendTelemetryEvent(Telemetry.IPyWidgetNbExtensionCopyTime, stopWatch.elapsedTime);
return baseUrl;
Expand Down Expand Up @@ -6505,7 +6505,7 @@ No properties for event

## Locations Used

[src/kernels/ipywidgets/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/commonMessageCoordinator.ts)
[src/notebooks/controllers/ipywidgets/message/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/ipywidgets/message/commonMessageCoordinator.ts)
```typescript
this.jupyterOutput.appendLine(
DataScience.unhandledMessage().format(msg.header.msg_type, JSON.stringify(msg.content))
Expand Down Expand Up @@ -6535,7 +6535,7 @@ No properties for event

## Locations Used

[src/kernels/ipywidgets/ipyWidgetScriptSourceProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/ipyWidgetScriptSourceProvider.ts)
[src/notebooks/controllers/ipywidgets/scriptSourceProvider/ipyWidgetScriptSourceProvider.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/ipywidgets/scriptSourceProvider/ipyWidgetScriptSourceProvider.ts)
```typescript
}
}
Expand Down Expand Up @@ -6565,7 +6565,7 @@ No properties for event

## Locations Used

[src/kernels/ipywidgets/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/ipywidgets/commonMessageCoordinator.ts)
[src/notebooks/controllers/ipywidgets/message/commonMessageCoordinator.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/controllers/ipywidgets/message/commonMessageCoordinator.ts)
```typescript
}
private sendUnsupportedWidgetVersionFailureTelemetry(payload: NotifyIPyWidgetWidgetVersionNotSupportedAction) {
Expand Down Expand Up @@ -7311,18 +7311,6 @@ No properties for event

## Locations Used

[src/kernels/kernel.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.ts)
```typescript
// Setup telemetry
if (!this.perceivedJupyterStartupTelemetryCaptured) {
this.perceivedJupyterStartupTelemetryCaptured = true;
sendTelemetryEvent(Telemetry.PerceivedJupyterStartupNotebook, stopWatch.elapsedTime);
executionPromise
.finally(() =>
sendTelemetryEvent(Telemetry.StartExecuteNotebookCellPerceivedCold, stopWatch.elapsedTime)
```


[src/kernels/kernel.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.ts)
```typescript

Expand All @@ -7334,6 +7322,18 @@ No properties for event
this._session = session;
```


[src/kernels/kernel.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/kernels/kernel.ts)
```typescript
// Setup telemetry
if (!this.perceivedJupyterStartupTelemetryCaptured) {
this.perceivedJupyterStartupTelemetryCaptured = true;
sendTelemetryEvent(Telemetry.PerceivedJupyterStartupNotebook, stopWatch.elapsedTime);
executionPromise
.finally(() =>
sendTelemetryEvent(Telemetry.StartExecuteNotebookCellPerceivedCold, stopWatch.elapsedTime)
```

</details>
<details>
<summary>DS_INTERNAL.PREFERRED_KERNEL</summary>
Expand Down
2 changes: 1 addition & 1 deletion src/extension.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ async function activateLegacy(
// Register the rest of the types (platform is first because it's needed by others)
registerPlatformTypes(serviceManager);
registerKernelTypes(serviceManager, isDevMode);
registerNotebookTypes(serviceManager);
registerNotebookTypes(serviceManager, isDevMode);
registerInteractiveTypes(serviceManager);
registerStandaloneTypes(context, serviceManager, isDevMode);
registerWebviewTypes(serviceManager);
Expand Down
2 changes: 1 addition & 1 deletion src/extension.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ async function activateLegacy(

// Register the rest of the types (platform is first because it's needed by others)
registerPlatformTypes(serviceManager);
registerNotebookTypes(serviceManager);
registerNotebookTypes(serviceManager, isDevMode);
registerKernelTypes(serviceManager, isDevMode);
registerInteractiveTypes(serviceManager);
registerTerminalTypes(serviceManager);
Expand Down
3 changes: 1 addition & 2 deletions src/kernels/execution/cellExecutionMessageHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ import { swallowExceptions } from '../../platform/common/utils/decorators';
import { noop } from '../../platform/common/utils/misc';
import { ITracebackFormatter } from '../../kernels/types';
import { handleTensorBoardDisplayDataOutput } from './executionHelpers';
import { WIDGET_MIMETYPE } from '../ipywidgets/constants';
import isObject = require('lodash/isObject');
import { Identifiers } from '../../platform/common/constants';
import { Identifiers, WIDGET_MIMETYPE } from '../../platform/common/constants';
import { Lazy } from '../../platform/common/utils/lazy';

// Helper interface for the set_next_input execute reply payload
Expand Down
4 changes: 0 additions & 4 deletions src/kernels/ipywidgets/constants.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/kernels/serviceRegistry.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import {
import { IJupyterVariables, IKernelVariableRequester } from './variables/types';
import { KernelCrashMonitor } from './kernelCrashMonitor';
import { KernelAutoRestartMonitor } from './kernelAutoRestartMonitor.node';
import { registerTypes as registerWidgetTypes } from './ipywidgets/serviceRegistry.node';
import { registerTypes as registerJupyterTypes } from './jupyter/serviceRegistry.node';
import { KernelProvider, ThirdPartyKernelProvider } from './kernelProvider.node';
import { KernelFinder } from './kernelFinder.node';
Expand Down Expand Up @@ -103,7 +102,6 @@ export function registerTypes(serviceManager: IServiceManager, isDevMode: boolea
// Subdirectories
registerJupyterTypes(serviceManager, isDevMode);
registerInstallerTypes(serviceManager);
registerWidgetTypes(serviceManager, isDevMode);

const isVSCInsiders = serviceManager.get<IApplicationEnvironment>(IApplicationEnvironment).channel === 'insiders';
const packageJson: { engines: { vscode: string } } | undefined =
Expand Down
2 changes: 0 additions & 2 deletions src/kernels/serviceRegistry.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { IServiceManager } from '../platform/ioc/types';
import { setSharedProperty } from '../telemetry';
import { IRawNotebookSupportedService } from './raw/types';
import { KernelCrashMonitor } from './kernelCrashMonitor';
import { registerTypes as registerWidgetTypes } from './ipywidgets/serviceRegistry.web';
import { registerTypes as registerJupyterTypes } from './jupyter/serviceRegistry.web';
import { injectable } from 'inversify';
import { IKernelFinder, IKernelProvider, IThirdPartyKernelProvider } from './types';
Expand Down Expand Up @@ -70,7 +69,6 @@ export function registerTypes(serviceManager: IServiceManager, isDevMode: boolea
serviceManager.addSingleton<IKernelFinder>(IKernelFinder, KernelFinder);

// Subdirectories
registerWidgetTypes(serviceManager, isDevMode);
registerJupyterTypes(serviceManager, isDevMode);

serviceManager.addSingleton<CellOutputDisplayIdTracker>(CellOutputDisplayIdTracker, CellOutputDisplayIdTracker);
Expand Down
Loading