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

Add CI requirements update script #2422

Merged
merged 3 commits into from
Nov 13, 2023
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
3 changes: 2 additions & 1 deletion cpp/perspective/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,11 @@ set(PSP_WASM_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} \
--source-map-base \"\" \
--memory-init-file 0 \
--no-entry \
-s NO_EXIT_RUNTIME=1 \
-s NO_FILESYSTEM=1 \
-s ALLOW_MEMORY_GROWTH=1 \
-s MODULARIZE=1 \
-s STANDALONE_WASM=1 \
-s WASM_BIGINT=1 \
-s EXPORT_NAME=\"load_perspective\" \
-s MAXIMUM_MEMORY=4gb \
-s ERROR_ON_UNDEFINED_SYMBOLS=1 \
Expand Down
2 changes: 1 addition & 1 deletion cpp/perspective/src/include/perspective/binding.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

#pragma once

#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#if defined(PSP_ENABLE_WASM) || defined(PSP_ENABLE_PYTHON)

#include <perspective/base.h>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"internal": "Internal"
}
},
"emscripten": "3.1.45",
"emscripten": "3.1.48",
"engines": {
"node": ">=14.18.2"
},
Expand Down
1 change: 0 additions & 1 deletion python/perspective/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
# Get requirement info #
requires = [
"ipywidgets>=7.5.1,<9",
"future>=0.16.0,<1",
"numpy>=1.21.6,<2",
"pandas>=0.22.0,<3",
"python-dateutil>=2.8.0,<3",
Expand Down
5 changes: 3 additions & 2 deletions rust/perspective-viewer/src/less/dom/select.less
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@
padding: 0px 12px 0px 0px;
font-size: 10px;
font-family: inherit;
background-color: var(--select--background-color, transparent);
background-color: transparent;
background-image: url("../../svg/dropdown-selector.svg");
background-position: right 2px center;
background-repeat: no-repeat;

option {
background: var(--select--background-color, transparent);
color: var(--icon--color, inherit);
background: var(--plugin--background, transparent);
}
}
}
2 changes: 2 additions & 0 deletions tools/perspective-bench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"microtime": "^3.0.0"
},
"dependencies": {
"perspective-2-6-0": "npm:@finos/[email protected]",
"perspective-2-5-0": "npm:@finos/[email protected]",
"perspective-2-4-0": "npm:@finos/[email protected]",
"perspective-2-3-0": "npm:@finos/[email protected]",
"perspective-2-2-0": "npm:@finos/[email protected]",
Expand Down
22 changes: 22 additions & 0 deletions tools/perspective-bench/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,23 @@ papaparse@^5.2.0:
fflate "^0.7.4"
ws "^6.1.2"

"perspective-2-5-0@npm:@finos/[email protected]":
version "2.5.0"
resolved "https://registry.yarnpkg.com/@finos/perspective/-/perspective-2.5.0.tgz#590cbedac0768b0ce82e3276f3b602de8a908058"
integrity sha512-4YUs0oLvvGG4HQzqLJQCkRic+FW4h623etmcjBSuqcC3tLT+OMFxNZ8Z3NjS6uvdFu6vPTO7fAA0RnTdZKhXKg==
dependencies:
fflate "^0.7.4"
ws "^6.1.2"

"perspective-2-6-0@npm:@finos/[email protected]":
version "2.6.0"
resolved "https://registry.yarnpkg.com/@finos/perspective/-/perspective-2.6.0.tgz#dc4e6f0ddebbad475dc0c33b14e5aaff7875cdda"
integrity sha512-3YIBv4h1wQl8FBuabWLIV6H5aS1ufDC4/xjsrp3bIL5y5dgYwV5Uqr3gFj6cpmbWn0jNaFb6pEVm3Scn2QyDNw==
dependencies:
fflate "^0.7.4"
stoppable "1.1.0"
ws "^6.1.2"

rc4@~0.1.5:
version "0.1.5"
resolved "https://registry.yarnpkg.com/rc4/-/rc4-0.1.5.tgz#08c6e04a0168f6eb621c22ab6cb1151bd9f4a64d"
Expand All @@ -344,6 +361,11 @@ regenerator-runtime@^0.14.0:
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45"
integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==

[email protected]:
version "1.1.0"
resolved "https://registry.yarnpkg.com/stoppable/-/stoppable-1.1.0.tgz#32da568e83ea488b08e4d7ea2c3bcc9d75015d5b"
integrity sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==

text-encoding-utf-8@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz#585b62197b0ae437e3c7b5d0af27ac1021e10d13"
Expand Down
1 change: 1 addition & 0 deletions tools/perspective-scripts/install_emsdk.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ function emsdk(...args) {

function toolchain_install() {
console.log(`-- Installing Emscripten ${emscripten}`);
sh`git pull`.cwd(".emsdk").runSync();
emsdk("install", emscripten);
emsdk("activate", emscripten);
console.log(`-- Emscripten ${emscripten} installed`);
Expand Down
2 changes: 1 addition & 1 deletion tools/perspective-scripts/sh_perspective.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export function py_requirements() {
.replace("Python ", "")
.replace(".", "")
.replace(/\..*?$/m, "");
return `python/perspective/requirements-${version}.txt`;
return `python/perspective/requirements/requirements-${version}.txt`;
}

/**
Expand Down
59 changes: 59 additions & 0 deletions tools/perspective-scripts/update_python.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
// ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃
// ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃
// ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃
// ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃
// ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
// ┃ Copyright (c) 2017, the Perspective Authors. ┃
// ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃
// ┃ This file is part of the Perspective library, distributed under the terms ┃
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

/// Use this script to update the `requirements-*.txt` files in the
/// `python/perspective` directory. This only needs to be done when the actual
/// dependencies _or_ supported Python versions change - to update these deps
/// otherwise is to invite the wrath of the CI gods.

import sh from "./sh.mjs";
import * as fs from "fs";

const VERSIONS = [
// "3.7",
"3.8",
"3.9",
"3.10",
"3.11",
];

for (const version of VERSIONS) {
sh`
pip3 install "python/perspective[dev]"
--dry-run
--report=report.json
--python-version=${version}
--only-binary=:all:
--platform=manylinux_2_12_x86_64
--platform=manylinux_2_17_x86_64
--ignore-installed
--target=.
`.runSync();

const data = JSON.parse(fs.readFileSync("report.json"));
let output = "";
for (const {
metadata: { version, name },
} of data.install) {
output += `${name}==${version}\n`;
}

fs.writeFileSync(
`python/perspective/requirements/requirements-${version.replace(
".",
""
)}.txt`,
output
);
}

fs.rmSync("report.json");
Loading