Skip to content

Commit bb80c53

Browse files
committed
fix: restore lint checks on forks
Signed-off-by: Luke Kim <80174+lukekim@users.noreply.github.com>
1 parent 9c934a6 commit bb80c53

3 files changed

Lines changed: 27 additions & 14 deletions

File tree

  • .github/workflows
  • vortex-array/src/arrays/extension/compute
  • vortex-datafusion/src/persistent

.github/workflows/ci.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,17 @@ jobs:
6060
sccache: s3
6161
- uses: actions/checkout@v6
6262
- uses: ./.github/actions/setup-prebuild
63-
# Use uvx for ruff to avoid building the Rust extension (saves ~4.5 min)
63+
- name: Install uv
64+
if: github.repository != 'vortex-data/vortex'
65+
uses: spiraldb/actions/.github/actions/setup-uv@0.18.5
66+
with:
67+
sync: false
68+
prune-cache: false
69+
# Use uv tool run for ruff to avoid building the Rust extension (saves ~4.5 min)
6470
- name: Python Lint - Format
65-
run: uvx ruff format --check .
71+
run: uv tool run ruff format --check .
6672
- name: Python Lint - Ruff
67-
run: uvx ruff check .
73+
run: uv tool run ruff check .
6874
# PyRight needs the project for type information, so use uv run
6975
- name: Python Lint - PyRight
7076
env:
@@ -293,10 +299,14 @@ jobs:
293299
sccache: s3
294300
- uses: actions/checkout@v6
295301
- uses: ./.github/actions/setup-prebuild
302+
- name: Install cargo-hack
303+
if: github.repository != 'vortex-data/vortex'
304+
shell: bash
305+
run: command -v cargo-hack >/dev/null || cargo install --locked cargo-hack
296306
- name: Rust Lint - Clippy No Default Features
297307
shell: bash
298308
run: |
299-
cargo hack --no-dev-deps --ignore-private clippy --profile ci --no-default-features -- -D warnings
309+
cargo hack --ignore-private clippy --profile ci --no-default-features -- -D warnings
300310
301311
public-api:
302312
name: "Public API lock files"

vortex-array/src/arrays/extension/compute/cast.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,7 @@ fn cast_date_values_to_timestamp(
127127
}
128128
}
129129

130-
Ok(PrimitiveArray::new(
131-
output.freeze(),
132-
values.validity()?,
133-
))
130+
Ok(PrimitiveArray::new(output.freeze(), values.validity()?))
134131
}
135132

136133
fn date_to_timestamp_scale(

vortex-datafusion/src/persistent/sink.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,8 +1514,10 @@ mod tests {
15141514
let mut partitions: Vec<Arc<dyn PartitionStream>> = Vec::new();
15151515
for p in 0..num_partitions {
15161516
let values = pseudo_random_i64s(rows_per_partition, (p * rows_per_partition) as i64);
1517-
let batch =
1518-
RecordBatch::try_new(Arc::clone(&schema), vec![Arc::new(Int64Array::from(values))])?;
1517+
let batch = RecordBatch::try_new(
1518+
Arc::clone(&schema),
1519+
vec![Arc::new(Int64Array::from(values))],
1520+
)?;
15191521

15201522
partitions.push(Arc::new(StaticPartitionStream {
15211523
schema: Arc::clone(&schema),
@@ -1631,8 +1633,10 @@ mod tests {
16311633
let mut partitions: Vec<Arc<dyn PartitionStream>> = Vec::new();
16321634
for p in 0..num_partitions {
16331635
let values = pseudo_random_i64s(rows_per_partition, (p * rows_per_partition) as i64);
1634-
let batch =
1635-
RecordBatch::try_new(Arc::clone(&schema), vec![Arc::new(Int64Array::from(values))])?;
1636+
let batch = RecordBatch::try_new(
1637+
Arc::clone(&schema),
1638+
vec![Arc::new(Int64Array::from(values))],
1639+
)?;
16361640

16371641
partitions.push(Arc::new(StaticPartitionStream {
16381642
schema: Arc::clone(&schema),
@@ -1752,8 +1756,10 @@ mod tests {
17521756
let mut partitions: Vec<Arc<dyn PartitionStream>> = Vec::new();
17531757
for p in 0..num_partitions {
17541758
let values = pseudo_random_i64s(rows_per_partition, (p * rows_per_partition) as i64);
1755-
let batch =
1756-
RecordBatch::try_new(Arc::clone(&schema), vec![Arc::new(Int64Array::from(values))])?;
1759+
let batch = RecordBatch::try_new(
1760+
Arc::clone(&schema),
1761+
vec![Arc::new(Int64Array::from(values))],
1762+
)?;
17571763

17581764
partitions.push(Arc::new(StaticPartitionStream {
17591765
schema: Arc::clone(&schema),

0 commit comments

Comments
 (0)