Skip to content

Commit 288e005

Browse files
Merge remote-tracking branch 'upstream/main' into pdep_voting_wip
2 parents 0530d29 + 7bb427e commit 288e005

File tree

1,521 files changed

+116500
-88491
lines changed

Some content is hidden

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

1,521 files changed

+116500
-88491
lines changed

.circleci/config.yml

+46-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,29 @@ 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+
linux-musl:
22+
docker:
23+
- image: quay.io/pypa/musllinux_1_1_aarch64
24+
resource_class: arm.large
25+
steps:
26+
# Install pkgs first to have git in the image
27+
# (needed for checkout)
28+
- run: |
29+
apk update
30+
apk add git
31+
apk add musl-locales
32+
- checkout
33+
- run: |
34+
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
35+
. ~/virtualenvs/pandas-dev/bin/activate
36+
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
37+
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytz pytest>=7.3.2 pytest-xdist>=2.2.0 hypothesis>=6.46.1
38+
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
39+
python -m pip list --no-cache-dir
40+
- run: |
41+
. ~/virtualenvs/pandas-dev/bin/activate
42+
export PANDAS_CI=1
43+
python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml
2144
build-aarch64:
2245
parameters:
2346
cibw-build:
@@ -46,9 +69,15 @@ jobs:
4669
fi
4770
- run:
4871
name: Build aarch64 wheels
72+
no_output_timeout: 30m # Sometimes the tests won't generate any output, make sure the job doesn't get killed by that
4973
command: |
50-
pip3 install cibuildwheel==2.12.1
51-
cibuildwheel --output-dir wheelhouse
74+
pip3 install cibuildwheel==2.15.0
75+
# When this is a nightly wheel build, allow picking up NumPy 2.0 dev wheels:
76+
if [[ "$IS_SCHEDULE_DISPATCH" == "true" || "$IS_PUSH" != 'true' ]]; then
77+
export CIBW_ENVIRONMENT="PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
78+
fi
79+
cibuildwheel --prerelease-pythons --output-dir wheelhouse
80+
5281
environment:
5382
CIBW_BUILD: << parameters.cibw-build >>
5483

@@ -83,6 +112,13 @@ workflows:
83112
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
84113
jobs:
85114
- test-arm
115+
test-musl:
116+
# Don't run trigger this one when scheduled pipeline runs
117+
when:
118+
not:
119+
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
120+
jobs:
121+
- linux-musl
86122
build-wheels:
87123
jobs:
88124
- build-aarch64:
@@ -91,4 +127,11 @@ workflows:
91127
only: /^v.*/
92128
matrix:
93129
parameters:
94-
cibw-build: ["cp39-manylinux_aarch64", "cp310-manylinux_aarch64", "cp311-manylinux_aarch64"]
130+
cibw-build: ["cp39-manylinux_aarch64",
131+
"cp310-manylinux_aarch64",
132+
"cp311-manylinux_aarch64",
133+
"cp312-manylinux_aarch64",
134+
"cp39-musllinux_aarch64",
135+
"cp310-musllinux_aarch64",
136+
"cp311-musllinux_aarch64",
137+
"cp312-musllinux_aarch64",]

.circleci/setup_env.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ source activate pandas-dev
4848
# downstream CI jobs that may also build pandas from source.
4949
export PANDAS_CI=1
5050

51-
if pip list | grep -q ^pandas; then
51+
if pip show pandas 1>/dev/null; then
5252
echo
5353
echo "remove any installed pandas package w/o removing anything else"
54-
pip uninstall -y pandas || true
54+
pip uninstall -y pandas
5555
fi
5656

5757
echo "Install pandas"
58-
python -m pip install --no-build-isolation -ve .
58+
python -m pip install --no-build-isolation -ve . --config-settings=setup-args="--werror"
5959

6060
echo "done"

.gitattributes

+68
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,71 @@
1414
*.xls binary
1515
*.xlsx binary
1616
pandas/_version.py export-subst
17+
18+
19+
*.bz2 export-ignore
20+
*.csv export-ignore
21+
*.data export-ignore
22+
*.dta export-ignore
23+
*.feather export-ignore
24+
*.tar export-ignore
25+
*.gz export-ignore
26+
*.h5 export-ignore
27+
*.html export-ignore
28+
*.json export-ignore
29+
*.jsonl export-ignore
30+
*.kml export-ignore
31+
*.msgpack export-ignore
32+
*.pdf export-ignore
33+
*.parquet export-ignore
34+
*.pickle export-ignore
35+
*.pkl export-ignore
36+
*.png export-ignore
37+
*.pptx export-ignore
38+
*.ods export-ignore
39+
*.odt export-ignore
40+
*.orc export-ignore
41+
*.sas7bdat export-ignore
42+
*.sav export-ignore
43+
*.so export-ignore
44+
*.txt export-ignore
45+
*.xls export-ignore
46+
*.xlsb export-ignore
47+
*.xlsm export-ignore
48+
*.xlsx export-ignore
49+
*.xpt export-ignore
50+
*.cpt export-ignore
51+
*.xml export-ignore
52+
*.xsl export-ignore
53+
*.xz export-ignore
54+
*.zip export-ignore
55+
*.zst export-ignore
56+
*~ export-ignore
57+
.DS_Store export-ignore
58+
.git* export-ignore
59+
60+
*.py[ocd] export-ignore
61+
*.pxi export-ignore
62+
63+
# Ignoring stuff from the top level
64+
.circleci export-ignore
65+
.github export-ignore
66+
asv_bench export-ignore
67+
ci export-ignore
68+
doc export-ignore
69+
gitpod export-ignore
70+
MANIFEST.in export-ignore
71+
scripts export-ignore
72+
typings export-ignore
73+
web export-ignore
74+
CITATION.cff export-ignore
75+
codecov.yml export-ignore
76+
Dockerfile export-ignore
77+
environment.yml export-ignore
78+
setup.py export-ignore
79+
80+
81+
# GH 39321
82+
# csv_dir_path fixture checks the existence of the directory
83+
# exclude the whole directory to avoid running related tests in sdist
84+
pandas/tests/io/parser/data export-ignore

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ web/ @datapythonista
99

