Skip to content

Commit

Permalink
only run modin in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Mar 18, 2024
1 parent 3f47d38 commit a0ecc64
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ jobs:
key: ${{ runner.os }}-build-${{ matrix.python-version }}
- name: install-reqs
run: python -m pip install --upgrade tox virtualenv setuptools pip -r requirements-dev.txt
- name: install-modin
run: python -m pip install --upgrade modin
- name: Run pytest
run: pytest tests --cov=narwhals --cov=tests --cov-fail-under=50
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
covdefaults
modin[dask]
pandas
polars
pre-commit
Expand Down
17 changes: 12 additions & 5 deletions tests/test_common.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import os
import warnings
from typing import Any

Expand All @@ -14,11 +15,17 @@
df_pandas = pd.DataFrame({"a": [1, 3, 2], "b": [4, 4, 6], "z": [7.0, 8, 9]})
df_polars = pl.DataFrame({"a": [1, 3, 2], "b": [4, 4, 6], "z": [7.0, 8, 9]})
df_lazy = pl.LazyFrame({"a": [1, 3, 2], "b": [4, 4, 6], "z": [7.0, 8, 9]})
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=UserWarning)
df_mpd = pd.DataFrame(
pd.DataFrame({"a": [1, 3, 2], "b": [4, 4, 6], "z": [7.0, 8, 9]})
)

if os.environ.get("CI", None):
import modin as mpd

with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=UserWarning)
df_mpd = mpd.DataFrame(
pd.DataFrame({"a": [1, 3, 2], "b": [4, 4, 6], "z": [7.0, 8, 9]})
)
else:
df_mpd = df_pandas.copy()


@pytest.mark.parametrize(
Expand Down

0 comments on commit a0ecc64

Please sign in to comment.