Skip to content

Commit

Permalink
Merge branch 'main' into pivot_sort
Browse files Browse the repository at this point in the history
  • Loading branch information
ShawnZhong authored May 13, 2022
2 parents 4ebca9d + e8308ce commit 1473290
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 74 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Windows
name: Windows-MacOS

on:
push:
Expand All @@ -21,18 +21,20 @@ env:

jobs:
pytest:
runs-on: windows-latest
defaults:
run:
shell: bash -el {0}
timeout-minutes: 90
strategy:
matrix:
os: [macos-latest, windows-latest]
env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml]
fail-fast: false
runs-on: ${{ matrix.os }}
name: ${{ format('{0} {1}', matrix.os, matrix.env_file) }}
concurrency:
# https://github.uint.cloudmunity/t/concurrecy-not-work-for-push/183068/7
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-windows
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-${{ matrix.os }}
cancel-in-progress: true

steps:
Expand All @@ -47,10 +49,17 @@ jobs:
mamba-version: "*"
channels: conda-forge
activate-environment: pandas-dev
channel-priority: strict
channel-priority: ${{ matrix.os == 'macos-latest' && 'flexible' || 'strict' }}
environment-file: ci/deps/${{ matrix.env_file }}
use-only-tar-bz2: true

# ImportError: 2): Library not loaded: @rpath/libssl.1.1.dylib
# Referenced from: /Users/runner/miniconda3/envs/pandas-dev/lib/libthrift.0.13.0.dylib
# Reason: image not found
- name: Upgrade pyarrow on MacOS
run: conda install -n pandas-dev -c conda-forge --no-update-deps pyarrow=6
if: ${{ matrix.os == 'macos-latest' }}

- name: Build Pandas
uses: ./.github/actions/build_pandas

Expand Down
5 changes: 0 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ variables:
PANDAS_CI: 1

jobs:
- template: ci/azure/posix.yml
parameters:
name: macOS
vmImage: macOS-10.15

- job: py38_32bit
pool:
vmImage: ubuntu-18.04
Expand Down
50 changes: 0 additions & 50 deletions ci/azure/posix.yml

This file was deleted.

9 changes: 0 additions & 9 deletions ci/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,6 @@ mamba install -n pandas-dev 'setuptools<60'
echo "conda list -n pandas-dev"
conda list -n pandas-dev

# From pyarrow on MacOS
# ImportError: 2): Library not loaded: @rpath/libssl.1.1.dylib
# Referenced from: /Users/runner/miniconda3/envs/pandas-dev/lib/libthrift.0.13.0.dylib
# Reason: image not found
if [[ "$(uname)" == 'Darwin' ]]; then
echo "Update pyarrow for pyarrow on MacOS"
conda install -n pandas-dev -c conda-forge --no-update-deps pyarrow=6
fi

if [[ "$BITS32" == "yes" ]]; then
# activate 32-bit compiler
export CONDA_BUILD=1
Expand Down
12 changes: 6 additions & 6 deletions pandas/core/groupby/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@

import numpy as np

from pandas._libs import reduction as libreduction
from pandas._libs import (
Interval,
reduction as libreduction,
)
from pandas._typing import (
ArrayLike,
Manager,
Expand Down Expand Up @@ -652,12 +655,9 @@ def value_counts(

if is_interval_dtype(lab.dtype):
# TODO: should we do this inside II?
lab_interval = cast(Interval, lab)

# error: "ndarray" has no attribute "left"
# error: "ndarray" has no attribute "right"
sorter = np.lexsort(
(lab.left, lab.right, ids) # type: ignore[attr-defined]
)
sorter = np.lexsort((lab_interval.left, lab_interval.right, ids))
else:
sorter = np.lexsort((lab, ids))

Expand Down

0 comments on commit 1473290

Please sign in to comment.