Skip to content

Commit 34af16e

Browse files
authored
Merge pull request #3095 from perspective-dev/fix-html-export
Fix "Export to HTML" feature in `@perspective-dev/viewer` component
2 parents d1f70e0 + 1625933 commit 34af16e

File tree

4 files changed

+28
-29
lines changed

4 files changed

+28
-29
lines changed

.github/actions/install-deps/action.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,16 @@ runs:
4646
using: "composite"
4747
steps:
4848
- name: Clean System
49-
uses: AdityaGarg8/remove-unwanted-software@v4.1
49+
uses: AdityaGarg8/remove-unwanted-software@v5
5050
if: ${{ inputs.clean == 'true' && runner.os != 'Windows' }}
5151
with:
5252
remove-android: "true"
5353
remove-dotnet: "true"
5454
remove-haskell: "true"
5555
remove-codeql: "true"
56+
remove-docker-images: "true"
57+
remove-large-packages: "true"
58+
remove-cached-tools: "true"
5659

5760
# Sticking to 3.29 because of:
5861
# https://github.com/open-telemetry/opentelemetry-cpp/issues/2998
@@ -152,15 +155,15 @@ runs:
152155
with:
153156
toolchain: nightly-2025-02-01
154157
targets: aarch64-apple-darwin
155-
components: rustfmt, clippy, rust-src
158+
components: rust-src
156159

157160
- name: Install rust (aarch64 Linux)
158161
uses: dtolnay/rust-toolchain@nightly
159162
if: ${{ inputs.rust == 'true' && inputs.arch == 'aarch64' && runner.os == 'Linux' }}
160163
with:
161164
toolchain: nightly-2025-02-01
162165
targets: aarch64-unknown-linux-gnu
163-
components: rustfmt, clippy, rust-src
166+
components: rust-src
164167

165168
# # TODO doesn't work.
166169
# - name: Install LLVM 17
@@ -217,3 +220,9 @@ runs:
217220
- run: git config --system core.longpaths true
218221
shell: pwsh
219222
if: ${{ runner.os == 'Windows' }}
223+
224+
# - name: Free up disk space
225+
# if: ${{ runner.os == 'Linux' }}
226+
# run: |
227+
# rm -rf /__t/*
228+

.github/workflows/build.yaml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,11 @@ jobs:
198198
- os: ubuntu-22.04
199199
arch: x86_64
200200
python-version: 3.9
201-
container: pagmo2/manylinux228_x86_64_with_deps
201+
container: quay.io/pypa/manylinux_2_28_x86_64
202202
- os: ubuntu-22.04-arm
203203
arch: aarch64
204204
python-version: 3.9
205-
container: pagmo2/manylinux228_aarch64_with_deps
205+
container: quay.io/pypa/manylinux_2_28_aarch64
206206
is-release:
207207
- ${{ startsWith(github.ref, 'refs/tags/v') || github.ref_name == 'master' }}
208208
exclude:
@@ -220,19 +220,6 @@ jobs:
220220
arch: x86_64
221221

