Skip to content

Commit 85d31ec

Browse files
authored
Merge branch 'main' into issue-50395
2 parents 33e5b7e + 3083ae9 commit 85d31ec

File tree

897 files changed

+24820
-14689
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

897 files changed

+24820
-14689
lines changed

.circleci/config.yml

+70
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,78 @@ jobs:
1818
PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH
1919
LD_PRELOAD=$HOME/miniconda3/envs/pandas-dev/lib/libgomp.so.1:$LD_PRELOAD
2020
ci/run_tests.sh
21+
build-aarch64:
22+
parameters:
23+
cibw-build:
24+
type: string
25+
machine:
26+
image: ubuntu-2004:202101-01
27+
resource_class: arm.large
28+
environment:
29+
ENV_FILE: ci/deps/circle-38-arm64.yaml
30+
TRIGGER_SOURCE: << pipeline.trigger_source >>
31+
steps:
32+
- checkout
33+
- run:
34+
name: Check if build is necessary
35+
command: |
36+
# Check if tag is defined or TRIGGER_SOURCE is scheduled
37+
if [[ -n "$CIRCLE_TAG" ]]; then
38+
echo 'export IS_PUSH="true"' >> "$BASH_ENV"
39+
elif [[ $TRIGGER_SOURCE == "scheduled_pipeline" ]]; then
40+
echo 'export IS_SCHEDULE_DISPATCH="true"' >> "$BASH_ENV"
41+
# Look for the build label/[wheel build] in commit
42+
# grep takes a regex, so need to escape brackets
43+
elif (git log --format=oneline -n 1 $CIRCLE_SHA1) | grep -q '\[wheel build\]'; then
44+
: # Do nothing
45+
elif ! (curl https://api.github.com/repos/pandas-dev/pandas/issues/$CIRCLE_PR_NUMBER | jq '.labels' | grep -q 'Build'); then
46+
circleci-agent step halt
47+
fi
48+
- run:
49+
name: Build aarch64 wheels
50+
command: |
51+
pip3 install cibuildwheel==2.9.0
52+
cibuildwheel --output-dir wheelhouse
53+
environment:
54+
CIBW_BUILD: << parameters.cibw-build >>
55+
56+
- run:
57+
name: Install Anaconda Client & Upload Wheels
58+
command: |
59+
echo "Install Mambaforge"
60+
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/4.14.0-0/Mambaforge-4.14.0-0-Linux-aarch64.sh"
61+
echo "Downloading $MAMBA_URL"
62+
wget -q $MAMBA_URL -O minimamba.sh
63+
chmod +x minimamba.sh
64+
65+
MAMBA_DIR="$HOME/miniconda3"
66+
rm -rf $MAMBA_DIR
67+
./minimamba.sh -b -p $MAMBA_DIR
68+
69+
export PATH=$MAMBA_DIR/bin:$PATH
70+
71+
mamba install -y -c conda-forge anaconda-client
72+
73+
source ci/upload_wheels.sh
74+
set_upload_vars
75+
upload_wheels
76+
- store_artifacts:
77+
path: wheelhouse/
2178

2279
workflows:
2380
test:
81+
# Don't run trigger this one when scheduled pipeline runs
82+
when:
83+
not:
84+
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
2485
jobs:
2586
- test-arm
87+
build-wheels:
88+
jobs:
89+
- build-aarch64:
90+
filters:
91+
tags:
92+
only: /^v.*/
93+
matrix:
94+
parameters:
95+
cibw-build: ["cp38-manylinux_aarch64", "cp39-manylinux_aarch64", "cp310-manylinux_aarch64", "cp311-manylinux_aarch64"]

.circleci/setup_env.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ if pip list | grep -q ^pandas; then
5555
fi
5656

5757
echo "Build extensions"
58-
# GH 47305: Parallel build can causes flaky ImportError from pandas/_libs/tslibs
59-
python setup.py build_ext -q -j1
58+
python setup.py build_ext -q -j4
6059

6160
echo "Install pandas"
6261
python -m pip install --no-build-isolation --no-use-pep517 -e .

.github/actions/build_pandas/action.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,5 @@ runs:
1616
python -m pip install -e . --no-build-isolation --no-use-pep517 --no-index
1717
shell: bash -el {0}
1818
env:
19-
# Cannot use parallel compilation on Windows, see https://github.com/pandas-dev/pandas/issues/30873
20-
# GH 47305: Parallel build causes flaky ImportError: /home/runner/work/pandas/pandas/pandas/_libs/tslibs/timestamps.cpython-38-x86_64-linux-gnu.so: undefined symbol: pandas_datetime_to_datetimestruct
21-
N_JOBS: 1
22-
#N_JOBS: ${{ runner.os == 'Windows' && 1 || 2 }}
19+
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
20+
N_JOBS: ${{ runner.os == 'macOS' && 3 || 2 }}

.github/actions/setup-conda/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ runs:
1818
- name: Set Arrow version in ${{ inputs.environment-file }} to ${{ inputs.pyarrow-version }}
1919
run: |
2020
grep -q ' - pyarrow' ${{ inputs.environment-file }}
21-
sed -i"" -e "s/ - pyarrow<11/ - pyarrow=${{ inputs.pyarrow-version }}/" ${{ inputs.environment-file }}
21+
sed -i"" -e "s/ - pyarrow/ - pyarrow=${{ inputs.pyarrow-version }}/" ${{ inputs.environment-file }}
2222
cat ${{ inputs.environment-file }}
2323
shell: bash
2424
if: ${{ inputs.pyarrow-version }}
@@ -30,7 +30,7 @@ runs:
3030
environment-name: ${{ inputs.environment-name }}
3131
extra-specs: ${{ inputs.extra-specs }}
3232
channels: conda-forge
33-
channel-priority: ${{ runner.os == 'macOS' && 'flexible' || 'strict' }}
33+
channel-priority: 'strict'
3434
condarc-file: ci/condarc.yml
3535
cache-env: true
3636
cache-downloads: true

.github/workflows/32-bit-linux.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
push:
55
branches:
66
- main
7-
- 1.5.x
7+
- 2.0.x
88
pull_request:
99
branches:
1010
- main
11-
- 1.5.x
11+
- 2.0.x
1212
paths-ignore:
1313
- "doc/**"
1414

@@ -40,7 +40,7 @@ jobs:
4040
python -m pip install --no-deps -U pip wheel 'setuptools<60.0.0' && \
4141
python -m pip install versioneer[toml] && \
4242
python -m pip install cython numpy python-dateutil pytz pytest>=7.0.0 pytest-xdist>=2.2.0 pytest-asyncio>=0.17 hypothesis>=6.34.2 && \
43-
python setup.py build_ext -q -j1 && \
43+
python setup.py build_ext -q -j$(nproc) && \
4444
python -m pip install --no-build-isolation --no-use-pep517 -e . && \
4545
python -m pip list && \
4646
export PANDAS_CI=1 && \
@@ -52,3 +52,7 @@ jobs:
5252
name: Test results
5353
path: test-data.xml
5454
if: failure()
55+
concurrency:
56+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
57+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-32bit
58+
cancel-in-progress: true

.github/workflows/code-checks.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
push:
55
branches:
66
- main
7-
- 1.5.x
7+
- 2.0.x
88
pull_request:
99
branches:
1010
- main
11-
- 1.5.x
11+
- 2.0.x
1212

1313
env:
1414
ENV_FILE: environment.yml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deprecations Bot
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types:
8+
[closed]
9+
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
deprecation_update:
16+
permissions:
17+
issues: write
18+
if: >-
19+
contains(github.event.pull_request.labels.*.name, 'Deprecate') && github.event.pull_request.merged == true
20+
runs-on: ubuntu-22.04
21+
env:
22+
DEPRECATION_TRACKER_ISSUE: 50578
23+
steps:
24+
- name: Checkout
25+
run: |
26+
echo "Adding deprecation PR number to deprecation tracking issue"
27+
export PR=${{ github.event.pull_request.number }}
28+
BODY=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/issues/${DEPRECATION_TRACKER_ISSUE} |
29+
python3 -c "import sys, json, os; x = {'body': json.load(sys.stdin)['body']}; pr = os.environ['PR']; x['body'] += f'\n- [ ] #{pr}'; print(json.dumps(x))")
30+
echo ${BODY}
31+
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -X PATCH -d "${BODY}" https://api.github.com/repos/${{ github.repository }}/issues/${DEPRECATION_TRACKER_ISSUE}

