StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.4 KiB
52 lines
1.4 KiB
4 years ago
|
var fs = require('fs');
|
||
|
|
||
|
var constants = require('./util/constants');
|
||
|
var common = require('./util/common');
|
||
|
|
||
|
// main
|
||
|
makeCredentialsFile();
|
||
|
makeTestImageFolders();
|
||
|
makeRequireJSFixture();
|
||
|
|
||
|
// Create a credentials json file,
|
||
|
// to be required in jasmine test suites and test dashboard
|
||
|
function makeCredentialsFile() {
|
||
|
var credentials = JSON.stringify({
|
||
|
MAPBOX_ACCESS_TOKEN: constants.mapboxAccessToken
|
||
|
}, null, 2);
|
||
|
|
||
|
common.writeFile(constants.pathToCredentials, credentials);
|
||
|
logger('make build/credentials.json');
|
||
|
}
|
||
|
|
||
|
// Make artifact folders for image tests
|
||
|
function makeTestImageFolders() {
|
||
|
function makeOne(folderPath, info) {
|
||
|
if(!common.doesDirExist(folderPath)) {
|
||
|
fs.mkdirSync(folderPath);
|
||
|
logger('initialize ' + info);
|
||
|
} else logger(info + ' is present');
|
||
|
}
|
||
|
|
||
|
makeOne(constants.pathToTestImages, 'test image folder');
|
||
|
makeOne(constants.pathToTestImagesDiff, 'test image diff folder');
|
||
|
}
|
||
|
|
||
|
// Make script file that define plotly in a RequireJS context
|
||
|
function makeRequireJSFixture() {
|
||
|
var bundle = fs.readFileSync(constants.pathToPlotlyDistMin, 'utf-8');
|
||
|
|
||
|
var index = [
|
||
|
'define(\'plotly\', function(require, exports, module) {',
|
||
|
bundle,
|
||
|
'});'
|
||
|
].join('');
|
||
|
|
||
|
common.writeFile(constants.pathToRequireJSFixture, index);
|
||
|
logger('make build/requirejs_fixture.js');
|
||
|
}
|
||
|
|
||
|
function logger(task) {
|
||
|
console.log('ok ' + task);
|
||
|
}
|