Skip to content

Commit 8a621c5

Browse files
Merge branch 'main' into ndbacked
2 parents a5ac8ba + d711b1d commit 8a621c5

File tree

1,718 files changed

+174946
-108497
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,718 files changed

+174946
-108497
lines changed

.circleci/config.yml

Lines changed: 118 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,135 @@ version: 2.1
33
jobs:
44
test-arm:
55
machine:
6-
image: ubuntu-2004:202101-01
6+
image: ubuntu-2004:2022.04.1
77
resource_class: arm.large
88
environment:
9-
ENV_FILE: ci/deps/circle-38-arm64.yaml
9+
ENV_FILE: ci/deps/circle-310-arm64.yaml
1010
PYTEST_WORKERS: auto
1111
PATTERN: "not single_cpu and not slow and not network and not clipboard and not arm_slow and not db"
1212
PYTEST_TARGET: "pandas"
1313
PANDAS_CI: "1"
1414
steps:
1515
- checkout
1616
- run: .circleci/setup_env.sh
17-
- run: PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH ci/run_tests.sh
17+
- run: >
18+
PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH
19+
LD_PRELOAD=$HOME/miniconda3/envs/pandas-dev/lib/libgomp.so.1:$LD_PRELOAD
20+
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
44+
build-aarch64:
45+
parameters:
46+
cibw-build:
47+
type: string
48+
machine:
49+
image: ubuntu-2004:2022.04.1
50+
resource_class: arm.large
51+
environment:
52+
TRIGGER_SOURCE: << pipeline.trigger_source >>
53+
steps:
54+
- checkout
55+
- run:
56+
name: Check if build is necessary
57+
command: |
58+
# Check if tag is defined or TRIGGER_SOURCE is scheduled
59+
if [[ -n "$CIRCLE_TAG" ]]; then
60+
echo 'export IS_PUSH="true"' >> "$BASH_ENV"
61+
elif [[ $TRIGGER_SOURCE == "scheduled_pipeline" ]]; then
62+
echo 'export IS_SCHEDULE_DISPATCH="true"' >> "$BASH_ENV"
63+
# Look for the build label/[wheel build] in commit
64+
# grep takes a regex, so need to escape brackets
65+
elif (git log --format=oneline -n 1 $CIRCLE_SHA1) | grep -q '\[wheel build\]'; then
66+
: # Do nothing
67+
elif ! (curl https://api.github.com/repos/pandas-dev/pandas/issues/$CIRCLE_PR_NUMBER | jq '.labels' | grep -q 'Build'); then
68+
circleci-agent step halt
69+
fi
70+
- run:
71+
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
73+
command: |
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+
81+
environment:
82+
CIBW_BUILD: << parameters.cibw-build >>
83+
84+
- run:
85+
name: Install Anaconda Client & Upload Wheels
86+
command: |
87+
echo "Install Mambaforge"
88+
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/23.1.0-0/Mambaforge-23.1.0-0-Linux-aarch64.sh"
89+
echo "Downloading $MAMBA_URL"
90+
wget -q $MAMBA_URL -O minimamba.sh
91+
chmod +x minimamba.sh
92+
93+
MAMBA_DIR="$HOME/miniconda3"
94+
rm -rf $MAMBA_DIR
95+
./minimamba.sh -b -p $MAMBA_DIR
96+
97+
export PATH=$MAMBA_DIR/bin:$PATH
98+
99+
mamba install -y -c conda-forge anaconda-client
100+
101+
source ci/upload_wheels.sh
102+
set_upload_vars
103+
upload_wheels
104+
- store_artifacts:
105+
path: wheelhouse/
18106

19107
workflows:
20108
test:
109+
# Don't run trigger this one when scheduled pipeline runs
110+
when:
111+
not:
112+
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
21113
jobs:
22114
- 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
122+
build-wheels:
123+
jobs:
124+
- build-aarch64:
125+
filters:
126+
tags:
127+
only: /^v.*/
128+
matrix:
129+
parameters:
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: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash -e
22

33
echo "Install Mambaforge"
4-
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/4.14.0-0/Mambaforge-4.14.0-0-Linux-aarch64.sh"
4+
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/23.1.0-0/Mambaforge-23.1.0-0-Linux-aarch64.sh"
55
echo "Downloading $MAMBA_URL"
66
wget -q $MAMBA_URL -O minimamba.sh
77
chmod +x minimamba.sh
@@ -48,17 +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

57-
echo "Build extensions"
58-
# GH 47305: Parallel build can causes flaky ImportError from pandas/_libs/tslibs
59-
python setup.py build_ext -q -j1
60-
6157
echo "Install pandas"
62-
python -m pip install --no-build-isolation --no-use-pep517 -e .
58+
python -m pip install --no-build-isolation -ve . --config-settings=setup-args="--werror"
6359

6460
echo "done"

.devcontainer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
// You can edit these settings after create using File > Preferences > Settings > Remote.
1010
"settings": {
1111
"terminal.integrated.shell.linux": "/bin/bash",
12-
"python.condaPath": "/opt/conda/bin/conda",
13-
"python.pythonPath": "/opt/conda/bin/python",
12+
"python.pythonPath": "/usr/local/bin/python",
1413
"python.formatting.provider": "black",
1514
"python.linting.enabled": true,
1615
"python.linting.flake8Enabled": true,

.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/CODEOWNERS

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# github
2+
.github/ @mroeschke
3+
4+
# ci
5+
ci/ @mroeschke
6+
7+
# web
8+
web/ @datapythonista
9+
10+
# docs
11+
doc/cheatsheet @Dr-Irv
12+
doc/source/development @noatamir
13+
14+
# pandas
15+
pandas/_libs/ @WillAyd
16+
pandas/_libs/tslibs/* @MarcoGorelli
17+
pandas/_typing.py @Dr-Irv
18+
pandas/core/groupby/* @rhshadrach
19+
pandas/core/tools/datetimes.py @MarcoGorelli
20+
pandas/io/excel/* @rhshadrach
21+
pandas/io/formats/style.py @attack68
22+
pandas/io/formats/style_render.py @attack68
23+
pandas/io/formats/templates @attack68

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ body:
1717
[latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
1818
required: true
1919
- label: >
20-
I have confirmed this bug exists on the main branch of pandas.
20+
I have confirmed this bug exists on the
21+
[main branch](https://pandas.pydata.org/docs/dev/getting_started/install.html#installing-the-development-version-of-pandas)
22+
of pandas.
2123
- type: textarea
2224
id: example
2325
attributes:

.github/actions/build_pandas/action.yml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
name: Build pandas
22
description: Rebuilds the C extensions and installs pandas
3+
inputs:
4+
editable:
5+
description: Whether to build pandas in editable mode (default true)
6+
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
313
runs:
414
using: composite
515
steps:
@@ -8,15 +18,24 @@ runs:
818
run: |
919
micromamba info
1020
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
1129
shell: bash -el {0}
1230

1331
- name: Build Pandas
1432
run: |
15-
python setup.py build_ext -j $N_JOBS
16-
python -m pip install -e . --no-build-isolation --no-use-pep517 --no-index
33+
export CFLAGS="$CFLAGS ${{ inputs.cflags_adds }}"
34+
if [[ ${{ inputs.editable }} == "true" ]]; then
35+
pip install -e . --no-build-isolation -v --no-deps ${{ inputs.meson_args }} \
36+
--config-settings=setup-args="--werror"
37+
else
38+
pip install . --no-build-isolation -v --no-deps ${{ inputs.meson_args }} \
39+
--config-settings=setup-args="--werror"
40+
fi
1741
shell: bash -el {0}
18-
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 }}

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
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
10-
uses: actions/upload-artifact@v2
17+
uses: actions/upload-artifact@v3
1118
with:
1219
name: Test results
1320
path: test-data.xml
@@ -19,7 +26,7 @@ runs:
1926
if: failure()
2027

2128
- name: Upload coverage to Codecov
22-
uses: codecov/codecov-action@v2
29+
uses: codecov/codecov-action@v3
2330
with:
2431
flags: unittests
2532
name: codecov-pandas

0 commit comments

Comments
 (0)