Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Merge pull request #212 from xhochy/fix-nightlies-1609100614
Browse files Browse the repository at this point in the history
Fix nightly failures
  • Loading branch information
xhochy authored Dec 29, 2020
2 parents a8da4e6 + 5da2454 commit 45d999f
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 15 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,27 @@ jobs:
matrix:
PYTHON_VERSION: ['3.6', '3.7', '3.8']
PYARROW_VERSION: ['latest']
PANDAS_VERSION: ['latest']
UPSTREAM_DEV: ['default']
include:
- UPSTREAM_DEV: 'default'
PYARROW_VERSION: '0.17.1'
PANDAS_VERSION: '1.1'
PYTHON_VERSION: '3.8'
- UPSTREAM_DEV: 'default'
PYARROW_VERSION: '1.0.1'
PANDAS_VERSION: 'latest'
PYTHON_VERSION: '3.8'
- UPSTREAM_DEV: 'nightlies'
PYARROW_VERSION: 'latest'
PANDAS_VERSION: 'latest'
PYTHON_VERSION: '3.8'
steps:
- name: Checkout branch
uses: actions/[email protected]
- name: Run CI
shell: bash -l {0}
run: ./ci/circle_build_linux.sh ${{ matrix.PYTHON_VERSION }} ${{ matrix.PYARROW_VERSION }} ${{ matrix.UPSTREAM_DEV }}
run: ./ci/circle_build_linux.sh ${{ matrix.PYTHON_VERSION }} ${{ matrix.PYARROW_VERSION }} ${{ matrix.PANDAS_VERSION }} ${{ matrix.UPSTREAM_DEV }}
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.PYTHON_VERSION == '3.7'
uses: pypa/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
matrix:
PYTHON_VERSION: ['3.6']
PYARROW_VERSION: ['latest']
PANDAS_VERSION: ['latest']
UPSTREAM_DEV: ['default']
include:
- UPSTREAM_DEV: 'nightlies'
Expand All @@ -27,7 +28,7 @@ jobs:
uses: actions/[email protected]
- name: Run CI
shell: bash -l {0}
run: ./ci/circle_build_linux.sh ${{ matrix.PYTHON_VERSION }} ${{ matrix.PYARROW_VERSION }} ${{ matrix.UPSTREAM_DEV }}
run: ./ci/circle_build_linux.sh ${{ matrix.PYTHON_VERSION }} ${{ matrix.PYARROW_VERSION }} ${{ matrix.PANDAS_VERSION }} ${{ matrix.UPSTREAM_DEV }}
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ Starting with 0.5, we will follow the following versioning scheme:
* We bump MINOR on breaking changes.
* We increase PATCH otherwise.

0.7.1 (2020-12-29)
------------------

* Fix return values for `str` functions with `pandas=1.2` and `pyarrow=1`.
* Ensure that parallel variants of `apply_binary_str` actually parallize.

0.7.0 (2020-12-07)
------------------
Expand Down
12 changes: 10 additions & 2 deletions ci/circle_build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ export LC_ALL=C.UTF-8
export LANG=C.UTF-8
export PYTHON_VERSION=$1
export PYARROW_VERSION=$2
export USE_DEV_WHEELS=$3
export PANDAS_VERSION=$3
export USE_DEV_WHEELS=$4
export CONDA_PKGS_DIRS=$HOME/.conda_packages
export MINICONDA=$HOME/miniconda
export MINICONDA_URL="https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh"
Expand All @@ -17,6 +18,8 @@ wget --no-verbose -O miniconda.sh $MINICONDA_URL
bash miniconda.sh -b -p $MINICONDA
export PATH="$MINICONDA/bin:$PATH"

set -x

