Skip to content

Commit

Permalink
docs: update api-completeness with duckdb (#1740)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessandroMiola authored Jan 6, 2025
1 parent 827718b commit 17546f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/basics/dataframe_conversion.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
4 changes: 3 additions & 1 deletion utils/generate_backend_completeness.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="_duckdb", type_=BackendType.LAZY),
Backend(name="pandas-like", module="_pandas_like", type_=BackendType.EAGER),
Backend(name="spark-like", module="_spark_like", type_=BackendType.LAZY),
]

Expand All @@ -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")
),
)

Expand Down

0 comments on commit 17546f2

Please sign in to comment.