-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove
eager_or_interchange
from from_native
in main namesp…
…ace, switch Ibis' support from interchange to lazy in main namespace (but preserve status-quo in stable.v1) (#1829)
- Loading branch information
1 parent
a55ff89
commit 02544e4
Showing
10 changed files
with
79 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from __future__ import annotations | ||
|
||
from typing import TYPE_CHECKING | ||
from typing import Any | ||
|
||
import polars as pl | ||
import pytest | ||
|
||
import narwhals as nw | ||
|
||
if TYPE_CHECKING: | ||
import ibis | ||
|
||
from tests.utils import Constructor | ||
|
||
ibis = pytest.importorskip("ibis") | ||
|
||
|
||
@pytest.fixture | ||
def ibis_constructor() -> Constructor: | ||
def func(data: dict[str, Any]) -> ibis.Table: | ||
df = pl.DataFrame(data) | ||
return ibis.memtable(df) | ||
|
||
return func | ||
|
||
|
||
def test_from_native(ibis_constructor: Constructor) -> None: | ||
df = nw.from_native(ibis_constructor({"a": [1, 2, 3], "b": [4, 5, 6]})) | ||
assert df.columns == ["a", "b"] |
Oops, something went wrong.