Skip to content

Commit 8914d63

Browse files
authored
chore: Serialized lazyframe snapshot tests and revert lib vertion to 1.5.0-rc.2 (#1631)
1 parent 410ff47 commit 8914d63

File tree

7 files changed

+79
-5
lines changed

7 files changed

+79
-5
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ VignetteBuilder:
5252
Config/Needs/dev: devtools, lifecycle, readr, glue, RcppTOML, smvr
5353
Config/Needs/lint: fs, lintr
5454
Config/Needs/website: etiennebacher/altdoc, future.apply
55-
Config/polars/lib-version: 1.5.1-rc.1
55+
Config/polars/lib-version: 1.5.0-rc.2
5656
Config/testthat/edition: 3
5757
Config/testthat/parallel: true
5858
Config/testthat/start-first: lazyframe-frame, *-s3-base, polars_options,

src/rust/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "r-polars"
3-
version = "1.5.1-rc.1"
3+
version = "1.5.0-rc.2"
44
edition = "2024"
55
rust-version = "1.89.0"
66
publish = false

tests/testthat/_snaps/lazyframe-frame.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,64 @@
1+
# roundtrip around serialization empty
2+
3+
Code
4+
serialized
5+
Output
6+
[1] 44 53 4c 5f 56 45 52 53 49 4f 4e 18 00 00 00 36 32 38 36 62 61 64 37 62 35
7+
[26] 39 63 36 64 66 66 62 61 62 63 62 37 65 64 61 30 64 33 61 31 63 33 38 36 63
8+
[51] 63 36 35 31 61 64 38 62 32 34 37 39 62 32 65 34 65 34 36 38 36 31 39 39 65
9+
[76] 30 34 65 31 83 a4 72 6f 6f 74 82 a3 69 64 78 01 a7 76 65 72 73 69 6f 6e 01
10+
[101] aa 64 61 74 61 66 72 61 6d 65 73 92 82 a5 76 61 6c 75 65 c0 a7 76 65 72 73
11+
[126] 69 6f 6e 00 82 a5 76 61 6c 75 65 c4 80 ff ff ff ff 70 00 00 00 04 00 00 00
12+
[151] f2 ff ff ff 14 00 00 00 04 00 01 00 00 00 0a 00 0b 00 08 00 0a 00 04 00 f2
13+
[176] ff ff ff 48 00 00 00 10 00 00 00 00 00 0a 00 0c 00 00 00 04 00 08 00 01 00
14+
[201] 00 00 04 00 00 00 f4 ff ff ff 18 00 00 00 0c 00 00 00 08 00 0c 00 04 00 08
15+
[226] 00 02 00 00 00 5b 5d 00 00 09 00 00 00 5f 50 4c 5f 46 4c 41 47 53 00 00 00
16+
[251] 00 00 00 00 00 00 00 00 ff ff ff ff 00 00 00 00 a7 76 65 72 73 69 6f 6e 01
17+
[276] a9 64 73 6c 5f 70 6c 61 6e 73 92 82 a5 76 61 6c 75 65 c0 a7 76 65 72 73 69
18+
[301] 6f 6e 00 82 a5 76 61 6c 75 65 81 ad 44 61 74 61 46 72 61 6d 65 53 63 61 6e
19+
[326] 82 a2 64 66 82 a3 69 64 78 01 a7 76 65 72 73 69 6f 6e 01 a6 73 63 68 65 6d
20+
[351] 61 81 a6 66 69 65 6c 64 73 80 a7 76 65 72 73 69 6f 6e 01
21+
22+
# roundtrip around serialization dataframe
23+
24+
Code
25+
serialized
26+
Output
27+
[1] 44 53 4c 5f 56 45 52 53 49 4f 4e 18 00 00 00 36 32 38 36 62 61 64 37 62 35
28+
[26] 39 63 36 64 66 66 62 61 62 63 62 37 65 64 61 30 64 33 61 31 63 33 38 36 63
29+
[51] 63 36 35 31 61 64 38 62 32 34 37 39 62 32 65 34 65 34 36 38 36 31 39 39 65
30+
[76] 30 34 65 31 83 a4 72 6f 6f 74 82 a3 69 64 78 01 a7 76 65 72 73 69 6f 6e 01
31+
[101] aa 64 61 74 61 66 72 61 6d 65 73 92 82 a5 76 61 6c 75 65 c0 a7 76 65 72 73
32+
[126] 69 6f 6e 00 82 a5 76 61 6c 75 65 c5 02 48 ff ff ff ff e8 00 00 00 04 00 00
33+
[151] 00 f2 ff ff ff 14 00 00 00 04 00 01 00 00 00 0a 00 0b 00 08 00 0a 00 04 00
34+
[176] f2 ff ff ff 4c 00 00 00 10 00 00 00 00 00 0a 00 0c 00 00 00 04 00 08 00 01
35+
[201] 00 00 00 04 00 00 00 f4 ff ff ff 1c 00 00 00 0c 00 00 00 08 00 0c 00 04 00
36+
[226] 08 00 05 00 00 00 5b 30 2c 30 5d 00 00 00 09 00 00 00 5f 50 4c 5f 46 4c 41
37+
[251] 47 53 00 00 00 02 00 00 00 30 00 00 00 04 00 00 00 c4 ff ff ff 1c 00 00 00
38+
[276] 10 00 00 00 08 00 00 00 01 18 00 00 00 00 00 00 fc ff ff ff 04 00 04 00 01
39+
[301] 00 00 00 62 00 00 00 ec ff ff ff 38 00 00 00 20 00 00 00 18 00 00 00 01 02
40+
[326] 00 00 10 00 12 00 04 00 10 00 11 00 08 00 00 00 0c 00 00 00 00 00 f4 ff ff
41+
[351] ff 20 00 00 00 01 00 00 00 08 00 09 00 04 00 08 00 01 00 00 00 61 00 00 00
42+
[376] 00 00 00 00 ff ff ff ff c8 00 00 00 04 00 00 00 ec ff ff ff 80 00 00 00 00
43+
[401] 00 00 00 14 00 00 00 04 00 03 00 0c 00 13 00 10 00 12 00 0c 00 04 00 e6 ff
44+
[426] ff ff 03 00 00 00 00 00 00 00 74 00 00 00 28 00 00 00 14 00 00 00 00 00 0e
45+
[451] 00 18 00 04 00 0c 00 10 00 00 00 14 00 01 00 00 00 00 00 00 00 00 00 00 00
46+
[476] 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
47+
[501] 00 00 00 00 00 00 00 0c 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00
48+
[526] 00 00 00 00 00 00 40 00 00 00 00 00 00 00 30 00 00 00 00 00 00 00 00 00 00
49+
[551] 00 02 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00
50+
[576] 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 00
51+
[601] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
52+
[626] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
53+
[651] 00 01 00 00 00 61 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 62 00 00 00
54+
[676] 00 00 00 00 00 00 00 00 01 00 00 00 63 00 00 00 00 00 00 00 00 00 00 00 00
55+
[701] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff ff 00 00 00 00 a7 76
56+
[726] 65 72 73 69 6f 6e 01 a9 64 73 6c 5f 70 6c 61 6e 73 92 82 a5 76 61 6c 75 65
57+
[751] c0 a7 76 65 72 73 69 6f 6e 00 82 a5 76 61 6c 75 65 81 ad 44 61 74 61 46 72
58+
[776] 61 6d 65 53 63 61 6e 82 a2 64 66 82 a3 69 64 78 01 a7 76 65 72 73 69 6f 6e
59+
[801] 01 a6 73 63 68 65 6d 61 81 a6 66 69 65 6c 64 73 82 a1 61 a5 49 6e 74 33 32
60+
[826] a1 62 a6 53 74 72 69 6e 67 a7 76 65 72 73 69 6f 6e 01
61+
162
# Can't serialize lazyframe includes map function
263

364
Code

tests/testthat/test-integration-reticulate.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ test_that("LazyFrame roundtrip via py-polars", {
3434
# In dev version, we may depends on non-released polars,
3535
# so they may have the different DSL versions and are not compatible.
3636
skip_on_dev_polars()
37-
# TODO: remove this line after bumping the lib version
37+
# TODO: remove this after the Python Polars issue fixed
38+
# https://github.com/pola-rs/polars/pull/25123
3839
skip_on_os("windows")
3940

4041
lf <- as_polars_lf(mtcars)$filter(pl$col("mpg") >= 20)$select("cyl")$sort(cs$all())

tests/testthat/test-lazyframe-frame.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ patrick::with_parameters_test_that(
1313
},
1414
code = {
1515
serialized <- x$serialize()
16-
expect_type(serialized, "raw")
16+
17+
if (.test_name != "scan") {
18+
# Because the file path is changed during every test run
19+
expect_snapshot(serialized)
20+
}
1721

1822
expect_equal(pl$deserialize_lf(serialized)$collect(), x$collect())
1923
}

tools/lib-sums.tsv

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
url sha256sum
2+
https://github.com/pola-rs/r-polars/releases/download/lib-v1.5.0-rc.2/libr_polars-1.5.0-rc.2-aarch64-apple-darwin.tar.gz d379ccc7de3c468d70c0c73f8340a7927fc15c8fc5d0940ec61b850bd0dde0f7
3+
https://github.com/pola-rs/r-polars/releases/download/lib-v1.5.0-rc.2/libr_polars-1.5.0-rc.2-aarch64-unknown-linux-gnu.tar.gz 74b40b7b023f4c50156f112147dd091d6f65d8a88094f1a6a86882041160e90d
4+
https://github.com/pola-rs/r-polars/releases/download/lib-v1.5.0-rc.2/libr_polars-1.5.0-rc.2-aarch64-unknown-linux-musl.tar.gz f379432eb12c435fef9d6cfb67f616e82345d661d1c7b8a426e783bde987b7ec
5+
https://github.com/pola-rs/r-polars/releases/download/lib-v1.5.0-rc.2/libr_polars-1.5.0-rc.2-x86_64-apple-darwin.tar.gz 353f59f34e5c0001fc926fb2401fed751d8f4fb6a5e4bc3ab23f2131806ace3e
6+
https://github.com/pola-rs/r-polars/releases/download/lib-v1.5.0-rc.2/libr_polars-1.5.0-rc.2-x86_64-pc-windows-gnu.tar.gz a812b2c5608c127a7e58f72a094f97790c998f7faeeb38b4dcb03701d7ba18e3
7+
https://github.com/pola-rs/r-polars/releases/download/lib-v1.5.0-rc.2/libr_polars-1.5.0-rc.2-x86_64-unknown-linux-gnu.tar.gz ef15067afe4bde56e83ab6948202102314fd7d8e260e1ab1110b8236f7365ee1
8+
https://github.com/pola-rs/r-polars/releases/download/lib-v1.5.0-rc.2/libr_polars-1.5.0-rc.2-x86_64-unknown-linux-musl.tar.gz bea18fd92682e9bf026175c94c474d4607f6313eb18ab220a00758d2e9c67063

0 commit comments

Comments
 (0)