1010
# docs
1111
doc/cheatsheet @Dr-Irv
12+
doc/source/development @noatamir
1213

1314
# pandas
1415
pandas/_libs/ @WillAyd

.github/actions/build_pandas/action.yml

+19-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ inputs:
44
editable:
55
description: Whether to build pandas in editable mode (default true)
66
default: true
7+
meson_args:
8+
description: Extra flags to pass to meson
9+
required: false
10+
cflags_adds:
11+
description: Items to append to the CFLAGS variable
12+
required: false
713
runs:
814
using: composite
915
steps:
@@ -12,13 +18,24 @@ runs:
1218
run: |
1319
micromamba info
1420
micromamba list
21+
pip list --pre
22+
shell: bash -el {0}
23+
24+
- name: Uninstall existing Pandas installation
25+
run: |
26+
if pip show pandas 1>/dev/null; then
27+
pip uninstall -y pandas
28+
fi
1529
shell: bash -el {0}
1630

1731
- name: Build Pandas
1832
run: |
33+
export CFLAGS="$CFLAGS ${{ inputs.cflags_adds }}"
1934
if [[ ${{ inputs.editable }} == "true" ]]; then
20-
pip install -e . --no-build-isolation -v
35+
pip install -e . --no-build-isolation -v --no-deps ${{ inputs.meson_args }} \
36+
--config-settings=setup-args="--werror"
2137
else
22-
pip install . --no-build-isolation -v
38+
pip install . --no-build-isolation -v --no-deps ${{ inputs.meson_args }} \
39+
--config-settings=setup-args="--werror"
2340
fi
2441
shell: bash -el {0}

.github/actions/run-tests/action.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
name: Run tests and report results
2+
inputs:
3+
preload:
4+
description: Preload arguments for sanitizer
5+
required: false
6+
asan_options:
7+
description: Arguments for Address Sanitizer (ASAN)
8+
required: false
29
runs:
310
using: composite
411
steps:
512
- name: Test
6-
run: ci/run_tests.sh
13+
run: ${{ inputs.asan_options }} ${{ inputs.preload }} ci/run_tests.sh
714
shell: bash -el {0}
815

916
- name: Publish test results
@@ -13,11 +20,6 @@ runs:
1320
path: test-data.xml
1421
if: failure()
1522

16-
- name: Report Coverage
17-
run: coverage report -m
18-
shell: bash -el {0}
19-
if: failure()
20-
2123
- name: Upload coverage to Codecov
2224
uses: codecov/codecov-action@v3
2325
with:

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ runs:
1111
with:
1212
environment-file: ${{ inputs.environment-file }}
1313
environment-name: test
14-
condarc-file: ci/condarc.yml
14+
condarc-file: ci/.condarc
1515
cache-environment: true
1616
cache-downloads: true

.github/workflows/autoupdate-pre-commit-config.yml

-39
This file was deleted.
+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Linkcheck
2+
on:
3+
schedule:
4+
# Run monthly on the 1st day of the month
5+
- cron: '0 0 1 * *'
6+
pull_request:
7+
paths:
8+
- ".github/workflows/broken-linkcheck.yml"
9+
- "doc/make.py"
10+
jobs:
11+
linkcheck:
12+
if: false
13+
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
shell: bash -el {0}
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Set up Conda
25+
uses: ./.github/actions/setup-conda
26+
27+
- name: Build Pandas
28+
uses: ./.github/actions/build_pandas
29+
30+
- name: Run linkcheck script
31+
working-directory: ./doc
32+
run: |
33+
set -o pipefail
34+
python make.py linkcheck | tee linkcheck.txt
35+
36+
- name: Display broken links
37+
if: failure()
38+
working-directory: ./doc
39+
run: grep broken linkcheck.txt
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Purge caches once a week
2+
on:
3+
schedule:
4+
# 4:10 UTC on Sunday
5+
- cron: "10 4 * * 0"
6+
7+
jobs:
8+
cleanup:
9+
runs-on: ubuntu-latest
10+
if: github.repository_owner == 'pandas-dev'
11+
permissions:
12+
actions: write
13+
steps:
14+
- name: Clean Cache
15+
run: |
16+
gh extension install actions/gh-actions-cache
17+
18+
REPO=${{ github.repository }}
19+
20+
echo "Fetching list of cache key"
21+
allCaches=$(gh actions-cache list -L 100 -R $REPO | cut -f 1 )
22+
23+
## Setting this to not fail the workflow while deleting cache keys.
24+
set +e
25+
echo "Deleting caches..."
26+
for cacheKey in $allCaches
27+
do
28+
gh actions-cache delete $cacheKey -R $REPO --confirm
29+
done
30+
echo "Done"
31+
env:
32+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)