Skip to content

Commit 044227f

Browse files
author
MarcoGorelli
committed
Merge remote-tracking branch 'upstream/main' into pt1-deprecate-ban-upcasting
2 parents 2f980c6 + 23c3dc2 commit 044227f

File tree

927 files changed

+26451
-15487
lines changed

Some content is hidden

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

927 files changed

+26451
-15487
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"]

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

+6-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
paths-ignore:
1313
- "doc/**"
1414

@@ -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

+6-5
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

.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

.github/workflows/ubuntu.yml

+12-20
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@ 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-
15-
env:
16-
PANDAS_CI: 1
14+
- "web/**"
1715

1816
permissions:
1917
contents: read
@@ -29,7 +27,8 @@ jobs:
2927
matrix:
3028
env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml, actions-311.yaml]
3129
pattern: ["not single_cpu", "single_cpu"]
32-
pyarrow_version: ["7", "8", "9", "10"]
30+
pyarrow_version: ["8", "9", "10"]
31+
pandas_ci: [1]
3332
include:
3433
- name: "Downstream Compat"
3534
env_file: actions-38-downstream_compat.yaml
@@ -38,7 +37,6 @@ jobs:
3837
- name: "Minimum Versions"
3938
env_file: actions-38-minimum_versions.yaml
4039
pattern: "not slow and not network and not single_cpu"
41-
error_on_warnings: "0"
4240
- name: "Locale: it_IT"
4341
env_file: actions-38.yaml
4442
pattern: "not slow and not network and not single_cpu"
@@ -63,12 +61,10 @@ jobs:
6361
env_file: actions-310.yaml
6462
pattern: "not slow and not network and not single_cpu"
6563
pandas_copy_on_write: "1"
66-
error_on_warnings: "0"
6764
- name: "Data Manager"
6865
env_file: actions-38.yaml
6966
pattern: "not slow and not network and not single_cpu"
7067
pandas_data_manager: "array"
71-
error_on_warnings: "0"
7268
- name: "Pypy"
7369
env_file: actions-pypy-38.yaml
7470
pattern: "not slow and not network and not single_cpu"
@@ -77,37 +73,33 @@ jobs:
7773
env_file: actions-310-numpydev.yaml
7874
pattern: "not slow and not network and not single_cpu"
7975
test_args: "-W error::DeprecationWarning -W error::FutureWarning"
80-
error_on_warnings: "0"
76+
# TODO(cython3): Re-enable once next-beta(after beta 1) comes out
77+
# There are some warnings failing the build with -werror
78+
pandas_ci: 0
8179
exclude:
82-
- env_file: actions-38.yaml
83-
pyarrow_version: "7"
8480
- env_file: actions-38.yaml
8581
pyarrow_version: "8"
8682
- env_file: actions-38.yaml
8783
pyarrow_version: "9"
88-
- env_file: actions-39.yaml
89-
pyarrow_version: "7"
9084
- env_file: actions-39.yaml
9185
pyarrow_version: "8"
9286
- env_file: actions-39.yaml
9387
pyarrow_version: "9"
94-
- env_file: actions-311.yaml
95-
pyarrow_version: "7"
96-
- env_file: actions-311.yaml
88+
- env_file: actions-310.yaml
9789
pyarrow_version: "8"
98-
- env_file: actions-311.yaml
90+
- env_file: actions-310.yaml
9991
pyarrow_version: "9"
10092
fail-fast: false
10193
name: ${{ matrix.name || format('{0} pyarrow={1} {2}', matrix.env_file, matrix.pyarrow_version, matrix.pattern) }}
10294
env:
10395
ENV_FILE: ci/deps/${{ matrix.env_file }}
10496
PATTERN: ${{ matrix.pattern }}
10597
EXTRA_APT: ${{ matrix.extra_apt || '' }}
106-
ERROR_ON_WARNINGS: ${{ matrix.error_on_warnings || '1' }}
10798
LANG: ${{ matrix.lang || '' }}
10899
LC_ALL: ${{ matrix.lc_all || '' }}
109100
PANDAS_DATA_MANAGER: ${{ matrix.pandas_data_manager || 'block' }}
110101
PANDAS_COPY_ON_WRITE: ${{ matrix.pandas_copy_on_write || '0' }}
102+
PANDAS_CI: ${{ matrix.pandas_ci }}
111103
TEST_ARGS: ${{ matrix.test_args || '' }}
112104
PYTEST_WORKERS: ${{ contains(matrix.pattern, 'not single_cpu') && 'auto' || '1' }}
113105
PYTEST_TARGET: ${{ matrix.pytest_target || 'pandas' }}
@@ -148,7 +140,7 @@ jobs:
148140
- 5432:5432
149141

150142
moto:
151-
image: motoserver/moto
143+
image: motoserver/moto:4.1.4
152144
env:
153145
AWS_ACCESS_KEY_ID: foobar_key
154146
AWS_SECRET_ACCESS_KEY: foobar_secret

0 commit comments

Comments
 (0)