Skip to content
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
40 changes: 20 additions & 20 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ jobs:
- ubuntu-22.04
- ubuntu-22.04-arm
- macos-14
- windows-2022
- windows-2025
arch:
- aarch64
- x86_64
Expand All @@ -204,15 +204,15 @@ jobs:
python-version: 3.11
container: quay.io/pypa/manylinux_2_28_aarch64
is-release:
- ${{ startsWith(github.ref, 'refs/tags/v') || github.ref_name == 'master' }}
- ${{ startsWith(github.ref, 'refs/tags/v') || github.ref_name == 'master' || github.event.inputs.ci-full }}
exclude:
- os: windows-2022
- os: windows-2025
arch: aarch64
- os: macos-14
is-release: false
- os: macos-14
arch: x86_64
- os: windows-2022
- os: windows-2025
is-release: false
- os: ubuntu-22.04
arch: aarch64
Expand Down Expand Up @@ -302,14 +302,14 @@ jobs:
matrix:
os:
- ubuntu-22.04
- windows-2022
- windows-2025
arch:
- x86_64
node-version: [22.x]
is-release:
- ${{ startsWith(github.ref, 'refs/tags/v') || github.ref_name == 'master' }}
- ${{ startsWith(github.ref, 'refs/tags/v') || github.ref_name == 'master' || github.event.inputs.ci-full }}
exclude:
- os: windows-2022
- os: windows-2025
is-release: false
steps:
- name: Checkout
Expand Down Expand Up @@ -504,25 +504,25 @@ jobs:
os:
- ubuntu-22.04
- macos-14
- windows-2022
- windows-2025
arch:
- aarch64
- x86_64
python-version:
- 3.11
node-version: [22.x]
is-release:
- ${{ startsWith(github.ref, 'refs/tags/v') || github.ref_name == 'master' }}
- ${{ startsWith(github.ref, 'refs/tags/v') || github.ref_name == 'master' || github.event.inputs.ci-full }}
exclude:
- os: windows-2022
- os: windows-2025
arch: aarch64
- os: ubuntu-22.04
arch: aarch64
- os: macos-14
is-release: false
- os: macos-14
arch: x86_64
- os: windows-2022
- os: windows-2025
is-release: false

steps:
Expand Down Expand Up @@ -667,7 +667,7 @@ jobs:
- ubuntu-22.04
- ubuntu-22.04-arm
- macos-14
- windows-2022
- windows-2025
arch:
- x86_64
- aarch64
Expand All @@ -676,19 +676,19 @@ jobs:
# - 3.11
node-version: [22.x]
is-release:
- ${{ startsWith(github.ref, 'refs/tags/v') || github.ref_name == 'master' }}
- ${{ startsWith(github.ref, 'refs/tags/v') || github.ref_name == 'master' || github.event.inputs.ci-full }}
exclude:
- os: macos-14
is-release: false
- os: macos-14
is-release: false
- os: windows-2022
- os: windows-2025
is-release: false
- os: macos-14
arch: aarch64
- os: macos-14
arch: x86_64
- os: windows-2022
- os: windows-2025
arch: aarch64
- os: ubuntu-22.04
arch: aarch64
Expand Down Expand Up @@ -722,7 +722,7 @@ jobs:
# PSP_USE_CCACHE: 1

test_python_sdist:
if: startsWith(github.ref, 'refs/tags/v') || github.ref_name == 'master'
if: startsWith(github.ref, 'refs/tags/v') || github.ref_name == 'master' || github.event.inputs.ci-full
needs: [build_and_test_jupyterlab, build_and_test_rust]
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -816,7 +816,7 @@ jobs:
# `-'
benchmark_python:
needs: [build_python, build_js]
if: startsWith(github.ref, 'refs/tags/v') || github.ref_name == 'master'
if: startsWith(github.ref, 'refs/tags/v') || github.ref_name == 'master' || github.event.inputs.ci-full
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -876,7 +876,7 @@ jobs:
# `--' '
benchmark_js:
needs: [build_js]
if: startsWith(github.ref, 'refs/tags/v') || github.ref_name == 'master'
if: startsWith(github.ref, 'refs/tags/v') || github.ref_name == 'master' || github.event.inputs.ci-full
strategy:
matrix:
os: [ubuntu-22.04]
Expand Down Expand Up @@ -933,7 +933,7 @@ jobs:
build_and_test_rust,
lint_and_docs,
]
if: startsWith(github.ref, 'refs/tags/v') || github.ref_name == 'master'
if: startsWith(github.ref, 'refs/tags/v') || github.ref_name == 'master' || github.event.inputs.ci-full
strategy:
matrix:
os: [ubuntu-22.04]
Expand Down Expand Up @@ -973,7 +973,7 @@ jobs:

- uses: actions/download-artifact@v4
with:
name: perspective-python-dist-x86_64-windows-2022-3.11
name: perspective-python-dist-x86_64-windows-2025-3.11

