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

Proposal: Isomorphic pythonVariableRequester and debuggerVariables.ts #10142

Merged
merged 7 commits into from
May 26, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion src/kernels/serviceRegistry.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { HostRawNotebookProvider } from './raw/session/hostRawNotebookProvider.n
import { RawNotebookSupportedService } from './raw/session/rawNotebookSupportedService.node';
import { IKernelLauncher, ILocalKernelFinder, IRawNotebookProvider, IRawNotebookSupportedService } from './raw/types';
import { DebuggerVariableRegistration } from './variables/debuggerVariableRegistration.node';
import { DebuggerVariables } from './variables/debuggerVariables.node';
import { DebuggerVariables } from './variables/debuggerVariables';
import { JupyterVariables } from './variables/jupyterVariables';
import { KernelVariables } from './variables/kernelVariables';
import { PreWarmActivatedJupyterEnvironmentVariables } from './variables/preWarmVariables.node';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
IJupyterVariablesResponse
} from './types';
import { convertDebugProtocolVariableToIJupyterVariable, DataViewableTypes } from './helpers';
import { IFileSystemNode } from '../../platform/common/platform/types.node';
import { IFileSystem } from '../../platform/common/platform/types';

const KnownExcludedVariables = new Set<string>(['In', 'Out', 'exit', 'quit']);
const MaximumRowChunkSizeForDebugger = 100;
Expand All @@ -48,7 +48,7 @@ export class DebuggerVariables
@inject(IDebuggingManager) private readonly debuggingManager: IDebuggingManager,
@inject(IConfigurationService) private configService: IConfigurationService,
@inject(IVSCodeNotebook) private readonly vscNotebook: IVSCodeNotebook,
@inject(IFileSystemNode) private readonly fs: IFileSystemNode,
@inject(IFileSystem) private readonly fs: IFileSystem,
@inject(IExtensionContext) private readonly context: IExtensionContext
) {
super(undefined);
Expand Down Expand Up @@ -320,7 +320,7 @@ export class DebuggerVariables
const key = this.debugService.activeDebugSession?.id;
if (key && !this.importedDataFrameScriptsIntoKernel.has(key)) {
const scriptPath = DataFrameLoading.getScriptPath(this.context);
const contents = await this.fs.readLocalFile(scriptPath.fsPath);
const contents = await this.fs.readFile(scriptPath);
await this.evaluate(contents);
this.importedDataFrameScriptsIntoKernel.add(key);
}
Expand All @@ -335,7 +335,7 @@ export class DebuggerVariables
const key = this.debugService.activeDebugSession?.id;
if (key && !this.importedGetVariableInfoScriptsIntoKernel.has(key)) {
const scriptPath = DataFrameLoading.getScriptPath(this.context);
const contents = await this.fs.readLocalFile(scriptPath.fsPath);
const contents = await this.fs.readFile(scriptPath);
await this.evaluate(contents);
this.importedGetVariableInfoScriptsIntoKernel.add(key);
}
Expand Down
33 changes: 12 additions & 21 deletions src/test/datascience/widgets/notebooks/bqplot_widgets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
"# Prerequisites\n",
"\n",
"pip install bqplot"
]
],
sadasant marked this conversation as resolved.
Show resolved Hide resolved
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 126,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -27,24 +29,9 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 127,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f3105e6a4c5a40ffb76b1c53af545298",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(Figure(axes=[Axis(scale=LinearScale()), Axis(orientation='vertical', scale=LinearScale())], fig…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"plt.figure(title='My First Plot')\n",
"plt.plot(x_data, y_data)\n",
Expand All @@ -56,7 +43,9 @@
"metadata": {},
"source": [
"## Using `bqplot`'s interactive elements"
]
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
Expand Down Expand Up @@ -84,7 +73,9 @@
"metadata": {},
"source": [
"# Change color of plots"
]
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
Expand Down