Skip to content

ci: add spellchecker to pr tests #3457

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

Merged
merged 1 commit into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 8 additions & 0 deletions .github/workflows/dev_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,11 @@ jobs:
body: message
})
core.setFailed(message)

typos:
name: Spell Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/typos@v1
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ debug = true
debug = "line-tables-only"

[workspace.dependencies]
delta_kernel = { version = "0.10.0", features = [
"arrow-55",
"internal-api",
] }
delta_kernel = { version = "0.10.0", features = ["arrow-55", "internal-api"] }

# arrow
arrow = { version = "=55.0.0" }
Expand Down Expand Up @@ -78,3 +75,6 @@ async-trait = { version = "0.1" }
futures = { version = "0.3" }
tokio = { version = "1" }
num_cpus = { version = "1" }

[workspace.metadata.typos]
default.extend-ignore-re = ["(?Rm)^.*(#|//)\\s*spellchecker:disable-line$"]
2 changes: 1 addition & 1 deletion crates/core/src/logstore/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ pub async fn get_latest_version(
let part_count = location_path.prefix_match(prefix).unwrap().count();
if part_count > 1 {
// Per the spec, ignore any files in subdirectories.
// Spark may create these as uncommited transactions which we don't want
// Spark may create these as uncommitted transactions which we don't want
//
// https://github.com/delta-io/delta/blob/master/PROTOCOL.md#delta-log-entries
// "Delta files are stored as JSON in a directory at the *root* of the table
Expand Down
6 changes: 3 additions & 3 deletions crates/core/src/operations/constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ mod tests {
async fn test_constraint_case_sensitive() -> DeltaResult<()> {
let arrow_schema = Arc::new(ArrowSchema::new(vec![
Field::new("Id", ArrowDataType::Utf8, true),
Field::new("vAlue", ArrowDataType::Int32, true),
Field::new("vAlue", ArrowDataType::Int32, true), // spellchecker:disable-line
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😆

Field::new("mOdifieD", ArrowDataType::Utf8, true),
]));

Expand All @@ -389,12 +389,12 @@ mod tests {

let mut table = DeltaOps(table)
.add_constraint()
.with_constraint("valid_values", "vAlue < 1000")
.with_constraint("valid_values", "vAlue < 1000") // spellchecker:disable-line
.await?;
let version = table.version();
assert_eq!(version, 1);

let expected_expr = "vAlue < 1000";
let expected_expr = "vAlue < 1000"; // spellchecker:disable-line
assert_eq!(get_constraint_op_params(&mut table).await, expected_expr);
assert_eq!(
get_constraint(&table, "delta.constraints.valid_values"),
Expand Down
8 changes: 4 additions & 4 deletions crates/core/src/operations/merge/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3324,7 +3324,7 @@ mod tests {
true,
),
StructField::new(
"vAlue".to_string(),
"vAlue".to_string(), // spellchecker:disable-line
DataType::Primitive(PrimitiveType::Integer),
true,
),
Expand All @@ -3337,7 +3337,7 @@ mod tests {

let arrow_schema = Arc::new(ArrowSchema::new(vec![
Field::new("Id", ArrowDataType::Utf8, true),
Field::new("vAlue", ArrowDataType::Int32, true),
Field::new("vAlue", ArrowDataType::Int32, true), // spellchecker:disable-line
Field::new("mOdifieD", ArrowDataType::Utf8, true),
]));

Expand Down Expand Up @@ -3374,7 +3374,7 @@ mod tests {
.when_not_matched_insert(|insert| {
insert
.set("Id", "source.Id")
.set("vAlue", "source.vAlue + 1")
.set("vAlue", "source.vAlue + 1") // spellchecker:disable-line
.set("mOdifieD", "source.mOdifieD")
})
.unwrap()
Expand All @@ -3383,7 +3383,7 @@ mod tests {

let expected = vec![
"+----+-------+------------+",
"| Id | vAlue | mOdifieD |",
"| Id | vAlue | mOdifieD |", // spellchecker:disable-line
"+----+-------+------------+",
"| A | 1 | 2021-02-01 |",
"| B | 10 | 2021-02-01 |",
Expand Down
6 changes: 3 additions & 3 deletions crates/core/src/operations/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ mod tests {
true,
),
StructField::new(
"ValUe".to_string(),
"ValUe".to_string(), // spellchecker:disable-line
DeltaDataType::Primitive(PrimitiveType::Integer),
true,
),
Expand All @@ -876,7 +876,7 @@ mod tests {

let arrow_schema = Arc::new(ArrowSchema::new(vec![
Field::new("Id", DataType::Utf8, true),
Field::new("ValUe", DataType::Int32, true),
Field::new("ValUe", DataType::Int32, true), // spellchecker:disable-line
Field::new("mOdified", DataType::Utf8, true),
]));

Expand Down Expand Up @@ -912,7 +912,7 @@ mod tests {

let expected = vec![
"+----+-------+------------+",
"| Id | ValUe | mOdified |",
"| Id | ValUe | mOdified |", // spellchecker:disable-line
"+----+-------+------------+",
"| A | 1 | 2021-02-02 |",
"| B | 10 | 2021-02-02 |",
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/table/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ impl DeltaTable {
let part_count = location_path.prefix_match(prefix).unwrap().count();
if part_count > 1 {
// Per the spec, ignore any files in subdirectories.
// Spark may create these as uncommited transactions which we don't want
// Spark may create these as uncommitted transactions which we don't want
//
// https://github.com/delta-io/delta/blob/master/PROTOCOL.md#delta-log-entries
// "Delta files are stored as JSON in a directory at the *root* of the table
Expand Down
Loading