conda config --set auto_update_conda false
conda config --add channels conda-forge
conda install -y mamba yq jq
Expand All @@ -30,10 +33,15 @@ fi
if [ "${PYARROW_VERSION}" = "latest" ]; then
yq -Y ". + {channels: [${CONDA_CHANNELS}], dependencies: [.dependencies[], \"python=${PYTHON_VERSION}\"] }" environment.yml > /tmp/environment.yml
else
yq -Y ". + {channels: [${CONDA_CHANNELS}], dependencies: [.dependencies[], \"python=${PYTHON_VERSION}\", \"pyarrow=${PYARROW_VERSION}\"] }" environment.yml > /tmp/environment.yml
if [ "${PANDAS_VERSION}" = "latest" ]; then
yq -Y ". + {channels: [${CONDA_CHANNELS}], dependencies: [.dependencies[], \"python=${PYTHON_VERSION}\", \"pyarrow=${PYARROW_VERSION}\"] }" environment.yml > /tmp/environment.yml
else
yq -Y ". + {channels: [${CONDA_CHANNELS}], dependencies: [.dependencies[], \"python=${PYTHON_VERSION}\", \"pyarrow=${PYARROW_VERSION}\", \"pandas=${PANDAS_VERSION}\"] }" environment.yml > /tmp/environment.yml
fi
fi
cat /tmp/environment.yml
mamba env create -f /tmp/environment.yml
set +x
source activate fletcher

if [ "${PYTHON_VERSION}" = "3.7" ]; then
Expand Down
4 changes: 2 additions & 2 deletions fletcher/algorithms/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ def _apply_with_nulls(
)


@njit
@njit(parallel=True)
def _apply_no_nulls_parallel(
func: Callable,
length: int,
Expand All @@ -973,7 +973,7 @@ def _apply_no_nulls_parallel(
)


@njit
@njit(parallel=True)
def _apply_with_nulls_parallel(
func: Callable,
length: int,
Expand Down
16 changes: 8 additions & 8 deletions fletcher/string_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,49 +39,49 @@ def _str_isalnum(self):
if hasattr(pc, "utf8_is_alnum"):
return type(self)(pc.utf8_is_alnum(self.data))
else:
super()._str_isalnum()
return super()._str_isalnum()

def _str_isalpha(self):
if hasattr(pc, "utf8_is_alpha"):
return type(self)(pc.utf8_is_alpha(self.data))
else:
super()._str_isalpha()
return super()._str_isalpha()

def _str_isdecimal(self):
if hasattr(pc, "utf8_is_decimal"):
return type(self)(pc.utf8_is_decimal(self.data))
else:
super()._str_isdecimal()
return super()._str_isdecimal()

def _str_isdigit(self):
if hasattr(pc, "utf8_is_digit"):
return type(self)(pc.utf8_is_digit(self.data))
else:
super()._str_isdigit()
return super()._str_isdigit()

def _str_islower(self):
if hasattr(pc, "utf8_is_lower"):
return type(self)(pc.utf8_is_lower(self.data))
else:
super()._str_islower()
return super()._str_islower()

def _str_isnumeric(self):
if hasattr(pc, "utf8_is_numeric"):
return type(self)(pc.utf8_is_numeric(self.data))
else:
super()._str_isnumeric()
return super()._str_isnumeric()

def _str_isspace(self):
if hasattr(pc, "utf8_is_space"):
return type(self)(pc.utf8_is_space(self.data))
else:
super()._str_isspace()
return super()._str_isspace()

def _str_istitle(self):
if hasattr(pc, "utf8_is_title"):
return type(self)(pc.utf8_is_title(self.data))
else:
super()._str_istitle()
return super()._str_istitle()

def _str_isupper(self):
if hasattr(pc, "utf8_is_upper"):
Expand Down
8 changes: 7 additions & 1 deletion tests/test_pandas_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,13 @@ def test_setitem_sequence(self, data, box_in_series):

@xfail_list_setitem_not_implemented
def test_setitem_empty_indxer(self, data, box_in_series):
BaseSetitemTests.test_setitem_empty_indxer(self, data, box_in_series)
if hasattr(BaseSetitemTests, "test_setitem_empty_indxer"):
BaseSetitemTests.test_setitem_empty_indxer(self, data, box_in_series)

@xfail_list_setitem_not_implemented
def test_setitem_empty_indexer(self, data, box_in_series):
if hasattr(BaseSetitemTests, "test_setitem_empty_indexer"):
BaseSetitemTests.test_setitem_empty_indexer(self, data, box_in_series)

@xfail_list_setitem_not_implemented
def test_setitem_sequence_broadcasts(self, data, box_in_series):
Expand Down

0 comments on commit 45d999f

Please sign in to comment.