Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Windows build on Azure #1095

Merged
merged 2 commits into from
Jun 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,11 @@ jobs:
env:
# Set `BOOST_ROOT` manually, as `BOOST_ROOT` is removed in the VM:
# https://github.com/actions/virtual-environments/issues/687
BOOST_ROOT: "C:/hostedtoolcache/windows/Boost/1.69.0/"
BOOST_INCLUDEDIR: "C:/hostedtoolcache/windows/Boost/1.69.0/include"
BOOST_LIBRARYDIR: "C:/hostedtoolcache/windows/Boost/1.69.0/libs"
# 06/18/2020 - seems like boost got moved to `x86_64` inside
# the boost folder, which broke builds for a bit.
BOOST_ROOT: "C:/hostedtoolcache/windows/Boost/1.69.0/x86_64/"
BOOST_INCLUDEDIR: "C:/hostedtoolcache/windows/Boost/1.69.0/x86_64/include"
BOOST_LIBRARYDIR: "C:/hostedtoolcache/windows/Boost/1.69.0/x86_64/libs"


- job: 'Mac'
Expand Down
2 changes: 1 addition & 1 deletion cpp/perspective/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ elseif(PSP_CPP_BUILD OR PSP_PYTHON_BUILD)
# must be set to `NEW` to allow BOOST_ROOT to be defined by env var
cmake_policy(SET CMP0074 NEW)

if(DEFINED(ENV{BOOST_ROOT}))
if(DEFINED (ENV{BOOST_ROOT}))
set(Boost_NO_BOOST_CMAKE TRUE)

message(WARNING "${Cyan}BOOST_ROOT: $ENV{BOOST_ROOT} ${ColorReset}")
Expand Down
3 changes: 1 addition & 2 deletions packages/perspective-jupyterlab/src/less/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ div.PSPContainer-dark {
flex: 1;
}


