Skip to content

Commit 1473290

Browse files
authored
Merge branch 'main' into pivot_sort
2 parents 4ebca9d + e8308ce commit 1473290

File tree

5 files changed

+19
-74
lines changed

5 files changed

+19
-74
lines changed

.github/workflows/windows.yml renamed to .github/workflows/macos-windows.yml

+13-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Windows
1+
name: Windows-MacOS
22

33
on:
44
push:
@@ -21,18 +21,20 @@ env:
2121

2222
jobs:
2323
pytest:
24-
runs-on: windows-latest
2524
defaults:
2625
run:
2726
shell: bash -el {0}
2827
timeout-minutes: 90
2928
strategy:
3029
matrix:
30+
os: [macos-latest, windows-latest]
3131
env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml]
3232
fail-fast: false
33+
runs-on: ${{ matrix.os }}
34+
name: ${{ format('{0} {1}', matrix.os, matrix.env_file) }}
3335
concurrency:
3436
# https://github.community/t/concurrecy-not-work-for-push/183068/7
35-
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-windows
37+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-${{ matrix.env_file }}-${{ matrix.os }}
3638
cancel-in-progress: true
3739

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

56+
# ImportError: 2): Library not loaded: @rpath/libssl.1.1.dylib
57+
# Referenced from: /Users/runner/miniconda3/envs/pandas-dev/lib/libthrift.0.13.0.dylib
58+
# Reason: image not found
59+
- name: Upgrade pyarrow on MacOS
60+
run: conda install -n pandas-dev -c conda-forge --no-update-deps pyarrow=6
61+
if: ${{ matrix.os == 'macos-latest' }}
62+
5463
- name: Build Pandas
5564
uses: ./.github/actions/build_pandas
5665

azure-pipelines.yml

-5
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ variables:
2222
PANDAS_CI: 1
2323

2424
jobs:
25-
- template: ci/azure/posix.yml
26-
parameters:
27-
name: macOS
28-
vmImage: macOS-10.15
29-
3025
- job: py38_32bit
3126
pool:
3227
vmImage: ubuntu-18.04

ci/azure/posix.yml

-50
This file was deleted.

ci/setup_env.sh

-9
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,6 @@ mamba install -n pandas-dev 'setuptools<60'
7373
echo "conda list -n pandas-dev"
7474
conda list -n pandas-dev
7575

76-
# From pyarrow on MacOS
77-
# ImportError: 2): Library not loaded: @rpath/libssl.1.1.dylib
78-
# Referenced from: /Users/runner/miniconda3/envs/pandas-dev/lib/libthrift.0.13.0.dylib
79-
# Reason: image not found
80-
if [[ "$(uname)" == 'Darwin' ]]; then
81-
echo "Update pyarrow for pyarrow on MacOS"
82-
conda install -n pandas-dev -c conda-forge --no-update-deps pyarrow=6
83-
fi
84-
8576
if [[ "$BITS32" == "yes" ]]; then
8677
# activate 32-bit compiler
8778
export CONDA_BUILD=1

pandas/core/groupby/generic.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626

2727
import numpy as np
2828

29-
from pandas._libs import reduction as libreduction
29+
from pandas._libs import (
30+
Interval,
31+
reduction as libreduction,
32+
)
3033
from pandas._typing import (
3134
ArrayLike,
3235
Manager,
@@ -652,12 +655,9 @@ def value_counts(
652655

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

656-
# error: "ndarray" has no attribute "left"
657-
# error: "ndarray" has no attribute "right"
658-
sorter = np.lexsort(
659-
(lab.left, lab.right, ids) # type: ignore[attr-defined]
660-
)
660+
sorter = np.lexsort((lab_interval.left, lab_interval.right, ids))
661661
else:
662662
sorter = np.lexsort((lab, ids))
663663

0 commit comments

Comments
 (0)