mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
ML - Updating sqlmlutil to fix R package management (#11432)
Updating sqlmlutil to fix R package management
This commit is contained in:
@@ -8,25 +8,29 @@
|
|||||||
],
|
],
|
||||||
"requiredRPackages": [
|
"requiredRPackages": [
|
||||||
{
|
{
|
||||||
"name": "RODBCext",
|
"name": "vctrs",
|
||||||
"repository": "https://mran.microsoft.com/snapshot/2019-02-01/"
|
"repository": "https://cran.r-project.org"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "odbc",
|
||||||
|
"repository": "https://cran.r-project.org"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sqlmlutils",
|
"name": "sqlmlutils",
|
||||||
"fileName": "sqlmlutils_0.7.1.zip",
|
"fileName": "sqlmlutils_0.7.3.zip",
|
||||||
"downloadUrl": "https://github.com/microsoft/sqlmlutils/blob/master/R/dist/sqlmlutils_0.7.1.zip?raw=true",
|
"downloadUrl": "https://github.com/microsoft/sqlmlutils/releases/download/R-0.7.3/sqlmlutils_0.7.3.zip",
|
||||||
"platform" : "win32"
|
"platform" : "win32"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sqlmlutils",
|
"name": "sqlmlutils",
|
||||||
"fileName": "sqlmlutils_0.7.1.tar.gz",
|
"fileName": "sqlmlutils_0.7.3.tar.gz",
|
||||||
"downloadUrl": "https://github.com/microsoft/sqlmlutils/blob/master/R/dist/sqlmlutils_0.7.1.tar.gz?raw=true",
|
"downloadUrl": "https://github.com/microsoft/sqlmlutils/releases/download/R-0.7.3/sqlmlutils_0.7.3.tar.gz",
|
||||||
"platform" : "darwin"
|
"platform" : "darwin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sqlmlutils",
|
"name": "sqlmlutils",
|
||||||
"fileName": "sqlmlutils_0.7.1.tar.gz",
|
"fileName": "sqlmlutils_0.7.3.tar.gz",
|
||||||
"downloadUrl": "https://github.com/microsoft/sqlmlutils/blob/master/R/dist/sqlmlutils_0.7.1.tar.gz?raw=true",
|
"downloadUrl": "https://github.com/microsoft/sqlmlutils/releases/download/R-0.7.3/sqlmlutils_0.7.3.tar.gz",
|
||||||
"platform" : "linux"
|
"platform" : "linux"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -35,14 +35,14 @@ export class Config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the config value of required python packages
|
* Returns the config value of required python packages. The order of the packages is based on the order they should install
|
||||||
*/
|
*/
|
||||||
public get requiredSqlPythonPackages(): PackageConfigModel[] {
|
public get requiredSqlPythonPackages(): PackageConfigModel[] {
|
||||||
return this._configValues.sqlPackageManagement.requiredPythonPackages;
|
return this._configValues.sqlPackageManagement.requiredPythonPackages;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the config value of required r packages
|
* Returns the config value of required r packages. The order of the packages is based on the order they should install
|
||||||
*/
|
*/
|
||||||
public get requiredSqlRPackages(): PackageConfigModel[] {
|
public get requiredSqlRPackages(): PackageConfigModel[] {
|
||||||
return this._configValues.sqlPackageManagement.requiredRPackages;
|
return this._configValues.sqlPackageManagement.requiredRPackages;
|
||||||
|
|||||||
@@ -133,7 +133,13 @@ export class PackageManager {
|
|||||||
|
|
||||||
await utils.createFolder(utils.getRPackagesFolderPath(this._rootFolder));
|
await utils.createFolder(utils.getRPackagesFolderPath(this._rootFolder));
|
||||||
const packages = this._config.requiredSqlRPackages.filter(p => !p.platform || p.platform === process.platform);
|
const packages = this._config.requiredSqlRPackages.filter(p => !p.platform || p.platform === process.platform);
|
||||||
await Promise.all(packages.map(x => this.installRPackage(x)));
|
|
||||||
|
// Installs packages in order of listed in the config. The order specifies the dependency of the packages and
|
||||||
|
// packages cannot install as parallel because of the dependency for each other
|
||||||
|
for (let index = 0; index < packages.length; index++) {
|
||||||
|
const packageName = packages[index];
|
||||||
|
await this.installRPackage(packageName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user