Skip to content

Commit

Permalink
chore: update rustc (#4985)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Sep 26, 2022
1 parent 8c15fe8 commit 2b98efe
Show file tree
Hide file tree
Showing 31 changed files with 124 additions and 110 deletions.
2 changes: 1 addition & 1 deletion .github/deploy_manylinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ls -la
rm py-polars/README.md
cp README.md py-polars/README.md
cd py-polars
rustup override set nightly-2022-08-22
rustup override set nightly-2022-09-26
export RUSTFLAGS='-C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma'

# first the default release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-08-22
toolchain: nightly-2022-09-26

- name: Cache Rust
uses: Swatinem/rust-cache@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-test-rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-08-22
toolchain: nightly-2022-09-26

- name: Cache Rust
uses: Swatinem/rust-cache@v2
Expand All @@ -58,7 +58,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-08-22
toolchain: nightly-2022-09-26
components: rustfmt, clippy, miri

- name: Cache Rust
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-08-22
toolchain: nightly-2022-09-26

- name: Cache Rust
uses: Swatinem/rust-cache@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-py-mac-universal2-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-08-22
toolchain: nightly-2022-09-26
- name: Setup universal2 targets for Rust
run: |
rustup target add aarch64-apple-darwin
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-py-release-manylinux-lts-cpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt
with:
rust-toolchain: nightly-2022-08-22
rust-toolchain: nightly-2022-09-26
maturin-version: '0.13.2'
command: publish
args: -m py-polars/Cargo.toml --skip-existing -o wheels -u ritchie46
6 changes: 3 additions & 3 deletions .github/workflows/create-py-release-manylinux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
with:
rust-toolchain: nightly-2022-08-22
rust-toolchain: nightly-2022-09-26
maturin-version: '0.13.2'
command: publish
args: -m py-polars/Cargo.toml --skip-existing -o wheels -u ritchie46
Expand All @@ -38,7 +38,7 @@ jobs:
env:
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
with:
rust-toolchain: nightly-2022-08-22
rust-toolchain: nightly-2022-09-26
target: aarch64-unknown-linux-gnu
maturin-version: '0.13.2'
command: publish
Expand All @@ -57,7 +57,7 @@ jobs:
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
with:
rust-toolchain: nightly-2022-08-22
rust-toolchain: nightly-2022-09-26
maturin-version: '0.13.2'
command: publish
args: -m py-polars/Cargo.toml --skip-existing -o wheels -u ritchie46
2 changes: 1 addition & 1 deletion .github/workflows/create-py-release-windows-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-08-22
toolchain: nightly-2022-09-26
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-08-22
toolchain: nightly-2022-09-26
components: rust-docs
- name: Set up Python
uses: actions/setup-python@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-08-22
toolchain: nightly-2022-09-26
components: rustfmt, clippy
- name: Cache Rust
uses: Swatinem/rust-cache@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-08-22
toolchain: nightly-2022-09-26

- name: Cache Rust
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2022-08-22
toolchain: nightly-2022-09-26

- name: Cache Rust
uses: Swatinem/rust-cache@v2
Expand Down
34 changes: 34 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,39 @@ members = [
"examples/python_rust_compiled_function",
]

[workspace.package]
version = "0.24.2"

[workspace.dependencies]
rayon = "1.5"
thiserror = "^1"
num = "0.4"
ahash = "0.7"
# todo! remove
anyhow = "1"
hashbrown = { version = "0.12", features = ["rayon"] }
parking_lot = "0.12"

[workspace.dependencies.arrow]
package = "arrow2"
# git = "https://github.com/jorgecarleitao/arrow2"
# git = "https://github.com/ritchie46/arrow2"
# rev = "6c102a0c3e2dbeb185360dd3d5c3637b5e2028fd"
# path = "../../../arrow2"
# branch = "comparison_and_validity"
version = "0.14"
default-features = false
features = [
"compute_aggregate",
"compute_arithmetics",
"compute_boolean",
"compute_boolean_kleene",
"compute_cast",
"compute_comparison",
"compute_concatenate",
"compute_filter",
"compute_if_then_else",
]

[patch.crates-io]
# packed_simd_2 = { git = "https://github.com/rust-lang/packed_simd", rev = "e57c7ba11386147e6d2cbad7c88f376aab4bdc86" }
2 changes: 1 addition & 1 deletion polars/polars-algo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polars-algo"
version = "0.24.2"
version.workspace = true
authors = ["hpux735 <william@housedillon.com>"]
edition = "2021"
license = "MIT"
Expand Down
13 changes: 5 additions & 8 deletions polars/polars-arrow/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polars-arrow"
version = "0.24.2"
version.workspace = true
authors = ["ritchie46 <ritchie46@gmail.com>"]
edition = "2021"
license = "MIT"
Expand All @@ -9,14 +9,11 @@ description = "Arrow interfaces for Polars DataFrame library"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
# arrow = { package = "arrow2", git = "https://github.com/jorgecarleitao/arrow2", rev = "6c102a0c3e2dbeb185360dd3d5c3637b5e2028fd", features = ["compute_concatenate"], default-features = false }
# arrow = { package = "arrow2", path = "../../../arrow2", features = ["compute_concatenate"], default-features = false }
# arrow = { package = "arrow2", git = "https://github.com/ritchie46/arrow2", branch = "comparison_and_validity", features = ["compute_concatenate"], default-features = false }
arrow = { package = "arrow2", version = "0.14", default-features = false, features = ["compute_concatenate"] }
hashbrown = "0.12"
num = "^0.4"
arrow.workspace = true
hashbrown.workspace = true
num.workspace = true
serde = { version = "1", features = ["derive"], optional = true }
thiserror = "^1.0"
thiserror.workspace = true

[features]
strings = []
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-arrow/src/kernels/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fn sublist_get_indexes(arr: &ListArray<i64>, index: i64) -> IdxArr {

a
} else {
IdxArr::from_slice(&[])
IdxArr::from_slice([])
}
}

