Skip to content

Commit 9f0d02b

Browse files
authored
chore: Upgrade Toolkit to v1 (#146)
1 parent 5e8dd8d commit 9f0d02b

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { inject, injectable, named } from 'inversify';
55
import { CancellationToken, Uri, workspace } from 'vscode';
66
import { PythonEnvironment } from '../../platform/pythonEnvironments/info';
7-
import { IDeepnoteToolkitInstaller, DEEPNOTE_TOOLKIT_WHEEL_URL, DEEPNOTE_TOOLKIT_VERSION } from './types';
7+
import { IDeepnoteToolkitInstaller, DEEPNOTE_TOOLKIT_VERSION } from './types';
88
import { IProcessServiceFactory } from '../../platform/common/process/types.node';
99
import { logger } from '../../platform/logging';
1010
import { IOutputChannel, IExtensionContext } from '../../platform/common/types';
@@ -189,7 +189,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller {
189189
Cancellation.throwIfCanceled(token);
190190

191191
// Install deepnote-toolkit and ipykernel in venv
192-
logger.info(`Installing deepnote-toolkit and ipykernel in venv from ${DEEPNOTE_TOOLKIT_WHEEL_URL}`);
192+
logger.info(`Installing deepnote-toolkit (${DEEPNOTE_TOOLKIT_VERSION}) and ipykernel in venv from PyPI`);
193193
this.outputChannel.appendLine('Installing deepnote-toolkit and ipykernel...');
194194

195195
const installResult = await venvProcessService.exec(
@@ -199,7 +199,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller {
199199
'pip',
200200
'install',
201201
'--upgrade',
202-
`deepnote-toolkit[server] @ ${DEEPNOTE_TOOLKIT_WHEEL_URL}`,
202+
`deepnote-toolkit[server]==${DEEPNOTE_TOOLKIT_VERSION}`,
203203
'ipykernel'
204204
],
205205
{ throwOnStdErr: false }
@@ -260,7 +260,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller {
260260
throw new DeepnoteToolkitInstallError(
261261
venvInterpreter.uri.fsPath,
262262
venvPath.fsPath,
263-
DEEPNOTE_TOOLKIT_WHEEL_URL,
263+
DEEPNOTE_TOOLKIT_VERSION,
264264
installResult.stdout || '',
265265
installResult.stderr || 'Package installation completed but verification failed'
266266
);
@@ -278,7 +278,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller {
278278
throw new DeepnoteToolkitInstallError(
279279
baseInterpreter.uri.fsPath,
280280
venvPath.fsPath,
281-
DEEPNOTE_TOOLKIT_WHEEL_URL,
281+
DEEPNOTE_TOOLKIT_VERSION,
282282
'',
283283
ex instanceof Error ? ex.message : String(ex),
284284
ex instanceof Error ? ex : undefined

src/kernels/deepnote/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ export interface IDeepnoteKernelAutoSelector {
156156
ensureKernelSelected(notebook: vscode.NotebookDocument, token?: vscode.CancellationToken): Promise<void>;
157157
}
158158

159-
export const DEEPNOTE_TOOLKIT_VERSION = '0.2.30.post30';
160-
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`;
159+
export const DEEPNOTE_TOOLKIT_VERSION = '1.0.0rc2';
161160
export const DEEPNOTE_DEFAULT_PORT = 8888;
162161
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)