Skip to content

Commit e811459

Browse files
authored
Merge branch 'main' into feat/testing-constructors
2 parents 37c1edb + 16842cb commit e811459

7 files changed

Lines changed: 18 additions & 26 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: astral-sh/setup-uv@v7
3333
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
3434
- name: Install dependencies
35-
run: uv pip install -e . --group docs
35+
run: uv pip install -e ".[dask,ibis]" --group docs
3636
- name: Run hooks manually
3737
run: |
3838
python utils/generate_backend_completeness.py

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ typing: ## Run typing checks
2525
--editable test-plugin/. \
2626
--editable . \
2727
--group typing
28+
# temporary pin due to https://github.com/narwhals-dev/narwhals/issues/3560
29+
$(VENV_BIN)/uv pip install "pyarrow<24"
2830
$(VENV_BIN)/uv run --no-sync pyright
2931
$(VENV_BIN)/uv run --no-sync mypy
3032

@@ -33,7 +35,7 @@ docs-serve: # Build and serve the docs locally
3335
$(VENV_BIN)/uv pip install \
3436
--upgrade \
3537
--editable test-plugin/. \
36-
--editable . \
38+
--editable ".[dask, ibis]" \
3739
--group docs
3840
$(VENV_BIN)/uv run --no-sync utils/generate_backend_completeness.py
3941
$(VENV_BIN)/uv run --no-sync utils/generate_zen_content.py

pyproject.toml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
55

66
[project]
77
name = "narwhals"
8-
version = "2.19.0"
8+
version = "2.20.0"
99
dependencies = []
1010
requires-python = ">=3.9"
1111
authors = [
@@ -93,15 +93,10 @@ typing = [ # keep some of these pinned and bump periodically so there's fewer s
9393
docs = [
9494
"black", # required by mkdocstrings_handlers
9595
"jinja2",
96-
"duckdb",
97-
"narwhals[sql]",
9896
"markdown-exec[ansi]",
9997
"mkdocs-autorefs",
10098
"mkdocstrings-python>=2.0.3",
101-
"sqlframe",
102-
"pandas",
103-
"polars>=1.0.0",
104-
"pyarrow",
99+
"narwhals[duckdb,pandas,pyarrow,polars,sql,sqlframe]",
105100
"zensical>=0.0.28"
106101
]
107102
dev = [

tests/expr_and_series/cast_test.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,8 @@ def test_cast_datetime_tz_aware(
217217
or "ibis" in str(constructor)
218218
):
219219
request.applymarker(pytest.mark.xfail)
220-
request.applymarker(
221-
pytest.mark.xfail(is_pyarrow_windows_no_tzdata(constructor), reason="no tzdata")
222-
)
220+
if is_pyarrow_windows_no_tzdata(constructor):
221+
pytest.skip()
223222

224223
data = {
225224
"date": [
@@ -247,9 +246,8 @@ def test_cast_datetime_utc(
247246
or "sqlframe" in str(constructor)
248247
):
249248
request.applymarker(pytest.mark.xfail)
250-
request.applymarker(
251-
pytest.mark.xfail(is_pyarrow_windows_no_tzdata(constructor), reason="no tzdata")
252-
)
249+
if is_pyarrow_windows_no_tzdata(constructor):
250+
pytest.skip()
253251

254252
data = {
255253
"date": [

tests/frame/to_numpy_test.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@ def test_to_numpy(constructor_eager: ConstructorEager) -> None:
2424
assert result.dtype == "float64"
2525

2626

27-
def test_to_numpy_tz_aware(
28-
constructor_eager: ConstructorEager, request: pytest.FixtureRequest
29-
) -> None:
27+
def test_to_numpy_tz_aware(constructor_eager: ConstructorEager) -> None:
3028
if ("pandas_pyarrow" in str(constructor_eager) and PANDAS_VERSION < (2, 2)) or (
3129
"pyarrow" in str(constructor_eager) and is_windows()
3230
):
33-
request.applymarker(pytest.mark.xfail)
31+
pytest.skip()
3432
df = nw.from_native(
3533
constructor_eager({"a": [datetime(2020, 1, 1), datetime(2020, 1, 2)]}),
3634
eager_only=True,

tests/selectors_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,16 @@ def test_datetime(constructor: Constructor, request: pytest.FixtureRequest) -> N
8585
"pyspark" in str(constructor)
8686
or "duckdb" in str(constructor)
8787
or "dask" in str(constructor)
88-
or ("pyarrow" in str(constructor) and is_windows())
89-
or ("pandas" in str(constructor) and PANDAS_VERSION < (2,))
9088
or "ibis" in str(constructor)
9189
# https://github.com/pola-rs/polars/issues/23767
9290
# TODO(FBruzzesi): Manage polars version
9391
or ("polars" in str(constructor) and POLARS_VERSION >= (1, 32, 0))
9492
):
9593
request.applymarker(pytest.mark.xfail)
94+
if ("pyarrow" in str(constructor) and is_windows()) or (
95+
"pandas" in str(constructor) and PANDAS_VERSION < (2,)
96+
):
97+
pytest.skip()
9698
if "modin" in str(constructor):
9799
pytest.skip(reason="too slow")
98100

tests/series_only/to_numpy_test.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,13 @@ def test_to_numpy(
3434
assert_array_equal(s.to_numpy(), np.array(data, dtype=float))
3535

3636

37-
def test_to_numpy_tz_aware(
38-
constructor_eager: ConstructorEager, request: pytest.FixtureRequest
39-
) -> None:
37+
def test_to_numpy_tz_aware(constructor_eager: ConstructorEager) -> None:
4038
if (
4139
("pandas_pyarrow" in str(constructor_eager) and PANDAS_VERSION < (2, 2))
4240
or ("modin_pyarrow" in str(constructor_eager) and PANDAS_VERSION < (2, 2))
4341
or ("pyarrow" in str(constructor_eager) and is_windows())
4442
):
45-
request.applymarker(pytest.mark.xfail)
46-
request.applymarker(pytest.mark.xfail)
43+
pytest.skip()
4744
df = nw.from_native(
4845
constructor_eager({"a": [datetime(2020, 1, 1), datetime(2020, 1, 2)]}),
4946
eager_only=True,

0 commit comments

Comments
 (0)