mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -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'
|
version: '0.12.9'
|
||||||
}, {
|
}, {
|
||||||
name: 'Kqlmagic',
|
name: 'Kqlmagic',
|
||||||
version: '0.1.108'
|
version: '0.1.109'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -588,9 +588,7 @@ export class JupyterServerInstallation implements IJupyterServerInstallation {
|
|||||||
|
|
||||||
let versionSpecifier = useMinVersion ? '>=' : '==';
|
let versionSpecifier = useMinVersion ? '>=' : '==';
|
||||||
let packagesStr = packages.map(pkg => `"${pkg.name}${versionSpecifier}${pkg.version}"`).join(' ');
|
let packagesStr = packages.map(pkg => `"${pkg.name}${versionSpecifier}${pkg.version}"`).join(' ');
|
||||||
// Force reinstall in case some dependencies are split across multiple locations
|
let cmd = `"${this.pythonExecutable}" -m pip install --user ${packagesStr} --extra-index-url https://prose-python-packages.azurewebsites.net`;
|
||||||
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`;
|
|
||||||
return this.executeStreamedCommand(cmd);
|
return this.executeStreamedCommand(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -630,7 +628,7 @@ export class JupyterServerInstallation implements IJupyterServerInstallation {
|
|||||||
let versionSpecifier = useMinVersion ? '>=' : '==';
|
let versionSpecifier = useMinVersion ? '>=' : '==';
|
||||||
let packagesStr = packages.map(pkg => `"${pkg.name}${versionSpecifier}${pkg.version}"`).join(' ');
|
let packagesStr = packages.map(pkg => `"${pkg.name}${versionSpecifier}${pkg.version}"`).join(' ');
|
||||||
let condaExe = this.getCondaExePath();
|
let condaExe = this.getCondaExePath();
|
||||||
let cmd = `"${condaExe}" install -y --force-reinstall ${packagesStr}`;
|
let cmd = `"${condaExe}" install -y ${packagesStr}`;
|
||||||
return this.executeStreamedCommand(cmd);
|
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
|
// Add and register Kqlmagic to the python kernel
|
||||||
allCode += `%reload_ext Kqlmagic`;
|
allCode += `%reload_ext Kqlmagic`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user