222222
steps:
223-
- name: Run df -h
224-
if: ${{ runner.os == 'Linux' }}
225-
run: df -h
226-
227-
- name: Free up disk space
228-
if: ${{ runner.os == 'Linux' }}
229-
run: |
230-
rm -rf /__t/*
231-
232-
- name: Run df -h
233-
if: ${{ runner.os == 'Linux' }}
234-
run: df -h
235-
236223
- name: Checkout
237224
uses: actions/checkout@v4
238225

@@ -245,10 +232,6 @@ jobs:
245232
name: perspective-metadata
246233
path: rust/
247234

248-
- name: Run df -h
249-
if: ${{ runner.os == 'Linux' }}
250-
run: df -h
251-
252235
- name: Initialize Build
253236
id: init-step
254237
uses: ./.github/actions/install-deps

rust/perspective-server/cpp/perspective/src/cpp/table.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,8 @@ Table::remove_rows(const std::string_view& data) {
822822
if (promote) {
823823
std::stringstream ss;
824824
ss << "Cannot append value of type " << dtype_to_str(*promote)
825-
<< " to column of type " << dtype_to_str(col->get_dtype())
825+
<< " to column \"" << m_index << "\" of type " << dtype_to_str(col->get_dtype())
826+
<< " at index " << ii
826827
<< std::endl;
827828
PSP_COMPLAIN_AND_ABORT(ss.str());
828829
}
@@ -879,7 +880,8 @@ Table::remove_cols(const std::string_view& data) {
879880
if (promote) {
880881
std::stringstream ss;
881882
ss << "Cannot append value of type " << dtype_to_str(*promote)
882-
<< " to column of type " << dtype_to_str(col->get_dtype())
883+
<< " to column \"" << m_index << "\" of type " << dtype_to_str(col->get_dtype())
884+
<< " at index " << ii
883885
<< std::endl;
884886
PSP_COMPLAIN_AND_ABORT(ss.str());
885887
}
@@ -964,13 +966,15 @@ Table::update_cols(const std::string_view& data, std::uint32_t port_id) {
964966
LOG_DEBUG("Ignoring column " << col_name);
965967
continue;
966968
}
969+
967970
for (const auto& cell : column.value.GetArray()) {
968971
auto col = data_table.get_column(col_name);
969972
auto promote = fill_column_json(col, ii, cell, true);
970973
if (promote) {
971974
std::stringstream ss;
972975
ss << "Cannot append value of type " << dtype_to_str(*promote)
973-
<< " to column of type " << dtype_to_str(col->get_dtype())
976+
<< " to column \"" << col_name << "\" of type " << dtype_to_str(col->get_dtype())
977+
<< " at index " << ii
974978
<< std::endl;
975979
PSP_COMPLAIN_AND_ABORT(ss.str());
976980
}
@@ -1189,7 +1193,8 @@ Table::update_rows(const std::string_view& data, std::uint32_t port_id) {
11891193
if (promote) {
11901194
std::stringstream ss;
11911195
ss << "Cannot append value of type " << dtype_to_str(*promote)
1192-
<< " to column of type " << dtype_to_str(col->get_dtype())
1196+
<< " to column \"" << col_name << "\" of type " << dtype_to_str(col->get_dtype())
1197+
<< " at index " << ii
11931198
<< std::endl;
11941199
PSP_COMPLAIN_AND_ABORT(ss.str());
11951200
}
@@ -1422,7 +1427,8 @@ Table::update_ndjson(const std::string_view& data, std::uint32_t port_id) {
14221427
if (promote) {
14231428
std::stringstream ss;
14241429
ss << "Cannot append value of type " << dtype_to_str(*promote)
1425-
<< " to column of type " << dtype_to_str(col->get_dtype())
1430+
<< " to column \"" << col_name << "\" of type " << dtype_to_str(col->get_dtype())
1431+
<< " at index " << ii
14261432
<< std::endl;
14271433
PSP_COMPLAIN_AND_ABORT(ss.str());
14281434
}

rust/perspective-viewer/src/rust/model/export_app.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ static VERSION: &str = env!("CARGO_PKG_VERSION");
1616

1717
fn render_plugin(tag_name: impl AsRef<str>) -> String {
1818
format!(
19-
"import \"https://cdn.jsdelivr.net/npm/@perspective-dev/{0}@{1}/dist/cdn/{0}.js\";\n",
19+
"import \"https://cdn.jsdelivr.net/npm/@perspective-dev/{0}@{1}/dist/cdn/{2}.js\";\n",
20+
tag_name.as_ref().replace("perspective-", ""),
21+
VERSION,
2022
tag_name.as_ref(),
21-
VERSION
2223
)
2324
}
2425

0 commit comments

Comments
 (0)