diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 5d8d0b6ec..ffb7330cc 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -14,7 +14,7 @@ jobs: - name: Install latest Rust nightly uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly-2024-08-26 + toolchain: nightly-2024-09-19 components: rustfmt, clippy - name: Install ghp-import uses: actions/setup-python@v5 diff --git a/.github/workflows/test-js.yaml b/.github/workflows/test-js.yaml index 1dc3e3450..be91e4cc3 100644 --- a/.github/workflows/test-js.yaml +++ b/.github/workflows/test-js.yaml @@ -20,7 +20,7 @@ jobs: - name: Install latest Rust nightly uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly-2024-08-26 + toolchain: nightly-2024-09-19 components: rustfmt, clippy - name: Check yarn version run: yarn --version @@ -46,7 +46,7 @@ jobs: - name: Install latest Rust nightly uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly-2024-08-26 + toolchain: nightly-2024-09-19 components: rustfmt, clippy - name: Bun version uses: oven-sh/setup-bun@v1 diff --git a/__tests__/dataframe.test.ts b/__tests__/dataframe.test.ts index 39e0c1917..67ddf0eee 100644 --- a/__tests__/dataframe.test.ts +++ b/__tests__/dataframe.test.ts @@ -1,7 +1,7 @@ +import fs from "node:fs"; +import { Stream } from "node:stream"; /* eslint-disable newline-per-chained-call */ import pl from "@polars"; -import { Stream } from "stream"; -import fs from "fs"; describe("dataframe", () => { const df = pl.DataFrame([ pl.Series("foo", [1, 2, 9], pl.Int16), @@ -338,24 +338,30 @@ describe("dataframe", () => { const actual = df.fold((a, b) => a.concat(b)); expect(actual).toSeriesEqual(expected); }); - // test("fold", () => { - // const s1 = pl.Series([1, 2, 3]); - // const s2 = pl.Series([4, 5, 6]); - // const s3 = pl.Series([7, 8, 1]); - // const expected = pl.Series("foo", [true, true, false]); - // const df = pl.DataFrame([s1, s2, s3]); - // const actual = df.fold((a, b) => a.lessThan(b)).alias("foo"); - // expect(actual).toSeriesEqual(expected); - // }); - // test("fold-again", () => { - // const s1 = pl.Series([1, 2, 3]); - // const s2 = pl.Series([4, 5, 6]); - // const s3 = pl.Series([7, 8, 1]); - // const expected = pl.Series("foo", [12, 15, 10]); - // const df = pl.DataFrame([s1, s2, s3]); - // const actual = df.fold((a, b) => a.plus(b)).alias("foo"); - // expect(actual).toSeriesEqual(expected); - // }); + it.each` + name | actual | expected + ${"fold:lessThan"} | ${df.fold((a, b) => a.lessThan(b)).alias("foo")} | ${pl.Series("foo", [true, false, false])} + ${"fold:lt"} | ${df.fold((a, b) => a.lt(b)).alias("foo")} | ${pl.Series("foo", [true, false, false])} + ${"fold:lessThanEquals"} | ${df.fold((a, b) => a.lessThanEquals(b)).alias("foo")} | ${pl.Series("foo", [true, true, false])} + ${"fold:ltEq"} | ${df.fold((a, b) => a.ltEq(b)).alias("foo")} | ${pl.Series("foo", [true, true, false])} + ${"fold:neq"} | ${df.fold((a, b) => a.neq(b)).alias("foo")} | ${pl.Series("foo", [true, false, true])} + ${"fold:plus"} | ${df.fold((a, b) => a.plus(b)).alias("foo")} | ${pl.Series("foo", [7, 4, 17])} + ${"fold:minus"} | ${df.fold((a, b) => a.minus(b)).alias("foo")} | ${pl.Series("foo", [-5, 0, 1])} + ${"fold:mul"} | ${df.fold((a, b) => a.mul(b)).alias("foo")} | ${pl.Series("foo", [6, 4, 72])} + `("$# $name expected matches actual", ({ expected, actual }) => { + expect(expected).toSeriesEqual(actual); + }); + test("fold:lt", () => { + const s1 = pl.Series([1, 2, 3]); + const s2 = pl.Series([4, 5, 6]); + const s3 = pl.Series([7, 8, 1]); + const df = pl.DataFrame([s1, s2, s3]); + const expected = pl.Series("foo", [true, true, false]); + let actual = df.fold((a, b) => a.lessThan(b)).alias("foo"); + expect(actual).toSeriesEqual(expected); + actual = df.fold((a, b) => a.lt(b)).alias("foo"); + expect(actual).toSeriesEqual(expected); + }); test("frameEqual:true", () => { const df = pl.DataFrame({ foo: [1, 2, 3], diff --git a/__tests__/io.test.ts b/__tests__/io.test.ts index 286596a33..7985dfce1 100644 --- a/__tests__/io.test.ts +++ b/__tests__/io.test.ts @@ -1,7 +1,7 @@ +import fs from "node:fs"; +import path from "node:path"; +import { Stream } from "node:stream"; import pl from "@polars"; -import path from "path"; -import { Stream } from "stream"; -import fs from "fs"; // eslint-disable-next-line no-undef const csvpath = path.resolve(__dirname, "./examples/datasets/foods1.csv"); // eslint-disable-next-line no-undef diff --git a/__tests__/lazyframe.test.ts b/__tests__/lazyframe.test.ts index 571bf3246..804e23592 100644 --- a/__tests__/lazyframe.test.ts +++ b/__tests__/lazyframe.test.ts @@ -1,5 +1,5 @@ +import fs from "node:fs"; import pl from "@polars"; -import fs from "fs"; describe("lazyframe", () => { test("columns", () => { diff --git a/__tests__/serde.test.ts b/__tests__/serde.test.ts index 3f0861f06..e3f1a081d 100644 --- a/__tests__/serde.test.ts +++ b/__tests__/serde.test.ts @@ -1,5 +1,5 @@ +import path from "node:path"; import pl from "@polars"; -import path from "path"; // eslint-disable-next-line no-undef const csvpath = path.resolve(__dirname, "./examples/datasets/foods1.csv"); describe("serde", () => { diff --git a/biome.json b/biome.json index 44dbddf90..7642165f2 100644 --- a/biome.json +++ b/biome.json @@ -1,15 +1,11 @@ { - "$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", - "organizeImports": { - "enabled": false - }, + "$schema": "https://biomejs.dev/schemas/1.9.2/schema.json", "linter": { "enabled": true, "rules": { "recommended": true, "style": { - "noParameterAssign": "off", - "useNodejsImportProtocol": "off" + "noParameterAssign": "off" }, "suspicious": { "noExplicitAny": "off", diff --git a/package.json b/package.json index 1a18bf86c..1328d38a7 100644 --- a/package.json +++ b/package.json @@ -54,11 +54,11 @@ "precommit": "yarn lint && yarn test" }, "devDependencies": { - "@biomejs/biome": "=1.8.3", + "@biomejs/biome": "=1.9.2", "@napi-rs/cli": "^2.18.4", "@types/chance": "^1.1.6", - "@types/jest": "^29.5.12", - "@types/node": "^22.5.4", + "@types/jest": "^29.5.13", + "@types/node": "^22.5.5", "chance": "^1.1.12", "jest": "^29.7.0", "source-map-support": "^0.5.21", diff --git a/polars/dataframe.ts b/polars/dataframe.ts index 77a9aa7df..66732287d 100644 --- a/polars/dataframe.ts +++ b/polars/dataframe.ts @@ -1,16 +1,16 @@ -import pli from "./internals/polars_internal"; -import { arrayToJsDataFrame } from "./internals/construction"; +import { Stream, Writable } from "node:stream"; +import { concat } from "./functions"; import { - _GroupBy, DynamicGroupBy, type GroupBy, RollingGroupBy, + _GroupBy, } from "./groupby"; -import { _LazyDataFrame, type LazyDataFrame } from "./lazy/dataframe"; -import { concat } from "./functions"; +import { arrayToJsDataFrame } from "./internals/construction"; +import pli from "./internals/polars_internal"; +import { type LazyDataFrame, _LazyDataFrame } from "./lazy/dataframe"; import { Expr } from "./lazy/expr"; -import { _Series, Series } from "./series"; -import { Stream, Writable } from "stream"; +import { Series, _Series } from "./series"; import type { FillNullStrategy, JoinOptions, @@ -23,13 +23,13 @@ import type { import { DataType } from "./datatypes"; import { - columnOrColumns, - columnOrColumnsStrict, type ColumnSelection, type ColumnsOrExpr, type ExprOrString, - isSeriesArray, type ValueOrArray, + columnOrColumns, + columnOrColumnsStrict, + isSeriesArray, } from "./utils"; import type { diff --git a/polars/functions.ts b/polars/functions.ts index 350272f89..9bc8f7e1b 100644 --- a/polars/functions.ts +++ b/polars/functions.ts @@ -1,11 +1,11 @@ +import { type DataFrame, _DataFrame } from "./dataframe"; /* eslint-disable no-redeclare */ import { jsTypeToPolarsType } from "./internals/construction"; -import { type Series, _Series } from "./series"; -import { type DataFrame, _DataFrame } from "./dataframe"; -import { type LazyDataFrame, _LazyDataFrame } from "./lazy/dataframe"; import pli from "./internals/polars_internal"; -import { isDataFrameArray, isLazyDataFrameArray, isSeriesArray } from "./utils"; +import { type LazyDataFrame, _LazyDataFrame } from "./lazy/dataframe"; +import { type Series, _Series } from "./series"; import type { ConcatOptions } from "./types"; +import { isDataFrameArray, isLazyDataFrameArray, isSeriesArray } from "./utils"; /** * _Repeat a single value n times and collect into a Series._ diff --git a/polars/groupby.ts b/polars/groupby.ts index ada5a1d19..b77a811d8 100644 --- a/polars/groupby.ts +++ b/polars/groupby.ts @@ -1,8 +1,8 @@ +import util from "node:util"; import { type DataFrame, _DataFrame } from "./dataframe"; -import * as utils from "./utils"; -import util from "util"; import type { Expr } from "./lazy/expr"; import { col, exclude } from "./lazy/functions"; +import * as utils from "./utils"; import type { ColumnsOrExpr, StartBy } from "./utils"; const inspect = Symbol.for("nodejs.util.inspect.custom"); diff --git a/polars/index.ts b/polars/index.ts index 5cff3c330..1b8a1339f 100644 --- a/polars/index.ts +++ b/polars/index.ts @@ -1,12 +1,12 @@ -import * as series from "./series"; import * as df from "./dataframe"; import { DataType, Field as _field } from "./datatypes"; +import * as series from "./series"; export { DataType } from "./datatypes"; +import * as cfg from "./cfg"; import * as func from "./functions"; +import pli from "./internals/polars_internal"; import * as io from "./io"; -import * as cfg from "./cfg"; import * as ldf from "./lazy/dataframe"; -import pli from "./internals/polars_internal"; export * from "./series"; export * from "./dataframe"; export * from "./functions"; diff --git a/polars/internals/construction.ts b/polars/internals/construction.ts index 7425877a7..52cc32e61 100644 --- a/polars/internals/construction.ts +++ b/polars/internals/construction.ts @@ -1,10 +1,10 @@ -import pli from "./polars_internal"; -import { DataType, polarsTypeToConstructor } from "../datatypes"; -import { isTypedArray } from "util/types"; -import { Series } from "../series"; +import { isTypedArray } from "node:util/types"; import { _DataFrame } from "../dataframe"; +import { DataType, polarsTypeToConstructor } from "../datatypes"; import { FixedSizeList, TimeUnit } from "../datatypes/datatype"; import { Field } from "../datatypes/field"; +import { Series } from "../series"; +import pli from "./polars_internal"; export const jsTypeToPolarsType = (value: unknown): DataType => { if (value === null) { diff --git a/polars/io.ts b/polars/io.ts index 7337a8d27..7c02b960b 100644 --- a/polars/io.ts +++ b/polars/io.ts @@ -1,11 +1,11 @@ +import { type Readable, Stream } from "node:stream"; +import { type DataFrame, _DataFrame } from "./dataframe"; import type { DataType } from "./datatypes"; +import { concat } from "./functions"; import pli from "./internals/polars_internal"; -import { type DataFrame, _DataFrame } from "./dataframe"; -import { isPath } from "./utils"; import { type LazyDataFrame, _LazyDataFrame } from "./lazy/dataframe"; -import { type Readable, Stream } from "stream"; -import { concat } from "./functions"; -import type { ScanParquetOptions, RowCount } from "./types"; +import type { RowCount, ScanParquetOptions } from "./types"; +import { isPath } from "./utils"; export interface ReadCsvOptions { inferSchemaLength: number | null; diff --git a/polars/lazy/dataframe.ts b/polars/lazy/dataframe.ts index 86d663d28..57c1031f5 100644 --- a/polars/lazy/dataframe.ts +++ b/polars/lazy/dataframe.ts @@ -1,23 +1,23 @@ import { type DataFrame, _DataFrame } from "../dataframe"; -import { Expr, exprToLitOrExpr } from "./expr"; import pli from "../internals/polars_internal"; -import { - columnOrColumnsStrict, - type ColumnSelection, - type ColumnsOrExpr, - type ExprOrString, - selectionToExprList, - type ValueOrArray, -} from "../utils"; -import { _LazyGroupBy, type LazyGroupBy } from "./groupby"; +import type { Series } from "../series"; import type { Deserialize, GroupByOps, Serialize } from "../shared_traits"; import type { - LazyOptions, LazyJoinOptions, + LazyOptions, SinkCsvOptions, SinkParquetOptions, } from "../types"; -import type { Series } from "../series"; +import { + type ColumnSelection, + type ColumnsOrExpr, + type ExprOrString, + type ValueOrArray, + columnOrColumnsStrict, + selectionToExprList, +} from "../utils"; +import { Expr, exprToLitOrExpr } from "./expr"; +import { type LazyGroupBy, _LazyGroupBy } from "./groupby"; const inspect = Symbol.for("nodejs.util.inspect.custom"); diff --git a/polars/lazy/expr/index.ts b/polars/lazy/expr/index.ts index 5827a629a..122079203 100644 --- a/polars/lazy/expr/index.ts +++ b/polars/lazy/expr/index.ts @@ -7,32 +7,32 @@ export type { ExprList as ListNamespace } from "./list"; export type { ExprDateTime as DatetimeNamespace } from "./datetime"; export type { ExprStruct as StructNamespace } from "./struct"; +import { isRegExp } from "node:util/types"; import type { DataType } from "../../datatypes"; import pli from "../../internals/polars_internal"; -import { - type ExprOrString, - selectionToExprList, - INSPECT_SYMBOL, - regexToString, -} from "../../utils"; import { Series } from "../../series"; import type { Arithmetic, Comparison, Cumulative, Deserialize, + EwmOps, Rolling, Round, Sample, Serialize, - EwmOps, } from "../../shared_traits"; import type { - InterpolationMethod, FillNullStrategy, + InterpolationMethod, RankMethod, } from "../../types"; -import { isRegExp } from "util/types"; +import { + type ExprOrString, + INSPECT_SYMBOL, + regexToString, + selectionToExprList, +} from "../../utils"; /** * Expressions that can be used in various contexts. */ diff --git a/polars/lazy/expr/list.ts b/polars/lazy/expr/list.ts index abe69affc..9040139ad 100644 --- a/polars/lazy/expr/list.ts +++ b/polars/lazy/expr/list.ts @@ -1,7 +1,7 @@ -import { Expr, _Expr, exprToLitOrExpr } from "../expr"; -import type { ListFunctions } from "../../shared_traits"; -import { Series } from "../../series"; import pli from "../../internals/polars_internal"; +import { Series } from "../../series"; +import type { ListFunctions } from "../../shared_traits"; +import { Expr, _Expr, exprToLitOrExpr } from "../expr"; import { concatList } from "../functions"; /** diff --git a/polars/lazy/expr/string.ts b/polars/lazy/expr/string.ts index 4264bcbbe..f4718f554 100644 --- a/polars/lazy/expr/string.ts +++ b/polars/lazy/expr/string.ts @@ -1,5 +1,5 @@ -import type { StringFunctions } from "../../shared_traits"; import { DataType } from "../../datatypes"; +import type { StringFunctions } from "../../shared_traits"; import { regexToString } from "../../utils"; import { Expr, _Expr, exprToLitOrExpr } from "../expr"; import { lit } from "../functions"; diff --git a/polars/lazy/expr/struct.ts b/polars/lazy/expr/struct.ts index 18cd5be2a..9ea4cb312 100644 --- a/polars/lazy/expr/struct.ts +++ b/polars/lazy/expr/struct.ts @@ -1,4 +1,4 @@ -import { _Expr, type Expr } from "../expr"; +import { type Expr, _Expr } from "../expr"; /** * Struct functions diff --git a/polars/lazy/functions.ts b/polars/lazy/functions.ts index 4eee5a5c5..2166feb48 100644 --- a/polars/lazy/functions.ts +++ b/polars/lazy/functions.ts @@ -1,9 +1,9 @@ -import { Expr, _Expr, exprToLitOrExpr } from "./expr"; +import { DataFrame } from "../dataframe"; import { DataType } from "../datatypes"; +import pli from "../internals/polars_internal"; import { Series } from "../series"; -import { DataFrame } from "../dataframe"; import { type ExprOrString, range, selectionToExprList } from "../utils"; -import pli from "../internals/polars_internal"; +import { Expr, _Expr, exprToLitOrExpr } from "./expr"; /** * __A column in a DataFrame.__ diff --git a/polars/lazy/groupby.ts b/polars/lazy/groupby.ts index 1aaf152b7..1938b024e 100644 --- a/polars/lazy/groupby.ts +++ b/polars/lazy/groupby.ts @@ -1,6 +1,6 @@ -import type { Expr } from "./expr"; import { selectionToExprList } from "../utils"; -import { _LazyDataFrame, type LazyDataFrame } from "./dataframe"; +import { type LazyDataFrame, _LazyDataFrame } from "./dataframe"; +import type { Expr } from "./expr"; /** @ignore */ export const _LazyGroupBy = (_lgb: any): LazyGroupBy => { diff --git a/polars/lazy/whenthen.ts b/polars/lazy/whenthen.ts index 318fa1a96..972c368ad 100644 --- a/polars/lazy/whenthen.ts +++ b/polars/lazy/whenthen.ts @@ -1,5 +1,5 @@ -import { Expr } from "./expr"; import pli from "../internals/polars_internal"; +import { Expr } from "./expr"; export interface When { /** Values to return in case of the predicate being `true`.*/ diff --git a/polars/series/index.ts b/polars/series/index.ts index fcd365999..7d40798a0 100644 --- a/polars/series/index.ts +++ b/polars/series/index.ts @@ -1,12 +1,15 @@ -import pli from "../internals/polars_internal"; -import { arrayToJsSeries } from "../internals/construction"; -import { DataType, DTYPE_TO_FFINAME, type Optional } from "../datatypes"; import { DataFrame, _DataFrame } from "../dataframe"; -import { SeriesStringFunctions, type StringNamespace } from "./string"; -import { type ListNamespace, SeriesListFunctions } from "./list"; -import { SeriesDateFunctions } from "./datetime"; -import { SeriesStructFunctions } from "./struct"; +import { DTYPE_TO_FFINAME, DataType, type Optional } from "../datatypes"; +import type { + DTypeToJs, + DtypeToJsName, + JsToDtype, + JsType, +} from "../datatypes/datatype"; import { InvalidOperationError } from "../error"; +import { arrayToJsSeries } from "../internals/construction"; +import pli from "../internals/polars_internal"; +import { col } from "../lazy/functions"; import type { Arithmetic, Comparison, @@ -18,14 +21,11 @@ import type { Sample, Serialize, } from "../shared_traits"; -import { col } from "../lazy/functions"; import type { InterpolationMethod, RankMethod } from "../types"; -import type { - DTypeToJs, - DtypeToJsName, - JsToDtype, - JsType, -} from "../datatypes/datatype"; +import { SeriesDateFunctions } from "./datetime"; +import { type ListNamespace, SeriesListFunctions } from "./list"; +import { SeriesStringFunctions, type StringNamespace } from "./string"; +import { SeriesStructFunctions } from "./struct"; const inspect = Symbol.for("nodejs.util.inspect.custom"); /** @@ -1528,16 +1528,32 @@ export function _Series(_s: any): Series { return this.length; }, lt(field) { - return dtypeWrap("Lt", field); + if (typeof field === "number") return dtypeWrap("Lt", field); + if (Series.isSeries(field)) { + return wrap("lt", (field as any)._s); + } + throw new Error("Not a number nor a series"); }, lessThan(field) { - return dtypeWrap("Lt", field); + if (typeof field === "number") return dtypeWrap("Lt", field); + if (Series.isSeries(field)) { + return wrap("lt", (field as any)._s); + } + throw new Error("Not a number nor a series"); }, ltEq(field) { - return dtypeWrap("LtEq", field); + if (typeof field === "number") return dtypeWrap("LtEq", field); + if (Series.isSeries(field)) { + return wrap("ltEq", (field as any)._s); + } + throw new Error("Not a number nor a series"); }, lessThanEquals(field) { - return dtypeWrap("LtEq", field); + if (typeof field === "number") return dtypeWrap("LtEq", field); + if (Series.isSeries(field)) { + return wrap("ltEq", (field as any)._s); + } + throw new Error("Not a number nor a series"); }, limit(n = 10) { return wrap("limit", n); @@ -1558,16 +1574,28 @@ export function _Series(_s: any): Series { return wrap("mode"); }, minus(other) { - return dtypeWrap("Sub", other); + if (typeof other === "number") return dtypeWrap("Sub", other); + if (Series.isSeries(other)) { + return wrap("sub", (other as any)._s); + } + throw new Error("Not a number nor a series"); }, mul(other) { - return dtypeWrap("Mul", other); + if (typeof other === "number") return dtypeWrap("Mul", other); + if (Series.isSeries(other)) { + return wrap("mul", (other as any)._s); + } + throw new Error("Not a number nor a series"); }, nChunks() { return _s.nChunks(); }, neq(other) { - return dtypeWrap("Neq", other); + if (typeof other === "number") return dtypeWrap("Neq", other); + if (Series.isSeries(other)) { + return wrap("neq", (other as any)._s); + } + throw new Error("Not a number nor a series"); }, notEquals(other) { return this.neq(other); @@ -1585,7 +1613,11 @@ export function _Series(_s: any): Series { return expr_op("peakMin"); }, plus(other) { - return dtypeWrap("Add", other); + if (typeof other === "number") return dtypeWrap("Add", other); + if (Series.isSeries(other)) { + return wrap("add", (other as any)._s); + } + throw new Error("Not a number nor a series"); }, quantile(quantile, interpolation = "nearest") { return _s.quantile(quantile, interpolation); diff --git a/polars/series/string.ts b/polars/series/string.ts index afb249cb7..a2ad7baae 100644 --- a/polars/series/string.ts +++ b/polars/series/string.ts @@ -1,9 +1,9 @@ -import type { Expr } from "./../lazy/expr/index"; +import { type Series, _Series } from "."; import type { DataType } from "../datatypes"; -import { _Series, type Series } from "."; -import { regexToString } from "../utils"; import { col } from "../lazy/functions"; import type { StringFunctions } from "../shared_traits"; +import { regexToString } from "../utils"; +import type { Expr } from "./../lazy/expr/index"; /** * namespace containing series string functions diff --git a/polars/series/struct.ts b/polars/series/struct.ts index db66c2973..3b786a56d 100644 --- a/polars/series/struct.ts +++ b/polars/series/struct.ts @@ -1,6 +1,6 @@ +import { type Series, _Series } from "."; +import { DataFrame, _DataFrame } from "../dataframe"; import pli from "../internals/polars_internal"; -import { _DataFrame, DataFrame } from "../dataframe"; -import { _Series, type Series } from "."; import { _Expr } from "../lazy/expr"; export interface SeriesStructFunctions { diff --git a/polars/shared_traits.ts b/polars/shared_traits.ts index 3ef3cc956..06856cbe8 100644 --- a/polars/shared_traits.ts +++ b/polars/shared_traits.ts @@ -1,14 +1,14 @@ -import type { ColumnsOrExpr, StartBy } from "./utils"; import { type Expr, _Expr } from "./lazy/expr"; +import type { ColumnsOrExpr, StartBy } from "./utils"; +import type { DataType } from "./datatypes"; import type { + ClosedWindow, InterpolationMethod, RollingOptions, RollingQuantileOptions, RollingSkewOptions, - ClosedWindow, } from "./types"; -import type { DataType } from "./datatypes"; /** * Arithmetic operations diff --git a/polars/utils.ts b/polars/utils.ts index 8ebd4d8ea..70fe781a4 100644 --- a/polars/utils.ts +++ b/polars/utils.ts @@ -1,9 +1,9 @@ -import { Expr, exprToLitOrExpr } from "./lazy/expr"; -import { Series } from "./series"; +import path from "node:path"; +import { isExternal, isRegExp } from "node:util/types"; import { DataFrame } from "./dataframe"; import { LazyDataFrame } from "./lazy/dataframe"; -import path from "path"; -import { isExternal, isRegExp } from "util/types"; +import { Expr, exprToLitOrExpr } from "./lazy/expr"; +import { Series } from "./series"; /** @ignore */ export type ValueOrArray = T | Array>; /** @ignore */ diff --git a/rust-toolchain b/rust-toolchain index 8a20f5472..41ef6a6ed 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2024-08-26 \ No newline at end of file +nightly-2024-09-19 \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 2c32336ab..8f9945fcc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -412,18 +412,18 @@ __metadata: languageName: node linkType: hard -"@biomejs/biome@npm:=1.8.3": - version: 1.8.3 - resolution: "@biomejs/biome@npm:1.8.3" - dependencies: - "@biomejs/cli-darwin-arm64": "npm:1.8.3" - "@biomejs/cli-darwin-x64": "npm:1.8.3" - "@biomejs/cli-linux-arm64": "npm:1.8.3" - "@biomejs/cli-linux-arm64-musl": "npm:1.8.3" - "@biomejs/cli-linux-x64": "npm:1.8.3" - "@biomejs/cli-linux-x64-musl": "npm:1.8.3" - "@biomejs/cli-win32-arm64": "npm:1.8.3" - "@biomejs/cli-win32-x64": "npm:1.8.3" +"@biomejs/biome@npm:=1.9.2": + version: 1.9.2 + resolution: "@biomejs/biome@npm:1.9.2" + dependencies: + "@biomejs/cli-darwin-arm64": "npm:1.9.2" + "@biomejs/cli-darwin-x64": "npm:1.9.2" + "@biomejs/cli-linux-arm64": "npm:1.9.2" + "@biomejs/cli-linux-arm64-musl": "npm:1.9.2" + "@biomejs/cli-linux-x64": "npm:1.9.2" + "@biomejs/cli-linux-x64-musl": "npm:1.9.2" + "@biomejs/cli-win32-arm64": "npm:1.9.2" + "@biomejs/cli-win32-x64": "npm:1.9.2" dependenciesMeta: "@biomejs/cli-darwin-arm64": optional: true @@ -443,62 +443,62 @@ __metadata: optional: true bin: biome: bin/biome - checksum: 10/62dfa5147712ef21c384ea7b3c93c0ccac58291a85f2bbd2dee22c8381da5e347cd07bdb7bfcafcecb07fc112349e9d101e697774155553bde987fd47f9b12a1 + checksum: 10/154179a3e0160e7430e311bd9c39ddc37160296374bb16361798620a81febba2a514f685d5fceb85169f93f3fbdff048ea4b34c41736234ce3e42b3ea306e0fd languageName: node linkType: hard -"@biomejs/cli-darwin-arm64@npm:1.8.3": - version: 1.8.3 - resolution: "@biomejs/cli-darwin-arm64@npm:1.8.3" +"@biomejs/cli-darwin-arm64@npm:1.9.2": + version: 1.9.2 + resolution: "@biomejs/cli-darwin-arm64@npm:1.9.2" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@biomejs/cli-darwin-x64@npm:1.8.3": - version: 1.8.3 - resolution: "@biomejs/cli-darwin-x64@npm:1.8.3" +"@biomejs/cli-darwin-x64@npm:1.9.2": + version: 1.9.2 + resolution: "@biomejs/cli-darwin-x64@npm:1.9.2" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@biomejs/cli-linux-arm64-musl@npm:1.8.3": - version: 1.8.3 - resolution: "@biomejs/cli-linux-arm64-musl@npm:1.8.3" +"@biomejs/cli-linux-arm64-musl@npm:1.9.2": + version: 1.9.2 + resolution: "@biomejs/cli-linux-arm64-musl@npm:1.9.2" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@biomejs/cli-linux-arm64@npm:1.8.3": - version: 1.8.3 - resolution: "@biomejs/cli-linux-arm64@npm:1.8.3" +"@biomejs/cli-linux-arm64@npm:1.9.2": + version: 1.9.2 + resolution: "@biomejs/cli-linux-arm64@npm:1.9.2" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@biomejs/cli-linux-x64-musl@npm:1.8.3": - version: 1.8.3 - resolution: "@biomejs/cli-linux-x64-musl@npm:1.8.3" +"@biomejs/cli-linux-x64-musl@npm:1.9.2": + version: 1.9.2 + resolution: "@biomejs/cli-linux-x64-musl@npm:1.9.2" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@biomejs/cli-linux-x64@npm:1.8.3": - version: 1.8.3 - resolution: "@biomejs/cli-linux-x64@npm:1.8.3" +"@biomejs/cli-linux-x64@npm:1.9.2": + version: 1.9.2 + resolution: "@biomejs/cli-linux-x64@npm:1.9.2" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@biomejs/cli-win32-arm64@npm:1.8.3": - version: 1.8.3 - resolution: "@biomejs/cli-win32-arm64@npm:1.8.3" +"@biomejs/cli-win32-arm64@npm:1.9.2": + version: 1.9.2 + resolution: "@biomejs/cli-win32-arm64@npm:1.9.2" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@biomejs/cli-win32-x64@npm:1.8.3": - version: 1.8.3 - resolution: "@biomejs/cli-win32-x64@npm:1.8.3" +"@biomejs/cli-win32-x64@npm:1.9.2": + version: 1.9.2 + resolution: "@biomejs/cli-win32-x64@npm:1.9.2" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -1062,13 +1062,13 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:^29.5.12": - version: 29.5.12 - resolution: "@types/jest@npm:29.5.12" +"@types/jest@npm:^29.5.13": + version: 29.5.13 + resolution: "@types/jest@npm:29.5.13" dependencies: expect: "npm:^29.0.0" pretty-format: "npm:^29.0.0" - checksum: 10/312e8dcf92cdd5a5847d6426f0940829bca6fe6b5a917248f3d7f7ef5d85c9ce78ef05e47d2bbabc40d41a930e0e36db2d443d2610a9e3db9062da2d5c904211 + checksum: 10/7d6e3e4ef4b1cab0f61270d55764709512fdfbcb1bd47c0ef44117d48490529c1f264dacf3440b9188363e99e290b80b79c529eadc3af2184116a90f6856b192 languageName: node linkType: hard @@ -1090,12 +1090,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^22.5.4": - version: 22.5.4 - resolution: "@types/node@npm:22.5.4" +"@types/node@npm:^22.5.5": + version: 22.5.5 + resolution: "@types/node@npm:22.5.5" dependencies: undici-types: "npm:~6.19.2" - checksum: 10/d46e0abf437b36bdf89011287aa43873d68ea6f2521a11b5c9a033056fd0d07af36daf51439010e8d41c62c55d0b00e9b5e09ed00bb2617723f73f28a873903a + checksum: 10/172d02c8e6d921699edcf559c28b3805616bd6481af1b3cb0299f89ad9a6f33b71050434c06ce7b503166054a26275344187c443f99f745d0b12601372452f19 languageName: node linkType: hard @@ -3305,11 +3305,11 @@ __metadata: version: 0.0.0-use.local resolution: "nodejs-polars@workspace:." dependencies: - "@biomejs/biome": "npm:=1.8.3" + "@biomejs/biome": "npm:=1.9.2" "@napi-rs/cli": "npm:^2.18.4" "@types/chance": "npm:^1.1.6" - "@types/jest": "npm:^29.5.12" - "@types/node": "npm:^22.5.4" + "@types/jest": "npm:^29.5.13" + "@types/node": "npm:^22.5.5" chance: "npm:^1.1.12" jest: "npm:^29.7.0" source-map-support: "npm:^0.5.21"