Skip to content

Commit 4103005

Browse files
authored
Release 2.0.3 (vega#571)
* Bump version to 2.0.3 * Fix lifetime elision warning in lexer.rs The Rust compiler now requires explicit lifetime annotations when returning a type with a lifetime parameter. This change makes the lifetime explicit in the Tokenizer::new() return type. * Fix unnecessary parentheses warning in window.rs Remove unnecessary parentheses around v.unsigned_abs() in closure to fix compiler warning. * Fix mypy type checking errors in runtime.py Add type ignore comments for arro3.Table constructor calls where the type system cannot properly infer the parameter types. * Use generic type ignore for mypy compatibility The specific error codes vary between environments, so use generic type ignore comments to suppress the type checking errors for arro3.Table constructor calls with narwhals DataFrames. * Fix mypy errors by correcting type annotations Instead of using type ignores, fix the root cause by changing _import_inline_datasets to accept dict[str, Any] instead of dict[str, IntoFrameT]. This is more accurate since the function accepts various dataframe-like objects and converts them all to arro3.Table. Keep one type ignore for the normalize_timezones inner function due to limitations in mypy's understanding of narwhals type variables.
1 parent 698691f commit 4103005

File tree

14 files changed

+66
-61
lines changed

14 files changed

+66
-61
lines changed

.claude/settings.local.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(gh api:*)",
5+
"Bash(pixi run type-check-py:*)",
6+
"Bash(gh pr checks:*)",
7+
"WebFetch(domain:narwhals-dev.github.io)"
8+
],
9+
"deny": [],
10+
"ask": []
11+
}
12+
}

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vegafusion-common/Cargo.toml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "vegafusion-common"
3-
version = "2.0.2"
3+
version = "2.0.3"
44
edition = "2021"
55
description = "Common components required by multiple VegaFusion crates"
66
license = "BSD-3-Clause"
@@ -11,8 +11,6 @@ json = ["serde_json/preserve_order", "arrow/json", "chrono"]
1111
prettyprint = ["arrow/prettyprint"]
1212
proto = ["datafusion-proto", "datafusion-proto-common", "prost"]
1313

14-
[dependencies]
15-
1614
[dependencies.chrono]
1715
workspace = true
1816
optional = true
@@ -42,11 +40,7 @@ workspace = true
4240

4341
[dependencies.datafusion-functions]
4442
workspace = true
45-
features = [
46-
"math_expressions",
47-
"string_expressions",
48-
"datetime_expressions",
49-
]
43+
features = ["math_expressions", "string_expressions", "datetime_expressions"]
5044

5145
[dependencies.datafusion-functions-nested]
5246
workspace = true

vegafusion-core/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "vegafusion-core"
33
license = "BSD-3-Clause"
44
edition = "2021"
5-
version = "2.0.2"
5+
version = "2.0.3"
66
description = "Core components required by multiple VegaFusion crates, with WASM compatibility"
77

88
[features]
@@ -13,9 +13,6 @@ py = ["pyo3", "vegafusion-common/py"]
1313
petgraph = "0.8.2"
1414
rand = "0.9.0"
1515

16-
[lints.clippy]
17-
module_inception = "allow"
18-
1916
[dependencies.lazy_static]
2017
workspace = true
2118

@@ -48,7 +45,7 @@ features = ["preserve_order"]
4845
[dependencies.vegafusion-common]
4946
path = "../vegafusion-common"
5047
features = ["json", "sqlparser"]
51-
version = "2.0.2"
48+
version = "2.0.3"
5249

5350
[dependencies.datafusion-common]
5451
workspace = true
@@ -83,6 +80,9 @@ workspace = true
8380
workspace = true
8481
optional = true
8582

83+
[lints.clippy]
84+
module_inception = "allow"
85+
8686
[build-dependencies.prost-build]
8787
workspace = true
8888

vegafusion-core/src/expression/lexer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ struct Tokenizer<'a> {
9393
}
9494

