From ff15d1e6a9d39e4d3cf07fb8c19fc0debbc1ea94 Mon Sep 17 00:00:00 2001 From: AlessandroMiola Date: Mon, 6 Jan 2025 18:16:25 +0100 Subject: [PATCH 1/3] docs: update api-completeness with duckdb --- utils/generate_backend_completeness.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/generate_backend_completeness.py b/utils/generate_backend_completeness.py index 2ab8d2187..ea9c1a830 100644 --- a/utils/generate_backend_completeness.py +++ b/utils/generate_backend_completeness.py @@ -31,9 +31,10 @@ class Backend(NamedTuple): MODULES = ["dataframe", "series", "expr"] BACKENDS = [ - Backend(name="pandas-like", module="_pandas_like", type_=BackendType.EAGER), Backend(name="arrow", module="_arrow", type_=BackendType.EAGER), Backend(name="dask", module="_dask", type_=BackendType.LAZY), + Backend(name="duckdb", module="_dask", type_=BackendType.LAZY), + Backend(name="pandas-like", module="_pandas_like", type_=BackendType.EAGER), Backend(name="spark-like", module="_spark_like", type_=BackendType.LAZY), ] @@ -55,6 +56,7 @@ def parse_module(module_name: str, backend: str, nw_class_name: str) -> list[str inspect.isclass(c) and c.__name__.endswith(nw_class_name) and not c.__name__.startswith("Compliant") # Exclude protocols + and not c.__name__.startswith("DuckDBInterchange") ), ) From e0556375d0abe81d119cf174acd1a547a9144907 Mon Sep 17 00:00:00 2001 From: AlessandroMiola Date: Mon, 6 Jan 2025 18:17:12 +0100 Subject: [PATCH 2/3] docs: fix df reference and suppress warning --- docs/basics/dataframe_conversion.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/basics/dataframe_conversion.md b/docs/basics/dataframe_conversion.md index a4753a033..bdf803a23 100644 --- a/docs/basics/dataframe_conversion.md +++ b/docs/basics/dataframe_conversion.md @@ -53,7 +53,9 @@ which implements `__arrow_c_stream__`: def df_to_polars(df_native: Any) -> pl.DataFrame: if hasattr(df_native, "__arrow_c_stream__"): return nw.from_arrow(df_native, native_namespace=pl).to_native() - msg = f"Expected object which implements '__arrow_c_stream__' got: {type(df)}" + msg = ( + f"Expected object which implements '__arrow_c_stream__' got: {type(df_native)}" + ) raise TypeError(msg) From 96d96becfe86f9ea0b6d92956b6b8d88128190ce Mon Sep 17 00:00:00 2001 From: AlessandroMiola Date: Mon, 6 Jan 2025 18:27:18 +0100 Subject: [PATCH 3/3] fixup --- utils/generate_backend_completeness.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/generate_backend_completeness.py b/utils/generate_backend_completeness.py index ea9c1a830..397c8e4d6 100644 --- a/utils/generate_backend_completeness.py +++ b/utils/generate_backend_completeness.py @@ -33,7 +33,7 @@ class Backend(NamedTuple): BACKENDS = [ Backend(name="arrow", module="_arrow", type_=BackendType.EAGER), Backend(name="dask", module="_dask", type_=BackendType.LAZY), - Backend(name="duckdb", module="_dask", type_=BackendType.LAZY), + Backend(name="duckdb", module="_duckdb", type_=BackendType.LAZY), Backend(name="pandas-like", module="_pandas_like", type_=BackendType.EAGER), Backend(name="spark-like", module="_spark_like", type_=BackendType.LAZY), ]