Expand Down
36 changes: 8 additions & 28 deletions polars/polars-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polars-core"
version = "0.24.2"
version.workspace = true
authors = ["ritchie46 <ritchie46@gmail.com>"]
edition = "2021"
license = "MIT"
Expand Down Expand Up @@ -145,52 +145,32 @@ docs-selection = [
]

[dependencies]
ahash = "0.7"
anyhow = "1.0"
ahash.workspace = true
anyhow.workspace = true
arrow.workspace = true
base64 = { version = "0.13", optional = true }
bitflags = "1.3"
chrono = { version = "0.4", optional = true }
chrono-tz = { version = "0.6", optional = true }
comfy-table = { version = "5.0", optional = true }
hashbrown = { version = "0.12", features = ["rayon"] }
hashbrown.workspace = true
hex = { version = "0.4", optional = true }
indexmap = { version = "1", features = ["std"] }
jsonpath_lib = { version = "0.3.0", optional = true, git = "https://github.com/ritchie46/jsonpath", branch = "improve_compiled" }
ndarray = { version = "0.15", optional = true, default_features = false }
num = "^0.4"
num.workspace = true
once_cell = "1"
polars-arrow = { version = "0.24.2", path = "../polars-arrow", features = ["compute"] }
polars-utils = { version = "0.24.2", path = "../polars-utils" }
rand = { version = "0.8", optional = true, features = ["small_rng", "std"] }
rand_distr = { version = "0.4", optional = true }
rayon = "1.5"
rayon.worspace = true
regex = { version = "1.5", optional = true }
# activate if you want serde support for Series and DataFrames
serde = { version = "1", features = ["derive"], optional = true }
serde_json = { version = "1", optional = true }
smartstring = { version = "1", optional = true }
thiserror = "^1.0"

[dependencies.arrow]
package = "arrow2"
# git = "https://github.com/jorgecarleitao/arrow2"
# git = "https://github.com/ritchie46/arrow2"
# rev = "6c102a0c3e2dbeb185360dd3d5c3637b5e2028fd"
# path = "../../../arrow2"
# branch = "comparison_and_validity"
version = "0.14"
default-features = false
features = [
"compute_aggregate",
"compute_arithmetics",
"compute_boolean",
"compute_boolean_kleene",
"compute_cast",
"compute_comparison",
"compute_concatenate",
"compute_filter",
"compute_if_then_else",
]
thiserror.workspace = true

