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

Upgrading to rs 0.41.3 #238

Merged
merged 7 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install latest Rust nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-14
toolchain: nightly-2024-06-23
components: rustfmt, clippy
- name: Install ghp-import
uses: actions/setup-python@v5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-js.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install latest Rust nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-14
toolchain: nightly-2024-06-23
components: rustfmt, clippy
- name: Check yarn version
run: yarn --version
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Install latest Rust nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-14
toolchain: nightly-2024-06-23
components: rustfmt, clippy
- name: Bun version
uses: oven-sh/setup-bun@v1
Expand Down
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ crate-type = ["cdylib", "lib"]
[dependencies]
ahash = "0.8.11"
bincode = "1.3.3"
napi = { version = "2.16.6", default-features = false, features = [
napi = { version = "2.16.8", default-features = false, features = [
"napi8",
"serde-json",
] }
napi-derive = { version = "2.16.5", default-features = false }
polars-core = { git = "https://github.com/pola-rs/polars.git", rev = "7bc70141f4dad7863a2026849522551abb274f00", default-features = false }
polars-io = { git = "https://github.com/pola-rs/polars.git", rev = "7bc70141f4dad7863a2026849522551abb274f00", default-features = false }
polars-lazy = { git = "https://github.com/pola-rs/polars.git", rev = "7bc70141f4dad7863a2026849522551abb274f00", default-features = false }
napi-derive = { version = "2.16.8", default-features = false }
polars-core = { git = "https://github.com/pola-rs/polars.git", rev = "91a423fea2dc067837db65c3608e3cbc1112a6fc", default-features = false }
polars-io = { git = "https://github.com/pola-rs/polars.git", rev = "91a423fea2dc067837db65c3608e3cbc1112a6fc", default-features = false }
polars-lazy = { git = "https://github.com/pola-rs/polars.git", rev = "91a423fea2dc067837db65c3608e3cbc1112a6fc", default-features = false }
thiserror = "1"
smartstring = { version = "1" }
serde_json = { version = "1" }
either = "1.11.0"
either = "1.13.0"

[dependencies.polars]
features = [
Expand Down Expand Up @@ -161,7 +161,7 @@ features = [
"azure"
]
git = "https://github.com/pola-rs/polars.git"
rev = "7bc70141f4dad7863a2026849522551abb274f00"
rev = "91a423fea2dc067837db65c3608e3cbc1112a6fc"

[build-dependencies]
napi-build = "2.1.3"
Expand Down
19 changes: 9 additions & 10 deletions __tests__/dataframe.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ describe("dataframe", () => {

let actual = df.pivot("b", {
index: "a",
columns: "a",
on: "a",
aggregateFunc: "first",
sortColumns: true,
});
Expand All @@ -1340,18 +1340,18 @@ describe("dataframe", () => {
});
actual = df.pivot(["a", "e"], {
index: "b",
columns: ["c"],
on: ["b"],
aggregateFunc: "first",
separator: "|",
maintainOrder: true,
});

expected = pl.DataFrame({
b: ["a", "b"],
"a|c|s": ["beep", null],
"a|c|f": [null, "bop"],
"e|c|s": ["x", null],
"e|c|f": [null, "y"],
"a|a": ["beep", null],
"a|b": [null, "bop"],
"e|a": ["x", null],
"e|b": [null, "y"],
});
expect(actual).toFrameEqual(expected, true);
});
Expand Down Expand Up @@ -1529,7 +1529,7 @@ describe("join", () => {
});
expect(actual).toFrameEqual(expected);
});
test("how:outer", () => {
test("how:full", () => {
const df = pl.DataFrame({
foo: [1, 2, 3],
bar: [6.0, 7.0, 8.0],
Expand All @@ -1542,7 +1542,7 @@ describe("join", () => {
});
const actual = df.join(otherDF, {
on: "ham",
how: "outer",
how: "full",
});
const expected = pl.DataFrame({
foo: [1, 2, 3, null],
Expand Down Expand Up @@ -2523,7 +2523,7 @@ describe("additional", () => {
.sort("date");

let actual = df
.upsample("date", "1mo", "0ns", "groups", true)
.upsample("date", "1mo", "groups", true)
.select(pl.col("*").forwardFill());

let expected = pl
Expand All @@ -2548,7 +2548,6 @@ describe("additional", () => {
.upsample({
timeColumn: "date",
every: "1mo",
offset: "0ns",
by: "groups",
maintainOrder: true,
})
Expand Down
13 changes: 8 additions & 5 deletions __tests__/expr.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ describe("expr", () => {
);
expect(actual).toFrameStrictEqual(expected);
});
test("slice", () => {
test.skip("slice", () => {
const df = pl.DataFrame({ a: [1, 2, 3, 4] });
const expected = pl.DataFrame({
"slice(0,2)": [1, 2],
Expand Down Expand Up @@ -1187,7 +1187,10 @@ describe("expr.str", () => {
});
expect(actual).toFrameEqual(expected);
actual = df.withColumns(
pl.col("a").replace([2, 3], [100, 200], -1, pl.Float64).alias("replaced"),
pl
.col("a")
.replaceStrict([2, 3], [100, 200], -1, pl.Float64)
.alias("replaced"),
);
expected = pl.DataFrame({
a: [1, 2, 2, 3],
Expand All @@ -1196,7 +1199,7 @@ describe("expr.str", () => {
});
expect(actual).toFrameEqual(expected);
actual = df.withColumns(
pl.col("b").replace("a", "c", "e", pl.Utf8).alias("replaced"),
pl.col("b").replaceStrict("a", "c", "e", pl.Utf8).alias("replaced"),
);
expected = pl.DataFrame({
a: [1, 2, 2, 3],
Expand All @@ -1207,7 +1210,7 @@ describe("expr.str", () => {
actual = df.withColumns(
pl
.col("b")
.replace(["a", "b"], ["c", "d"], "e", pl.Utf8)
.replaceStrict(["a", "b"], ["c", "d"], "e", pl.Utf8)
.alias("replaced"),
);
expected = pl.DataFrame({
Expand All @@ -1220,7 +1223,7 @@ describe("expr.str", () => {
actual = df.withColumns(
pl
.col("a")
.replace({ old: mapping, default_: -1, returnDtype: pl.Int64 })
.replaceStrict({ old: mapping, default_: -1, returnDtype: pl.Int64 })
.alias("replaced"),
);
expected = pl.DataFrame({
Expand Down
10 changes: 2 additions & 8 deletions __tests__/lazy_functions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,8 @@ describe("lazy functions", () => {
});
test.each`
start | end | expected
${"a"} | ${"b"} | ${pl.Series("a", [
[1, 2],
[2, 3],
])}
${-1} | ${"a"} | ${pl.Series("literal", [
[-1, 0],
[-1, 0, 1],
])}
${"a"} | ${"b"} | ${pl.Series("a", [[1, 2], [2, 3]])}
${-1} | ${"a"} | ${pl.Series("literal", [[-1, 0], [-1, 0, 1]])}
${"b"} | ${4} | ${pl.Series("b", [[3], []])}
`("$# cumMax", ({ start, end, expected }) => {
const df = pl.DataFrame({ a: [1, 2], b: [3, 4] });
Expand Down
4 changes: 2 additions & 2 deletions __tests__/lazyframe.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ describe("lazyframe", () => {
});
expect(actual).toFrameEqualIgnoringOrder(expected);
});
test("how:outer", () => {
test("how:full", () => {
const df = pl.DataFrame({
foo: [1, 2, 3],
bar: [6.0, 7.0, 8.0],
Expand All @@ -597,7 +597,7 @@ describe("lazyframe", () => {
.lazy()
.join(otherDF, {
on: "ham",
how: "outer",
how: "full",
})
.collectSync();
const expected = pl.DataFrame({
Expand Down
Loading