Skip to content

Commit b1aa760

Browse files
Add taplo lint (#282)
1 parent 37762b1 commit b1aa760

10 files changed

Lines changed: 55 additions & 38 deletions

File tree

.github/actions/setup-rust/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@ runs:
3333
rustup install stable
3434
rustup default stable
3535
rustup component add clippy
36+
- name: Install Cargo tools
37+
shell: bash
38+
run: |
39+
cargo install taplo-cli --locked

.github/workflows/checks.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ jobs:
2929
- uses: actions/checkout@v2
3030
- name: Setup Rust Toolchain
3131
uses: ./.github/actions/setup-rust
32-
- name: Run
32+
- name: Run cargo fmt
3333
run: cargo fmt --all -- --check
34+
- name: Run taplo
35+
run: taplo format --check
3436
clippy:
3537
name: Clippy
3638
runs-on: ubuntu-latest

Cargo.toml

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[package]
2-
name = "datafusion-dft"
2+
authors = ["Matthew Turner <matthew.m.turner@outlook.com>"]
3+
default-run = "dft"
34
description = "An opinionated and batteries included DataFusion implementation"
5+
edition = "2021"
46
homepage = "https://github.com/datafusion-contrib/datafusion-dft"
5-
repository = "https://github.com/datafusion-contrib/datafusion-dft"
6-
readme = "README.md"
7-
authors = ["Matthew Turner <matthew.m.turner@outlook.com>"]
7+
keywords = ["arrow", "datafusion", "query", "sql"]
88
license = "Apache-2.0"
9-
keywords = ["arrow", "query", "sql", "datafusion"]
9+
name = "datafusion-dft"
10+
readme = "README.md"
11+
repository = "https://github.com/datafusion-contrib/datafusion-dft"
1012
version = "0.2.2"
11-
edition = "2021"
12-
default-run = "dft"
1313

1414
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1515

@@ -18,6 +18,7 @@ arrow-flight = { version = "54.1.0", features = [
1818
"flight-sql-experimental",
1919
], optional = true }
2020
async-trait = "0.1.80"
21+
base64 = { version = "0.22.1", optional = true }
2122
chrono = "=0.4.39"
2223
clap = { version = "4.5.27", features = ["derive"] }
2324
color-eyre = "0.6.3"
@@ -41,29 +42,28 @@ metrics = { version = "0.24.0", optional = true }
4142
metrics-exporter-prometheus = { version = "0.16.0", optional = true }
4243
num_cpus = "1.16.0"
4344
object_store = { version = "0.11.0", features = ["aws"], optional = true }
45+
object_store_opendal = { version = "0.49", optional = true }
4446
opendal = { version = "0.51", features = [
4547
"services-huggingface",
4648
], optional = true }
47-
object_store_opendal = { version = "0.49", optional = true }
4849
parking_lot = "0.12.3"
4950
parquet = "54.1.0"
5051
pin-project-lite = { version = "0.2.14" }
5152
prost = "0.13.1"
5253
ratatui = "0.28.0"
5354
serde = { version = "1.0.197", features = ["derive"] }
5455
strum = "0.26.2"
55-
tokio = { version = "1.36.0", features = ["rt-multi-thread", "macros"] }
56+
tokio = { version = "1.36.0", features = ["macros", "rt-multi-thread"] }
5657
tokio-stream = { version = "0.1.15", features = ["net"] }
5758
tokio-util = "0.7.10"
5859
toml = "0.8.12"
5960
tonic = { version = "0.12.3", optional = true }
6061
tower = { version = "0.5.0" }
62+
tower-http = { version = "0.6.2", features = ["auth"], optional = true }
6163
tui-logger = { version = "0.12", features = ["tracing-support"] }
6264
tui-textarea = { version = "0.6.1", features = ["search"] }
6365
url = { version = "2.5.2", optional = true }
6466
uuid = { version = "1.10.0" }
65-
tower-http = { version = "0.6.2", features = ["auth"], optional = true }
66-
base64 = { version = "0.22.1", optional = true }
6767

6868
[dev-dependencies]
6969
assert_cmd = "2.0.16"
@@ -76,14 +76,21 @@ url = "2.5.2"
7676
[features]
7777
default = ["functions-parquet"]
7878
deltalake = ["datafusion-app/deltalake"]
79+
flightsql = [
80+
"datafusion-app/flightsql",
81+
"dep:arrow-flight",
82+
"dep:metrics",
83+
"dep:metrics-exporter-prometheus",
84+
"dep:tonic",
85+
"dep:tower-http",
86+
]
87+
functions-json = ["datafusion-app/functions-json"]
88+
functions-parquet = ["datafusion-app/functions-parquet"]
7989
hudi = ["datafusion-app/hudi"]
90+
huggingface = ["datafusion-app/huggingface"]
8091
iceberg = ["datafusion-app/iceberg"]
81-
flightsql = ["datafusion-app/flightsql", "dep:tonic", "dep:arrow-flight", "dep:metrics", "dep:metrics-exporter-prometheus", "dep:tower-http"]
8292
s3 = ["datafusion-app/s3", "url"]
83-
functions-json = ["datafusion-app/functions-json"]
84-
functions-parquet = ["datafusion-app/functions-parquet"]
8593
udfs-wasm = ["datafusion-app/udfs-wasm", "dep:datafusion-udfs-wasm"]
86-
huggingface = ["datafusion-app/huggingface"]
8794

8895
[[bin]]
8996
name = "dft"

crates/datafusion-app/Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
[package]
2+
edition = "2021"
23
name = "datafusion-app"
34
version = "0.1.0"
4-
edition = "2021"
55

66
[dependencies]
77
arrow-flight = { version = "54.1.0", features = [
88
"flight-sql-experimental",
99
], optional = true }
1010
async-trait = "0.1.80"
11+
base64 = { version = "0.22.1", optional = true }
1112
color-eyre = "0.6.3"
1213
datafusion = "45.0.0"
1314
datafusion-auth = { version = "0.1.0", path = "../datafusion-auth", optional = true }
@@ -30,33 +31,32 @@ itertools = "0.13.0"
3031
log = "0.4.22"
3132
num_cpus = "1.16.0"
3233
object_store = { version = "0.11.0", features = ["aws"], optional = true }
34+
object_store_opendal = { version = "0.49", optional = true }
3335
opendal = { version = "0.51", features = [
3436
"services-huggingface",
3537
], optional = true }
36-
object_store_opendal = { version = "0.49", optional = true }
3738
parking_lot = "0.12.3"
3839
serde = { version = "1.0.197", features = ["derive"] }
39-
tokio = { version = "1.36.0", features = ["rt-multi-thread", "macros"] }
40+
tokio = { version = "1.36.0", features = ["macros", "rt-multi-thread"] }
4041
tokio-stream = { version = "0.1.15", features = ["net"] }
4142
tonic = { version = "0.12.3", optional = true }
42-
url = { version = "2.5.2", optional = true }
4343
tower-http = { version = "0.6.2", features = ["auth"], optional = true }
44-
base64 = { version = "0.22.1", optional = true }
44+
url = { version = "2.5.2", optional = true }
4545

4646
[features]
4747
default = ["functions-parquet"]
4848
deltalake = ["dep:deltalake"]
49-
hudi = ["dep:hudi"]
50-
iceberg = ["dep:iceberg-datafusion", "dep:iceberg-catalog-rest"]
5149
flightsql = [
5250
"dep:arrow-flight",
53-
"dep:tonic",
51+
"dep:base64",
5452
"dep:datafusion-auth",
53+
"dep:tonic",
5554
"dep:tower-http",
56-
"dep:base64",
5755
]
58-
s3 = ["object_store/aws", "url"]
5956
functions-json = ["dep:datafusion-functions-json"]
6057
functions-parquet = ["dep:datafusion-functions-parquet"]
58+
hudi = ["dep:hudi"]
59+
huggingface = ["object_store_opendal", "opendal", "url"]
60+
iceberg = ["dep:iceberg-catalog-rest", "dep:iceberg-datafusion"]
61+
s3 = ["object_store/aws", "url"]
6162
udfs-wasm = ["dep:datafusion-udfs-wasm"]
62-
huggingface = ["opendal", "object_store_opendal", "url"]

crates/datafusion-auth/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2+
edition = "2021"
23
name = "datafusion-auth"
34
version = "0.1.0"
4-
edition = "2021"
55

66
[dependencies]
77
datafusion = "45.0.0"

crates/datafusion-functions-parquet/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[package]
2-
name = "datafusion-functions-parquet"
2+
authors = ["Matthew Turner <matthew.m.turner@outlook.com>"]
33
description = "DataFusion helper functions for working with Parquet files"
4+
edition = "2021"
45
homepage = "https://github.com/datafusion-contrib/datafusion-dft/tree/main/crates/datafusion-functions-parquet"
5-
repository = "https://github.com/datafusion-contrib/datafusion-dft/tree/main/crates/datafusion-functions-parquet"
6-
readme = "README.md"
7-
authors = ["Matthew Turner <matthew.m.turner@outlook.com>"]
6+
keywords = ["datafusion", "parquet", "query", "sql"]
87
license = "Apache-2.0"
8+
name = "datafusion-functions-parquet"
9+
readme = "README.md"
10+
repository = "https://github.com/datafusion-contrib/datafusion-dft/tree/main/crates/datafusion-functions-parquet"
911
version = "0.1.0"
10-
edition = "2021"
11-
keywords = ["parquet", "query", "sql", "datafusion"]
1212

1313
[dependencies]
1414
arrow = { version = "54.1.0" }
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2+
edition = "2021"
23
name = "datafusion-udfs-wasm"
34
version = "0.1.0"
4-
edition = "2021"
55

66
[dependencies]
77
datafusion = { version = "45.0.0", default-features = false }
@@ -11,7 +11,7 @@ wasi-common = "29.0.1"
1111
wasmtime = "29.0.1"
1212

1313
[dev-dependencies]
14-
tokio = { version = "1.36.0", features = ["rt-multi-thread", "macros"] }
14+
tokio = { version = "1.36.0", features = ["macros", "rt-multi-thread"] }
1515

1616
[features]
1717
serde = ["dep:serde"]

crates/datafusion-udfs-wasm/wasm-examples/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
2+
edition = "2021"
23
name = "wasm-examples"
34
version = "0.1.0"
4-
edition = "2021"
55

66
[lib]
77
crate-type = ["cdylib"]

data/configs/flightsql_basic.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[auth]
2-
server_basic_auth.username = "User"
32
server_basic_auth.password = "Pass"
3+
server_basic_auth.username = "User"

taplo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[formatting]
2+
reorder_arrays = true
3+
reorder_inline_tables = true
4+
reorder_keys = true

0 commit comments

Comments
 (0)