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:
Monica Gupta
2020-03-30 10:43:26 -07:00
committed by GitHub
parent e1490b3536
commit 9c842e7548
2 changed files with 6 additions and 5 deletions

View File

@@ -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);
}

View File

@@ -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`;