[dev-dependencies]
bincode = "1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ impl CategoricalChunked {
counts.rename("counts");
let cols = vec![values.into_series(), counts.into_series()];
let df = DataFrame::new_no_checks(cols);
df.sort(&["counts"], true)
df.sort(["counts"], true)
}
}
2 changes: 2 additions & 0 deletions polars/polars-core/src/chunked_array/ops/unique/rank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ pub(crate) fn rank(s: &Series, method: RankMethod, reverse: bool) -> Series {
// if method == 'min':
// return count[dense - 1] + 1
// ```
// INVALID LINT REMOVE LATER
#[allow(clippy::bool_to_int_with_if)]
let mut cumsum: IdxSize = if let RankMethod::Min = method { 0 } else { 1 };

dense.push(cumsum);
Expand Down
4 changes: 2 additions & 2 deletions polars/polars-core/src/frame/row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,8 @@ impl<'a> AnyValueBuffer<'a> {
AnyValue::Utf8(v) => builder.append_value(v),
AnyValue::Int64(v) => builder.append_value(&format!("{}", v)),
AnyValue::Float64(v) => builder.append_value(&format!("{}", v)),
AnyValue::Boolean(true) => builder.append_value(&"true"),
AnyValue::Boolean(false) => builder.append_value(&"false"),
AnyValue::Boolean(true) => builder.append_value("true"),
AnyValue::Boolean(false) => builder.append_value("false"),
_ => return None,
},
_ => return None,
Expand Down
15 changes: 6 additions & 9 deletions polars/polars-io/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polars-io"
version = "0.24.2"
version.workspace = true
authors = ["ritchie46 <ritchie46@gmail.com>"]
edition = "2021"
license = "MIT"
Expand Down Expand Up @@ -36,26 +36,23 @@ temporal = ["dtype-datetime", "dtype-date", "dtype-time"]
private = ["polars-time/private"]

[dependencies]
ahash = "0.7"
anyhow = "1.0"
# arrow = { package = "arrow2", git = "https://github.com/jorgecarleitao/arrow2", rev = "6c102a0c3e2dbeb185360dd3d5c3637b5e2028fd", default-features = false }
# arrow = { package = "arrow2", git = "https://github.com/ritchie46/arrow2", branch = "comparison_and_validity", default-features = false }
arrow = { package = "arrow2", version = "0.14", default-features = false }
# arrow = { package = "arrow2", path = "../../../arrow2", default-features = false }
ahash.workspace = true
anyhow.workspace = true
arrow.workspace = true
csv-core = { version = "0.1.10", optional = true }
dirs = "4.0"
flate2 = { version = "1", optional = true, default-features = false }
lexical = { version = "6", optional = true, default-features = false, features = ["std", "parse-floats", "parse-integers"] }
lexical-core = { version = "0.8", optional = true }
memchr = "2.4"
memmap = { package = "memmap2", version = "0.5.2", optional = true }
num = "^0.4"
num.workspace = true
once_cell = "1"
polars-arrow = { version = "0.24.2", path = "../polars-arrow" }
polars-core = { version = "0.24.2", path = "../polars-core", features = ["private"], default-features = false }
polars-time = { version = "0.24.2", path = "../polars-time", features = ["private"], default-features = false, optional = true }
polars-utils = { version = "0.24.2", path = "../polars-utils" }
rayon = "1.5"
rayon.workspace = true
regex = "1.5"
serde = { version = "1", features = ["derive"], optional = true }
serde_json = { version = "1", optional = true, default-features = false, features = ["alloc"] }
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-io/src/csv/read_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ impl<'a> CoreReader<'a> {
reader_bytes: Some(reader_bytes),
schema,
projection,
line_number: if has_header { 1 } else { 0 },
line_number: usize::from(has_header),
ignore_parser_errors,
skip_rows_before_header: skip_rows,
skip_rows_after_header,
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-io/src/ipc/ipc_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ where

fn fix_column_order(df: DataFrame, projection: Option<Vec<usize>>, row_count: bool) -> DataFrame {
if let Some(proj) = projection {
let offset = if row_count { 1 } else { 0 };
let offset = usize::from(row_count);
let mut args = (0..proj.len()).zip(proj).collect::<Vec<_>>();
// first el of tuple is argument index
// second el is the projection index
Expand Down
8 changes: 4 additions & 4 deletions polars/polars-lazy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polars-lazy"
version = "0.24.2"
version.workspace = true
authors = ["ritchie46 <ritchie46@gmail.com>"]
edition = "2021"
license = "MIT"
Expand Down Expand Up @@ -124,12 +124,12 @@ test_all = [
]

[dependencies]
ahash = "0.7"
ahash.workspace = true
bitflags = "1.3"
glob = "0.3"
parking_lot = "0.12"
parking_lot.workspace = true
pyo3 = { version = "0.16", optional = true }
rayon = "1.5"
rayon.workspace = true
regex = { version = "1.5", optional = true }
serde = { version = "1", features = ["derive", "rc"], optional = true }

Expand Down

0 comments on commit 2b98efe

Please sign in to comment.