Skip to content

Commit 55dfca9

Browse files
committed
Merge remote-tracking branch 'origin/main' into hannes/grn-4913-manage-deepnote-kernels
Signed-off-by: Tomas Kislan <[email protected]>
2 parents 02633fe + 9f0d02b commit 55dfca9

File tree

6 files changed

+21
-27
lines changed

6 files changed

+21
-27
lines changed

package-lock.json

Lines changed: 8 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vscode-deepnote",
33
"displayName": "Deepnote",
4-
"version": "0.2.0",
4+
"version": "0.3.0",
55
"description": "Deepnote notebook support.",
66
"publisher": "Deepnote",
77
"author": {

src/kernels/deepnote/deepnoteSharedToolkitInstaller.node.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { IOutputChannel, IExtensionContext } from '../../platform/common/types';
1010
import { STANDARD_OUTPUT_CHANNEL } from '../../platform/common/constants';
1111
import { IFileSystem } from '../../platform/common/platform/types';
1212
import { Cancellation } from '../../platform/common/cancellation';
13-
import { DEEPNOTE_TOOLKIT_WHEEL_URL, DEEPNOTE_TOOLKIT_VERSION } from './types';
13+
import { DEEPNOTE_TOOLKIT_VERSION } from './types';
1414

1515
/**
1616
* Manages a shared installation of deepnote-toolkit in a versioned extension directory.
@@ -220,7 +220,7 @@ export class DeepnoteSharedToolkitInstaller {
220220
'--target',
221221
this.sharedInstallationPath.fsPath,
222222
'--upgrade',
223-
`deepnote-toolkit[server] @ ${DEEPNOTE_TOOLKIT_WHEEL_URL}`
223+
`deepnote-toolkit[server]==${DEEPNOTE_TOOLKIT_VERSION}`
224224
],
225225
{ throwOnStdErr: false }
226226
);

src/kernels/deepnote/deepnoteToolkitInstaller.node.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,16 @@
33

44
import { inject, injectable, named } from 'inversify';
55
import { CancellationToken, l10n, Uri, workspace } from 'vscode';
6-
import { Cancellation } from '../../platform/common/cancellation';
6+
77
import { STANDARD_OUTPUT_CHANNEL } from '../../platform/common/constants';
88
import { IFileSystem } from '../../platform/common/platform/types';
99
import { IProcessServiceFactory } from '../../platform/common/process/types.node';
1010
import { IExtensionContext, IOutputChannel } from '../../platform/common/types';
1111
import { DeepnoteToolkitInstallError, DeepnoteVenvCreationError } from '../../platform/errors/deepnoteKernelErrors';
1212
import { logger } from '../../platform/logging';
1313
import { PythonEnvironment } from '../../platform/pythonEnvironments/info';
14-
import {
15-
DEEPNOTE_TOOLKIT_VERSION,
16-
DEEPNOTE_TOOLKIT_WHEEL_URL,
17-
IDeepnoteToolkitInstaller,
18-
VenvAndToolkitInstallation
19-
} from './types';
14+
import { DEEPNOTE_TOOLKIT_VERSION, IDeepnoteToolkitInstaller, VenvAndToolkitInstallation } from './types';
15+
import { Cancellation } from '../../platform/common/cancellation';
2016

2117
/**
2218
* Handles installation of the deepnote-toolkit Python package.
@@ -271,7 +267,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller {
271267
Cancellation.throwIfCanceled(token);
272268

273269
// Install deepnote-toolkit and ipykernel in venv
274-
logger.info(`Installing deepnote-toolkit and ipykernel in venv from ${DEEPNOTE_TOOLKIT_WHEEL_URL}`);
270+
logger.info(`Installing deepnote-toolkit (${DEEPNOTE_TOOLKIT_VERSION}) and ipykernel in venv from PyPI`);
275271
this.outputChannel.appendLine(l10n.t('Installing deepnote-toolkit and ipykernel...'));
276272

277273
const installResult = await venvProcessService.exec(
@@ -281,7 +277,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller {
281277
'pip',
282278
'install',
283279
'--upgrade',
284-
`deepnote-toolkit[server] @ ${DEEPNOTE_TOOLKIT_WHEEL_URL}`,
280+
`deepnote-toolkit[server]==${DEEPNOTE_TOOLKIT_VERSION}`,
285281
'ipykernel'
286282
],
287283
{ throwOnStdErr: false }
@@ -319,7 +315,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller {
319315
throw new DeepnoteToolkitInstallError(
320316
venvInterpreter.uri.fsPath,
321317
venvPath.fsPath,
322-
DEEPNOTE_TOOLKIT_WHEEL_URL,
318+
DEEPNOTE_TOOLKIT_VERSION,
323319
installResult.stdout || '',
324320
installResult.stderr || 'Package installation completed but verification failed'
325321
);
@@ -337,7 +333,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller {
337333
throw new DeepnoteToolkitInstallError(
338334
baseInterpreter.uri.fsPath,
339335
venvPath.fsPath,
340-
DEEPNOTE_TOOLKIT_WHEEL_URL,
336+
DEEPNOTE_TOOLKIT_VERSION,
341337
'',
342338
ex instanceof Error ? ex.message : String(ex),
343339
ex instanceof Error ? ex : undefined

src/kernels/deepnote/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ export interface IDeepnoteNotebookEnvironmentMapper {
332332
getNotebooksUsingEnvironment(environmentId: string): vscode.Uri[];
333333
}
334334

335-
export const DEEPNOTE_TOOLKIT_VERSION = '0.2.30.post30';
336-
export const DEEPNOTE_TOOLKIT_WHEEL_URL = `https://deepnote-staging-runtime-artifactory.s3.amazonaws.com/deepnote-toolkit-packages/${DEEPNOTE_TOOLKIT_VERSION}/deepnote_toolkit-${DEEPNOTE_TOOLKIT_VERSION}-py3-none-any.whl`;
335+
export const DEEPNOTE_TOOLKIT_VERSION = '1.0.0rc2';
337336
export const DEEPNOTE_DEFAULT_PORT = 8888;
338337
export const DEEPNOTE_NOTEBOOK_TYPE = 'deepnote';

src/platform/errors/deepnoteKernelErrors.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class DeepnoteToolkitInstallError extends DeepnoteKernelError {
9999
constructor(
100100
public readonly pythonPath: string,
101101
public readonly venvPath: string,
102-
public readonly packageUrl: string,
102+
public readonly packageVersion: string,
103103
public readonly stdout: string,
104104
public readonly stderr: string,
105105
cause?: Error
@@ -112,7 +112,7 @@ export class DeepnoteToolkitInstallError extends DeepnoteKernelError {
112112
this.technicalDetails = [
113113
`Python interpreter: ${pythonPath}`,
114114
`Virtual environment: ${venvPath}`,
115-
`Package URL: ${packageUrl}`,
115+
`Package version: ${packageVersion}`,
116116
stdout ? `Installation output:\n${stdout}` : '',
117117
stderr ? `Error output:\n${stderr}` : 'No error output available',
118118
cause ? `Underlying error: ${cause.message}` : ''

0 commit comments

Comments
 (0)