- uses: actions/download-artifact@v4
with:
Expand Down
9 changes: 4 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ strip = true
# These are only respected when `cargo` is invoked from the project root
[patch.crates-io]
# simd-adler32 = { git = "https://github.com/mcountryman/simd-adler32.git", rev = "b279034d9eb554c3e5e0af523db044f08d8297ba" }
protobuf-src = { git = "https://github.com/carlocorradini/rust-protobuf-native.git", rev = "1aba500e469f8bdc384a0fe9e69c189fda72e059" }
perspective-client = { path = "rust/perspective-client" }
perspective-server = { path = "rust/perspective-server" }
perspective-js = { path = "rust/perspective-js" }
Expand Down
4 changes: 2 additions & 2 deletions rust/bundle/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ fn build(pkg: Option<&str>, is_release: bool, features: Vec<String>) {
.args(["build"])
.args(["--lib"])
.args(["--features", &features])
.args(["--target", "wasm32-unknown-unknown"]);
// .args(["-Z", "build-std=std"]);
.args(["--target", "wasm32-unknown-unknown"])
.args(["-Z", "build-std=std,panic_abort"]);

if is_release {
cmd.args(["--release"]);
Expand Down
2 changes: 1 addition & 1 deletion rust/perspective-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ path = "src/rust/lib.rs"
prost-build = { version = "0.12.3" }

# https://github.com/abseil/abseil-cpp/issues/1241#issuecomment-2138616329
protobuf-src = { version = "=2.0.1", optional = true }
protobuf-src = { version = "2.1.1", optional = true }

[dependencies]
async-lock = { version = "2.5.0" }
Expand Down
2 changes: 1 addition & 1 deletion rust/perspective-js/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ features = ["serde-json-impl", "no-serde-warnings", "import-esm"]

[dependencies.wasm-bindgen]
version = "=0.2.108"
features = ["serde-serialize", "enable-interning"]
features = ["enable-interning"]

[dependencies.web-sys]
version = "0.3.85"
Expand Down
2 changes: 1 addition & 1 deletion rust/perspective-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ disable-cpp = []
cmake = "0.1.50"
num_cpus = "^1.15.0"
shlex = "1.3.0"
protobuf-src = { version = "2.0.1" }
protobuf-src = { version = "2.1.1" }

[dependencies]
perspective-client = { version = "4.2.0" }
Expand Down
1 change: 0 additions & 1 deletion rust/perspective-viewer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ tracing-subscriber = "0.3.15"

# Browser API bindings
wasm-bindgen = { version = "=0.2.108", features = [
"serde-serialize",
"enable-interning",
] }

Expand Down
2 changes: 1 addition & 1 deletion rust/perspective/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ path = "src/lib.rs"


[features]
default = ["axum-ws"]
default = []
axum-ws = ["tokio", "axum", "futures"]
external-cpp = [
"perspective-server/external-cpp",
Expand Down
91 changes: 47 additions & 44 deletions rust/perspective/tests/concurrent_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,54 +10,57 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

// use tokio::sync::Mutex;
use std::error::Error;
use std::sync::Arc;
#[cfg(feature = "axum-ws")]
mod internal {
// use tokio::sync::Mutex;
use std::error::Error;
use std::sync::Arc;

use perspective_client::{OnUpdateOptions, TableInitOptions, UpdateData, UpdateOptions};
use perspective_server::LocalClient;
use tokio::sync::Mutex;
use perspective_client::{OnUpdateOptions, TableInitOptions, UpdateData, UpdateOptions};
use perspective_server::LocalClient;
use tokio::sync::Mutex;

#[tokio::test]
async fn test_two_sync_clients_receive_messages_on_update() -> Result<(), Box<dyn Error>> {
let server = perspective::server::Server::new(None);
let client1 = LocalClient::new(&server);
let client2 = LocalClient::new(&server);
let table = client1
.table(
UpdateData::Csv("x,y\n1,2\n3,4".to_owned()).into(),
TableInitOptions {
name: Some("Table1".to_owned()),
index: None,
limit: None,
format: None,
},
)
.await?;
#[tokio::test]
async fn test_two_sync_clients_receive_messages_on_update() -> Result<(), Box<dyn Error>> {
let server = perspective::server::Server::new(None);
let client1 = LocalClient::new(&server);
let client2 = LocalClient::new(&server);
let table = client1
.table(
UpdateData::Csv("x,y\n1,2\n3,4".to_owned()).into(),
TableInitOptions {
name: Some("Table1".to_owned()),
index: None,
limit: None,
format: None,
},
)
.await?;

let table2 = client2.open_table("Table1".to_owned()).await?;
let view = table2.view(None).await?;
let result = Arc::new(Mutex::new(false));
let _sub = view
.on_update(
{
let result = result.clone();
move |_| {
let table2 = client2.open_table("Table1".to_owned()).await?;
let view = table2.view(None).await?;
let result = Arc::new(Mutex::new(false));
let _sub = view
.on_update(
{
let result = result.clone();
async move { *result.lock().await = true }
}
},
OnUpdateOptions::default(),
)
.await?;
move |_| {
let result = result.clone();
async move { *result.lock().await = true }
}
},
OnUpdateOptions::default(),
)
.await?;

table
.update(
UpdateData::Csv("x,y\n5,6".to_owned()),
UpdateOptions::default(),
)
.await?;
table
.update(
UpdateData::Csv("x,y\n5,6".to_owned()),
UpdateOptions::default(),
)
.await?;

assert!(*result.lock().await);
Ok(())
assert!(*result.lock().await);
Ok(())
}
}
4 changes: 2 additions & 2 deletions tools/scripts/fix_cpp.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

import sh from "./sh.mjs";
import { execSync } from "child_process";
// import { execSync } from "child_process";

function lint(dir) {
execSync(`clang-format -i -style=file ${dir}`, { stdio: "inherit" });
// execSync(`clang-format -i -style=file ${dir}`, { stdio: "inherit" });
}

lint(sh.path`./rust/perspective-server/cpp/perspective/src/cpp/*.cpp`);
Expand Down
Loading