Skip to content

Commit

Permalink
CI fixes because other packages break other packages (#1233)
Browse files Browse the repository at this point in the history
* Fix for vaex - numpy breaking it. Not sure when vaex will fix it.

* Fix for pandera dask 

dask-expr library is now needed.

Note: python3.8 doesn't have dask-expr. So we skip pandera dask
now in python 3.8. Not worth worrying about.

* Temporary fix for failing plotly tests

plotly/Kaleido#226
is the issue. We just need to wait.
  • Loading branch information
skrawcz authored Nov 18, 2024
1 parent eb60d5d commit 3d98be3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ fi
if [[ ${TASK} == "integrations" ]]; then
pip install -e '.[pandera]'
pip install dask
if python -c 'import sys; exit(0) if sys.version_info > (3, 9) else exit(1)'; then
echo "python version is 3.9+"
pip install dask-expr
else
echo "Python version is 3.8 or less"
fi
pytest tests/integrations
exit 0
fi
Expand All @@ -46,6 +52,7 @@ if [[ ${TASK} == "pyspark" ]]; then
fi

if [[ ${TASK} == "vaex" ]]; then
pip install "numpy<2.0.0" # numpy2.0 breaks vaex
pip install -e '.[vaex]'
pytest plugin_tests/h_vaex
exit 0
Expand All @@ -60,6 +67,8 @@ fi

if [[ ${TASK} == "tests" ]]; then
pip install .
# https://github.com/plotly/Kaleido/issues/226
pip install "kaleido<0.4.0" # kaleido 0.4.0 breaks plotly; TODO: remove this
pytest \
--cov=hamilton \
--ignore tests/integrations \
Expand Down
4 changes: 4 additions & 0 deletions tests/integrations/pandera/test_pandera_data_quality.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import sys

import dask.dataframe as dd
import numpy as np
import pandas as pd
Expand Down Expand Up @@ -146,6 +148,7 @@ def foo() -> pd.DataFrame:
h_pandera.check_output().get_validators(n)


@pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher")
def test_pandera_decorator_dask_df():
"""Validates that the function can be annotated with a dask dataframe type it'll work appropriately.
Expand Down Expand Up @@ -196,6 +199,7 @@ def foo(fail: bool = False) -> dd.DataFrame:
assert not result_success.passes


@pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9 or higher")
def test_pandera_decorator_dask_series():
"""Validates that the function can be annotated with a dask series type it'll work appropriately.
Install dask if this fails.
Expand Down

0 comments on commit 3d98be3

Please sign in to comment.