.github/workflows/docbuild-and-upload.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ on:
44
push:
55
branches:
66
- main
7-
- 1.5.x
7+
- 2.0.x
88
tags:
99
- '*'
1010
pull_request:
1111
branches:
1212
- main
13-
- 1.5.x
13+
- 2.0.x
1414

1515
env:
1616
ENV_FILE: environment.yml
@@ -87,3 +87,10 @@ jobs:
8787
name: website
8888
path: web/build
8989
retention-days: 14
90+
91+
- name: Trigger web/doc preview
92+
run: curl -X POST https://pandas.pydata.org/preview/submit/$RUN_ID/$PR_ID/
93+
env:
94+
RUN_ID: ${{ github.run_id }}
95+
PR_ID: ${{ github.event.pull_request.number }}
96+
if: github.event_name == 'pull_request'

.github/workflows/macos-windows.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,19 @@ on:
44
push:
55
branches:
66
- main
7-
- 1.5.x
7+
- 2.0.x
88
pull_request:
99
branches:
1010
- main
11-
- 1.5.x
11+
- 2.0.x
1212
paths-ignore:
1313
- "doc/**"
14+
- "web/**"
1415

1516
env:
1617
PANDAS_CI: 1
1718
PYTEST_TARGET: pandas
1819
PATTERN: "not slow and not db and not network and not single_cpu"
19-
ERROR_ON_WARNINGS: "1"
20-
2120

