mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 17:23:10 -05:00
Kql magic updates (#9753)
* Inludes package upgrade and silent env * Make user param changes * Address comments Co-authored-by: Monica Gupta <mogupt@microsoft.com>
This commit is contained in:
@@ -89,7 +89,7 @@ export class JupyterServerInstallation implements IJupyterServerInstallation {
|
||||
version: '0.12.9'
|
||||
}, {
|
||||
name: 'Kqlmagic',
|
||||
version: '0.1.108'
|
||||
version: '0.1.109'
|
||||
}
|
||||
];
|
||||
|
||||
@@ -588,9 +588,7 @@ export class JupyterServerInstallation implements IJupyterServerInstallation {
|
||||
|
||||
let versionSpecifier = useMinVersion ? '>=' : '==';
|
||||
let packagesStr = packages.map(pkg => `"${pkg.name}${versionSpecifier}${pkg.version}"`).join(' ');
|
||||
// Force reinstall in case some dependencies are split across multiple locations
|
||||
let cmdOptions = this._usingExistingPython ? '--user --force-reinstall' : '--force-reinstall';
|
||||
let cmd = `"${this.pythonExecutable}" -m pip install ${cmdOptions} ${packagesStr} --extra-index-url https://prose-python-packages.azurewebsites.net`;
|
||||
let cmd = `"${this.pythonExecutable}" -m pip install --user ${packagesStr} --extra-index-url https://prose-python-packages.azurewebsites.net`;
|
||||
return this.executeStreamedCommand(cmd);
|
||||
}
|
||||
|
||||
@@ -630,7 +628,7 @@ export class JupyterServerInstallation implements IJupyterServerInstallation {
|
||||
let versionSpecifier = useMinVersion ? '>=' : '==';
|
||||
let packagesStr = packages.map(pkg => `"${pkg.name}${versionSpecifier}${pkg.version}"`).join(' ');
|
||||
let condaExe = this.getCondaExePath();
|
||||
let cmd = `"${condaExe}" install -y --force-reinstall ${packagesStr}`;
|
||||
let cmd = `"${condaExe}" install -y ${packagesStr}`;
|
||||
return this.executeStreamedCommand(cmd);
|
||||
}
|
||||
|
||||
|
||||
@@ -351,6 +351,9 @@ export class JupyterSession implements nb.ISession {
|
||||
}
|
||||
}
|
||||
|
||||
// Enable silent mode for perf improvement of reload command.
|
||||
allCode += `%set_env KQLMAGIC_LOAD_MODE=silent${EOL}`;
|
||||
|
||||
// Add and register Kqlmagic to the python kernel
|
||||
allCode += `%reload_ext Kqlmagic`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user