9595
impl Tokenizer<'_> {
96-
fn new(src: &str) -> Tokenizer {
96+
fn new(src: &str) -> Tokenizer<'_> {
9797
Tokenizer {
9898
current_index: 0,
9999
remaining_text: src,

vegafusion-python/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "vegafusion"
33
license = "BSD-3-Clause"
44
edition = "2021"
5-
version = "2.0.2"
5+
version = "2.0.3"
66
description = "VegaFusion Python interface"
77

88
[lib]
@@ -52,16 +52,16 @@ workspace = true
5252
[dependencies.vegafusion-common]
5353
path = "../vegafusion-common"
5454
features = ["pyo3", "base64"]
55-
version = "2.0.2"
55+
version = "2.0.3"
5656

5757
[dependencies.vegafusion-core]
5858
path = "../vegafusion-core"
5959
features = ["py", "tonic_support"]
60-
version = "2.0.2"
60+
version = "2.0.3"
6161

6262
[dependencies.vegafusion-runtime]
6363
path = "../vegafusion-runtime"
64-
version = "2.0.2"
64+
version = "2.0.3"
6565

6666
[dependencies.tokio]
6767
workspace = true

vegafusion-python/pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
[project]
22
name = "vegafusion"
3-
version = "2.0.2"
3+
version = "2.0.3"
44
description = "Core tools for using VegaFusion from Python"
55
readme = "README.md"
6-
license = {file = "LICENSE"}
76
requires-python = ">=3.9"
87
keywords = ["vega", "altair", "vegafusion", "arrow"]
98
classifiers = [
@@ -23,6 +22,9 @@ name = "VegaFusion Contributors"
2322
requires = ["maturin>=1.1.0,<2"]
2423
build-backend = "maturin"
2524

25+
[project.license]
26+
file = "LICENSE"
27+
2628
[project.urls]
2729
Homepage = "https://vegafusion.io"
2830
Repository = "https://github.com/hex-inc/vegafusion"

vegafusion-python/vegafusion/runtime.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def using_grpc(self) -> bool:
245245

246246
def _import_inline_datasets(
247247
self,
248-
inline_datasets: dict[str, IntoFrameT] | None = None,
248+
inline_datasets: dict[str, Any] | None = None,
249249
inline_dataset_usage: dict[str, list[str]] | None = None,
250250
) -> dict[str, Table]:
251251
"""
@@ -329,11 +329,11 @@ def _import_inline_datasets(
329329
raise ValueError(msg)
330330
df_nw = df_nw.select(columns)
331331

332-
imported_inline_datasets[name] = Table(df_nw) # type: ignore[arg-type]
332+
imported_inline_datasets[name] = Table(df_nw)
333333
except TypeError:
334334
# Not supported by Narwhals, try pycapsule interface directly
335335
if hasattr(value, "__arrow_c_stream__"):
336-
imported_inline_datasets[name] = Table(value) # type: ignore[call-overload]
336+
imported_inline_datasets[name] = Table(value)
337337
else:
338338
raise
339339

@@ -550,7 +550,7 @@ def pre_transform_datasets(
550550
)
551551

552552
def normalize_timezones(
553-
dfs: list[nw.DataFrame[IntoFrameT] | nw.LazyFrame[IntoFrameT]],
553+
dfs: list[nw.DataFrame[IntoFrameT] | nw.LazyFrame[IntoFrameT]], # type: ignore[type-var]
554554
) -> list[DataFrameLike]:
555555
import narwhals.stable.v1 as nw
556556

vegafusion-runtime/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ harness = false
66
name = "vegafusion-runtime"
77
license = "BSD-3-Clause"
88
edition = "2021"
9-
version = "2.0.2"
9+
version = "2.0.3"
1010
description = "VegaFusion Runtime"
1111

1212
[features]
@@ -48,9 +48,6 @@ pixelmatch = "0.1.0"
4848
rgb = "0.8.50"
4949
lodepng = "3.11.0"
5050

51-
[dev-dependencies.base64]
52-
workspace = true
53-
5451
[dependencies.url]
5552
workspace = true
5653

@@ -118,12 +115,12 @@ workspace = true
118115
[dependencies.vegafusion-common]
119116
path = "../vegafusion-common"
120117
features = ["json", "sqlparser", "prettyprint", "object_store", "url"]
121-
version = "2.0.2"
118+
version = "2.0.3"
122119

123120
[dependencies.vegafusion-core]
124121
path = "../vegafusion-core"
125122
features = ["sqlparser"]
126-
version = "2.0.2"
123+
version = "2.0.3"
127124

128125
[dependencies.serde]
129126
workspace = true
@@ -174,6 +171,9 @@ workspace = true
174171
default-features = false
175172
features = ["json"]
176173

174+
[dev-dependencies.base64]
175+
workspace = true
176+
177177
[dev-dependencies.reqwest]
178178
workspace = true
179179
default-features = false

vegafusion-runtime/src/transform/window.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl TransformTrait for Window {
9191
),
9292
Some(frame) => (
9393
WindowFrameBound::Preceding(ScalarValue::UInt64(
94-
frame.start.map(|v| (v.unsigned_abs())),
94+
frame.start.map(|v| v.unsigned_abs()),
9595
)),
9696
WindowFrameBound::Following(ScalarValue::UInt64(frame.end.map(|v| v as u64))),
9797
),

0 commit comments

Comments
 (0)