2221
permissions:
2322
contents: read

.github/workflows/package-checks.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
push:
55
branches:
66
- main
7-
- 1.5.x
7+
- 2.0.x
88
pull_request:
99
branches:
1010
- main
11-
- 1.5.x
11+
- 2.0.x
1212
types: [ labeled, opened, synchronize, reopened ]
1313

1414
permissions:
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-22.04
2121
strategy:
2222
matrix:
23-
extra: ["test", "performance", "timezone", "computation", "fss", "aws", "gcp", "excel", "parquet", "feather", "hdf5", "spss", "postgresql", "mysql", "sql-other", "html", "xml", "plot", "output_formatting", "clipboard", "compression", "all"]
23+
extra: ["test", "performance", "computation", "fss", "aws", "gcp", "excel", "parquet", "feather", "hdf5", "spss", "postgresql", "mysql", "sql-other", "html", "xml", "plot", "output_formatting", "clipboard", "compression", "all"]
2424
fail-fast: false
2525
name: Install Extras - ${{ matrix.extra }}
2626
concurrency:

.github/workflows/preview-docs.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Preview docs
2+
on:
3+
issue_comment:
4+
types: created
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
preview_docs:
11+
permissions:
12+
issues: write
13+
pull-requests: write
14+
runs-on: ubuntu-22.04
15+
steps:
16+
- if: github.event.comment.body == '/preview'
17+
run: |
18+
if curl --output /dev/null --silent --head --fail "https://pandas.pydata.org/preview/${{ github.event.issue.number }}/"; then
19+
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"body": "Website preview of this PR available at: https://pandas.pydata.org/preview/${{ github.event.issue.number }}/"}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments
20+
else
21+
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"body": "No preview found for PR #${{ github.event.issue.number }}. Did the docs build complete?"}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments
22+
fi

.github/workflows/python-dev.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@ name: Python Dev
2323
on:
2424
push:
2525
branches:
26-
# - main
27-
# - 1.5.x
26+
- main
27+
- 2.0.x
2828
- None
2929
pull_request:
3030
branches:
31-
# - main
32-
# - 1.5.x
31+
- main
32+
- 2.0.x
3333
- None
3434
paths-ignore:
3535
- "doc/**"
36+
- "web/**"
3637

3738
env:
3839
PYTEST_WORKERS: "auto"
@@ -46,7 +47,7 @@ permissions:
4647

4748
jobs:
4849
build:
49-
# if: false # Uncomment this to freeze the workflow, comment it to unfreeze
50+
if: false # Uncomment this to freeze the workflow, comment it to unfreeze
5051
runs-on: ${{ matrix.os }}
5152
strategy:
5253
fail-fast: false
@@ -81,10 +82,9 @@ jobs:
8182
python -m pip install python-dateutil pytz cython hypothesis>=6.34.2 pytest>=7.0.0 pytest-xdist>=2.2.0 pytest-cov pytest-asyncio>=0.17
8283
python -m pip list
8384
84-
# GH 47305: Parallel build can cause flaky ImportError from pandas/_libs/tslibs
8585
- name: Build Pandas
8686
run: |
87-
python setup.py build_ext -q -j1
87+
python setup.py build_ext -q -j4
8888
python -m pip install -e . --no-build-isolation --no-use-pep517 --no-index
8989
9090
- name: Build Version

.github/workflows/sdist.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ on:
44
push:
55
branches:
66
- main
7-
- 1.5.x
7+
- 2.0.x
88
pull_request:
99
branches:
1010
- main
11-
- 1.5.x
11+
- 2.0.x
1212
types: [labeled, opened, synchronize, reopened]
1313
paths-ignore:
1414
- "doc/**"
15+
- "web/**"
1516

1617
permissions:
1718
contents: read

0 commit comments

Comments
 (0)