Skip to content

Startup the jupyter server when appropriate #9708

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

Merged
merged 14 commits into from
Jan 23, 2020
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
1 change: 1 addition & 0 deletions news/1 Enhancements/7232.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Automatically start the Jupyter server when opening a notebook or the interative window, or when either of those has happened in the last 7 days. This behavior can be disabled with the 'python.dataScience.disableJupyterAutoStart' setting.
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1798,6 +1798,12 @@
"description": "When debugging a cell, open this port on the remote box. If -1 is specified, a random port between 8889 and 9000 will be attempted.",
"scope": "resource"
},
"python.dataScience.disableJupyterAutoStart": {
"type": "boolean",
"default": false,
"description": "When true, disables Jupyter from being automatically started for you. You must instead run a cell to start Jupyter.",
"scope": "resource"
},
"python.dataScience.textOutputLimit": {
"type": "number",
"default": 20000,
Expand Down
10 changes: 7 additions & 3 deletions src/client/common/asyncDisposableRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ import { IAsyncDisposable, IAsyncDisposableRegistry, IDisposable } from './types
// List of disposables that need to run a promise.
@injectable()
export class AsyncDisposableRegistry implements IAsyncDisposableRegistry {
private list: (IDisposable | IAsyncDisposable)[] = [];
private _list: (IDisposable | IAsyncDisposable)[] = [];

public async dispose(): Promise<void> {
const promises = this.list.map(l => l.dispose());
const promises = this._list.map(l => l.dispose());
await Promise.all(promises);
}

public push(disposable?: IDisposable | IAsyncDisposable) {
if (disposable) {
this.list.push(disposable);
this._list.push(disposable);
}
}

public get list(): (IDisposable | IAsyncDisposable)[] {
return this._list;
}
}
1 change: 1 addition & 0 deletions src/client/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ export interface IDataScienceSettings {
themeMatplotlibPlots?: boolean;
useWebViewServer?: boolean;
variableQueries: IVariableQuery[];
disableJupyterAutoStart?: boolean;
}

export const IConfigurationService = Symbol('IConfigurationService');
Expand Down
Loading