Skip to content

Commit 4c04104

Browse files
authored
Merge branch 'main' into dev/to_excel/format
2 parents a44242a + d3597ed commit 4c04104

File tree

1,440 files changed

+94591
-77415
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,440 files changed

+94591
-77415
lines changed

.circleci/config.yml

Lines changed: 45 additions & 3 deletions
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.14.1
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
5179
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,5 +127,11 @@ workflows:
91127
only: /^v.*/
92128
matrix:
93129
parameters:
94-
# TODO: Enable Python 3.12 wheels when numpy releases a version that supports Python 3.12
95-
cibw-build: ["cp39-manylinux_aarch64", "cp310-manylinux_aarch64", "cp311-manylinux_aarch64"]#, "cp312-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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 68 additions & 0 deletions
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/actions/build_pandas/action.yml

Lines changed: 11 additions & 2 deletions
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:
@@ -24,9 +30,12 @@ runs:
2430

2531
- name: Build Pandas
2632
run: |
33+
export CFLAGS="$CFLAGS ${{ inputs.cflags_adds }}"
2734
if [[ ${{ inputs.editable }} == "true" ]]; then
28-
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"
2937
else
30-
pip install . --no-build-isolation -v
38+
pip install . --no-build-isolation -v --no-deps ${{ inputs.meson_args }} \
39+
--config-settings=setup-args="--werror"
3140
fi
3241
shell: bash -el {0}

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

Lines changed: 8 additions & 6 deletions
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

Lines changed: 1 addition & 1 deletion
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
Lines changed: 39 additions & 0 deletions
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

.github/workflows/code-checks.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
push:
55
branches:
66
- main
7-
- 2.0.x
7+
- 2.2.x
88
pull_request:
99
branches:
1010
- main
11-
- 2.0.x
11+
- 2.2.x
1212

1313
env:
1414
ENV_FILE: environment.yml
@@ -33,7 +33,7 @@ jobs:
3333

3434
steps:
3535
- name: Checkout
36-
uses: actions/checkout@v3
36+
uses: actions/checkout@v4
3737
with:
3838
fetch-depth: 0
3939

@@ -86,7 +86,7 @@ jobs:
8686
if: ${{ steps.build.outcome == 'success' && always() }}
8787

8888
- name: Typing + pylint
89-
uses: pre-commit/[email protected].0
89+
uses: pre-commit/[email protected].1
9090
with:
9191
extra_args: --verbose --hook-stage manual --all-files
9292
if: ${{ steps.build.outcome == 'success' && always() }}
@@ -109,7 +109,7 @@ jobs:
109109

110110
steps:
111111
- name: Checkout
112-
uses: actions/checkout@v3
112+
uses: actions/checkout@v4
113113
with:
114114
fetch-depth: 0
115115

@@ -124,7 +124,7 @@ jobs:
124124
run: |
125125
cd asv_bench
126126
asv machine --yes
127-
asv run --quick --dry-run --strict --durations=30 --python=same
127+
asv run --quick --dry-run --durations=30 --python=same --show-stderr
128128
129129
build_docker_dev_environment:
130130
name: Build Docker Dev Environment
@@ -143,7 +143,7 @@ jobs:
143143
run: docker image prune -f
144144

145145
- name: Checkout
146-
uses: actions/checkout@v3
146+
uses: actions/checkout@v4
147147
with:
148148
fetch-depth: 0
149149

@@ -164,13 +164,13 @@ jobs:
164164

165165
steps:
166166
- name: Checkout
167-
uses: actions/checkout@v3
167+
uses: actions/checkout@v4
168168
with:
169169
fetch-depth: 0
170170

171171
- name: Setup Python
172172
id: setup_python
173-
uses: actions/setup-python@v4
173+
uses: actions/setup-python@v5
174174
with:
175175
python-version: '3.10'
176176
cache: 'pip'

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
- python
2828

2929
steps:
30-
- uses: actions/checkout@v3
31-
- uses: github/codeql-action/init@v2
30+
- uses: actions/checkout@v4
31+
- uses: github/codeql-action/init@v3
3232
with:
3333
languages: ${{ matrix.language }}
34-
- uses: github/codeql-action/autobuild@v2
35-
- uses: github/codeql-action/analyze@v2
34+
- uses: github/codeql-action/autobuild@v3
35+
- uses: github/codeql-action/analyze@v3

.github/workflows/comment-commands.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,10 @@ jobs:
2424
concurrency:
2525
group: ${{ github.actor }}-preview-docs
2626
steps:
27-
- run: |
28-
if curl --output /dev/null --silent --head --fail "https://pandas.pydata.org/preview/${{ github.event.issue.number }}/"; then
29-
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
30-
else
31-
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
32-
fi
27+
- uses: pandas-dev/[email protected]
28+
with:
29+
previewer-server: "https://pandas.pydata.org/preview"
30+
artifact-job: "Doc Build and Upload"
3331
asv_run:
3432
runs-on: ubuntu-22.04
3533
# TODO: Support more benchmarking options later, against different branches, against self, etc
@@ -51,7 +49,7 @@ jobs:
5149

5250
steps:
5351
- name: Checkout
54-
uses: actions/checkout@v3
52+
uses: actions/checkout@v4
5553
with:
5654
fetch-depth: 0
5755

@@ -77,7 +75,7 @@ jobs:
7775
echo 'EOF' >> $GITHUB_ENV
7876
echo "REGEX=$REGEX" >> $GITHUB_ENV
7977
80-
- uses: actions/github-script@v6
78+
- uses: actions/github-script@v7
8179
env:
8280
BENCH_OUTPUT: ${{env.BENCH_OUTPUT}}
8381
REGEX: ${{env.REGEX}}

0 commit comments

Comments
 (0)