div.PSPContainer perspective-viewer{
div.PSPContainer perspective-viewer {
.perspective-viewer-material();
}

Expand Down
30 changes: 15 additions & 15 deletions packages/perspective-viewer-d3fc/src/config/d3fc.watch.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
const pluginConfig = require("./d3fc.plugin.config");
const rules = []; //pluginConfig.module.rules.slice(0);
rules.push({
test: /\.js$/,
exclude: /node_modules/,
loader: "babel-loader"
});
module.exports = Object.assign({}, pluginConfig, {
entry: "./src/js/index.js",
module: Object.assign({}, pluginConfig.module, {
rules
})
});
const pluginConfig = require("./d3fc.plugin.config");

const rules = []; //pluginConfig.module.rules.slice(0);
rules.push({
test: /\.js$/,
exclude: /node_modules/,
loader: "babel-loader"
});

module.exports = Object.assign({}, pluginConfig, {
entry: "./src/js/index.js",
module: Object.assign({}, pluginConfig.module, {
rules
})
});
280 changes: 140 additions & 140 deletions packages/perspective-viewer-d3fc/src/js/axis/axisFactory.js
Original file line number Diff line number Diff line change
@@ -1,140 +1,140 @@
/******************************************************************************
*
* Copyright (c) 2017, the Perspective Authors.
*
* This file is part of the Perspective library, distributed under the terms of
* the Apache License 2.0. The full license can be found in the LICENSE file.
*
*/
import * as fc from "d3fc";
import {axisType} from "./axisType";
import * as none from "./noAxis";
import * as linear from "./linearAxis";
import * as time from "./timeAxis";
import * as ordinal from "./ordinalAxis";
const axisTypes = {
none,
ordinal,
time,
linear
};
export const axisFactory = settings => {
let excludeType = null;
let orient = "horizontal";
let settingName = "crossValues";
let settingValue = null;
let valueNames = ["crossValue"];
const optionalParams = ["include", "paddingStrategy", "pad"];
const optional = {};
const _factory = data => {
const useType = axisType(settings)
.excludeType(excludeType)
.settingName(settingName)
.settingValue(settingValue)();
const axis = axisTypes[useType];
const domainFunction = axis.domain().valueNames(valueNames);
optionalParams.forEach(p => {
if (optional[p] && domainFunction[p]) domainFunction[p](optional[p]);
});
if (domainFunction.orient) domainFunction.orient(orient);
const domain = domainFunction(data);
const component = axis.component ? createComponent(axis, domain, data) : defaultComponent();
return {
scale: axis.scale(),
domain,
domainFunction,
labelFunction: axis.labelFunction,
component: {
bottom: component.bottom,
left: component.left,
top: component.top,
right: component.right
},
size: component.size,
decorate: component.decorate,
label: settings[settingName].map(v => v.name).join(", "),
tickFormatFunction: axis.tickFormatFunction
};
};
const createComponent = (axis, domain, data) =>
axis
.component(settings)
.orient(orient)
.settingName(settingName)
.domain(domain)(data);
const defaultComponent = () => ({
bottom: fc.axisBottom,
left: fc.axisLeft,
top: fc.axisTop,
right: fc.axisRight,
decorate: () => {}
});
_factory.excludeType = (...args) => {
if (!args.length) {
return excludeType;
}
excludeType = args[0];
return _factory;
};
_factory.orient = (...args) => {
if (!args.length) {
return orient;
}
orient = args[0];
return _factory;
};
_factory.settingName = (...args) => {
if (!args.length) {
return settingName;
}
settingName = args[0];
return _factory;
};
_factory.settingValue = (...args) => {
if (!args.length) {
return settingValue;
}
settingValue = args[0];
return _factory;
};
_factory.valueName = (...args) => {
if (!args.length) {
return valueNames[0];
}
valueNames = [args[0]];
return _factory;
};
_factory.valueNames = (...args) => {
if (!args.length) {
return valueNames;
}
valueNames = args[0];
return _factory;
};
optionalParams.forEach(p => {
_factory[p] = (...args) => {
if (!args.length) {
return optional[p];
}
optional[p] = args[0];
return _factory;
};
});
return _factory;
};
/******************************************************************************
*
* Copyright (c) 2017, the Perspective Authors.
*
* This file is part of the Perspective library, distributed under the terms of
* the Apache License 2.0. The full license can be found in the LICENSE file.
*
*/
import * as fc from "d3fc";
import {axisType} from "./axisType";
import * as none from "./noAxis";
import * as linear from "./linearAxis";
import * as time from "./timeAxis";
import * as ordinal from "./ordinalAxis";

const axisTypes = {
none,
ordinal,
time,
linear
};

export const axisFactory = settings => {
let excludeType = null;
let orient = "horizontal";
let settingName = "crossValues";
let settingValue = null;
let valueNames = ["crossValue"];

const optionalParams = ["include", "paddingStrategy", "pad"];
const optional = {};

const _factory = data => {
const useType = axisType(settings)
.excludeType(excludeType)
.settingName(settingName)
.settingValue(settingValue)();

const axis = axisTypes[useType];
const domainFunction = axis.domain().valueNames(valueNames);

optionalParams.forEach(p => {
if (optional[p] && domainFunction[p]) domainFunction[p](optional[p]);
});
if (domainFunction.orient) domainFunction.orient(orient);

const domain = domainFunction(data);
const component = axis.component ? createComponent(axis, domain, data) : defaultComponent();

return {
scale: axis.scale(),
domain,
domainFunction,
labelFunction: axis.labelFunction,
component: {
bottom: component.bottom,
left: component.left,
top: component.top,
right: component.right
},
size: component.size,
decorate: component.decorate,
label: settings[settingName].map(v => v.name).join(", "),
tickFormatFunction: axis.tickFormatFunction
};
};

const createComponent = (axis, domain, data) =>
axis
.component(settings)
.orient(orient)
.settingName(settingName)
.domain(domain)(data);

const defaultComponent = () => ({
bottom: fc.axisBottom,
left: fc.axisLeft,
top: fc.axisTop,
right: fc.axisRight,
decorate: () => {}
});

_factory.excludeType = (...args) => {
if (!args.length) {
return excludeType;
}
excludeType = args[0];
return _factory;
};

_factory.orient = (...args) => {
if (!args.length) {
return orient;
}
orient = args[0];
return _factory;
};

_factory.settingName = (...args) => {
if (!args.length) {
return settingName;
}
settingName = args[0];
return _factory;
};
_factory.settingValue = (...args) => {
if (!args.length) {
return settingValue;
}
settingValue = args[0];
return _factory;
};

_factory.valueName = (...args) => {
if (!args.length) {
return valueNames[0];
}
valueNames = [args[0]];
return _factory;
};
_factory.valueNames = (...args) => {
if (!args.length) {
return valueNames;
}
valueNames = args[0];
return _factory;
};

optionalParams.forEach(p => {
_factory[p] = (...args) => {
if (!args.length) {
return optional[p];
}
optional[p] = args[0];
return _factory;
};
});

return _factory;
};
Loading