Skip to content

Commit 707a222

Browse files
authored
Merge branch 'main' into getdummies-default-dtype
2 parents f97df66 + 71fc89c commit 707a222

File tree

406 files changed

+7387
-3161
lines changed

Some content is hidden

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

406 files changed

+7387
-3161
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
test-arm:
55
machine:
66
image: ubuntu-2004:202101-01
7-
resource_class: arm.medium
7+
resource_class: arm.large
88
environment:
99
ENV_FILE: ci/deps/circle-38-arm64.yaml
1010
PYTEST_WORKERS: auto

.circleci/setup_env.sh

Lines changed: 12 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,16 @@
11
#!/bin/bash -e
22

3-
# edit the locale file if needed
4-
if [[ "$(uname)" == "Linux" && -n "$LC_ALL" ]]; then
5-
echo "Adding locale to the first line of pandas/__init__.py"
6-
rm -f pandas/__init__.pyc
7-
SEDC="3iimport locale\nlocale.setlocale(locale.LC_ALL, '$LC_ALL')\n"
8-
sed -i "$SEDC" pandas/__init__.py
9-
10-
echo "[head -4 pandas/__init__.py]"
11-
head -4 pandas/__init__.py
12-
echo
13-
fi
3+
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"
5+
echo "Downloading $MAMBA_URL"
6+
wget -q $MAMBA_URL -O minimamba.sh
7+
chmod +x minimamba.sh
148

9+
MAMBA_DIR="$HOME/miniconda3"
10+
rm -rf $MAMBA_DIR
11+
./minimamba.sh -b -p $MAMBA_DIR
1512

16-
MINICONDA_DIR=/usr/local/miniconda
17-
if [ -e $MINICONDA_DIR ] && [ "$BITS32" != yes ]; then
18-
echo "Found Miniconda installation at $MINICONDA_DIR"
19-
else
20-
echo "Install Miniconda"
21-
DEFAULT_CONDA_URL="https://repo.continuum.io/miniconda/Miniconda3-latest"
22-
if [[ "$(uname -m)" == 'aarch64' ]]; then
23-
CONDA_URL="https://github.com/conda-forge/miniforge/releases/download/4.10.1-4/Miniforge3-4.10.1-4-Linux-aarch64.sh"
24-
elif [[ "$(uname)" == 'Linux' ]]; then
25-
if [[ "$BITS32" == "yes" ]]; then
26-
CONDA_URL="$DEFAULT_CONDA_URL-Linux-x86.sh"
27-
else
28-
CONDA_URL="$DEFAULT_CONDA_URL-Linux-x86_64.sh"
29-
fi
30-
elif [[ "$(uname)" == 'Darwin' ]]; then
31-
CONDA_URL="$DEFAULT_CONDA_URL-MacOSX-x86_64.sh"
32-
else
33-
echo "OS $(uname) not supported"
34-
exit 1
35-
fi
36-
echo "Downloading $CONDA_URL"
37-
wget -q $CONDA_URL -O miniconda.sh
38-
chmod +x miniconda.sh
39-
40-
MINICONDA_DIR="$HOME/miniconda3"
41-
rm -rf $MINICONDA_DIR
42-
./miniconda.sh -b -p $MINICONDA_DIR
43-
fi
44-
export PATH=$MINICONDA_DIR/bin:$PATH
13+
export PATH=$MAMBA_DIR/bin:$PATH
4514

4615
echo
4716
echo "which conda"
@@ -51,7 +20,7 @@ echo
5120
echo "update conda"
5221
conda config --set ssl_verify false
5322
conda config --set quiet true --set always_yes true --set changeps1 false
54-
conda install -y -c conda-forge -n base 'mamba>=0.21.2' pip setuptools
23+
mamba install -y -c conda-forge -n base pip setuptools
5524

5625
echo "conda info -a"
5726
conda info -a
@@ -70,11 +39,6 @@ time mamba env update -n pandas-dev --file="${ENV_FILE}"
7039
echo "conda list -n pandas-dev"
7140
conda list -n pandas-dev
7241

73-
if [[ "$BITS32" == "yes" ]]; then
74-
# activate 32-bit compiler
75-
export CONDA_BUILD=1
76-
fi
77-
7842
echo "activate pandas-dev"
7943
source activate pandas-dev
8044

@@ -90,15 +54,9 @@ if pip list | grep -q ^pandas; then
9054
pip uninstall -y pandas || true
9155
fi
9256

93-
if [ "$(conda list -f qt --json)" != [] ]; then
94-
echo
95-
echo "remove qt"
96-
echo "causes problems with the clipboard, we use xsel for that"
97-
conda remove qt -y --force || true
98-
fi
99-
10057
echo "Build extensions"
101-
python setup.py build_ext -q -j3
58+
# GH 47305: Parallel build can causes flaky ImportError from pandas/_libs/tslibs
59+
python setup.py build_ext -q -j1
10260

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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ on:
44
push:
55
branches:
66
- main
7+
- 1.5.x
78
- 1.4.x
89
pull_request:
910
branches:
1011
- main
12+
- 1.5.x
1113
- 1.4.x
1214
paths-ignore:
1315
- "doc/**"

.github/workflows/code-checks.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ on:
44
push:
55
branches:
66
- main
7+
- 1.5.x
78
- 1.4.x
89
pull_request:
910
branches:
1011
- main
12+
- 1.5.x
1113
- 1.4.x
1214

1315
env:
@@ -151,6 +153,9 @@ jobs:
151153
- name: Build image
152154
run: docker build --pull --no-cache --tag pandas-dev-env .
153155

156+
- name: Show environment
157+
run: docker run -w /home/pandas pandas-dev-env mamba run -n pandas-dev python -c "import pandas as pd; print(pd.show_versions())"
158+
154159
requirements-dev-text-installable:
155160
name: Test install requirements-dev.txt
156161
runs-on: ubuntu-latest

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ on:
44
push:
55
branches:
66
- main
7+
- 1.5.x
78
- 1.4.x
9+
tags:
10+
- '*'
811
pull_request:
912
branches:
1013
- main
14+
- 1.5.x
1115
- 1.4.x
1216

1317
env:
@@ -49,6 +53,9 @@ jobs:
4953
- name: Build documentation
5054
run: doc/make.py --warnings-are-errors
5155

56+
- name: Build documentation zip
57+
run: doc/make.py zip_html
58+
5259
- name: Build the interactive terminal
5360
run: |
5461
cd web/interactive_terminal
@@ -60,7 +67,7 @@ jobs:
6067
echo "${{ secrets.server_ssh_key }}" > ~/.ssh/id_rsa
6168
chmod 600 ~/.ssh/id_rsa
6269
echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE1Kkopomm7FHG5enATf7SgnpICZ4W2bw+Ho+afqin+w7sMcrsa0je7sbztFAV8YchDkiBKnWTG4cRT+KZgZCaY=" > ~/.ssh/known_hosts
63-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
70+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))
6471

6572
- name: Copy cheatsheets into site directory
6673
run: cp doc/cheatsheet/Pandas_Cheat_Sheet* web/build/
@@ -73,6 +80,10 @@ jobs:
7380
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
7481
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
7582

83+
- name: Upload prod docs
84+
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/version/${GITHUB_REF_NAME:1}
85+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
86+
7687
- name: Move docs into site directory
7788
run: mv doc/build/html web/build/docs
7889

.github/workflows/macos-windows.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ on:
44
push:
55
branches:
66
- main
7+
- 1.5.x
78
- 1.4.x
89
pull_request:
910
branches:
1011
- main
12+
- 1.5.x
1113
- 1.4.x
1214
paths-ignore:
1315
- "doc/**"
@@ -26,7 +28,7 @@ jobs:
2628
defaults:
2729
run:
2830
shell: bash -el {0}
29-
timeout-minutes: 120
31+
timeout-minutes: 180
3032
strategy:
3133
matrix:
3234
os: [macos-latest, windows-latest]

.github/workflows/python-dev.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ on:
2424
push:
2525
branches:
2626
- main
27+
- 1.5.x
2728
- 1.4.x
2829
pull_request:
2930
branches:
3031
- main
32+
- 1.5.x
3133
- 1.4.x
3234
paths-ignore:
3335
- "doc/**"
@@ -78,9 +80,10 @@ jobs:
7880
python -m pip install python-dateutil pytz cython hypothesis==6.52.1 pytest>=6.2.5 pytest-xdist pytest-cov pytest-asyncio>=0.17
7981
python -m pip list
8082
83+
# GH 47305: Parallel build can cause flaky ImportError from pandas/_libs/tslibs
8184
- name: Build Pandas
8285
run: |
83-
python setup.py build_ext -q -j2
86+
python setup.py build_ext -q -j1
8487
python -m pip install -e . --no-build-isolation --no-use-pep517
8588
8689
- name: Build Version

.github/workflows/scorecards.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Scorecards supply-chain security
2+
on:
3+
# Only the default branch is supported.
4+
branch_protection_rule:
5+
schedule:
6+
- cron: '27 19 * * 4'
7+
push:
8+
branches: [ "main" ]
9+
10+
# Declare default permissions as read only.
11+
permissions: read-all
12+
13+
jobs:
14+
analysis:
15+
name: Scorecards analysis
16+
runs-on: ubuntu-latest
17+
permissions:
18+
# Needed to upload the results to code-scanning dashboard.
19+
security-events: write
20+
# Used to receive a badge.
21+
id-token: write
22+
23+
if: github.repository == 'pandas-dev/pandas' # don't run on forks
24+
25+
steps:
26+
- name: "Checkout code"
27+
uses: actions/checkout@v3
28+
with:
29+
persist-credentials: false
30+
31+
- name: "Run analysis"
32+
uses: ossf/[email protected]
33+
with:
34+
results_file: results.sarif
35+
results_format: sarif
36+
37+
# Publish the results for public repositories to enable scorecard badges. For more details, see
38+
# https://github.com/ossf/scorecard-action#publishing-results.
39+
publish_results: true
40+
41+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
42+
# format to the repository Actions tab.
43+
- name: "Upload artifact"
44+
uses: actions/upload-artifact@v3
45+
with:
46+
name: SARIF file
47+
path: results.sarif
48+
retention-days: 5
49+
50+
# Upload the results to GitHub's code scanning dashboard.
51+
- name: "Upload to code-scanning"
52+
uses: github/codeql-action/upload-sarif@v1
53+
with:
54+
sarif_file: results.sarif

.github/workflows/sdist.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ on:
44
push:
55
branches:
66
- main
7+
- 1.5.x
78
- 1.4.x
89
pull_request:
910
branches:
1011
- main
12+
- 1.5.x
1113
- 1.4.x
1214
types: [labeled, opened, synchronize, reopened]
1315
paths-ignore:

.github/workflows/ubuntu.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ on:
44
push:
55
branches:
66
- main
7+
- 1.5.x
78
- 1.4.x
89
pull_request:
910
branches:
1011
- main
12+
- 1.5.x
1113
- 1.4.x
1214
paths-ignore:
1315
- "doc/**"
@@ -24,7 +26,7 @@ jobs:
2426
defaults:
2527
run:
2628
shell: bash -el {0}
27-
timeout-minutes: 120
29+
timeout-minutes: 180
2830
strategy:
2931
matrix:
3032
env_file: [actions-38.yaml, actions-39.yaml, actions-310.yaml]
@@ -40,18 +42,26 @@ jobs:
4042
- name: "Minimum Versions"
4143
env_file: actions-38-minimum_versions.yaml
4244
pattern: "not slow and not network and not single_cpu"
43-
- name: "Locale: it_IT.utf8"
45+
- name: "Locale: it_IT"
4446
env_file: actions-38.yaml
4547
pattern: "not slow and not network and not single_cpu"
4648
extra_apt: "language-pack-it"
49+
# Use the utf8 version as the default, it has no bad side-effect.
4750
lang: "it_IT.utf8"
4851
lc_all: "it_IT.utf8"
49-
- name: "Locale: zh_CN.utf8"
52+
# Also install it_IT (its encoding is ISO8859-1) but do not activate it.
53+
# It will be temporarily activated during tests with locale.setlocale
54+
extra_loc: "it_IT"
55+
- name: "Locale: zh_CN"
5056
env_file: actions-38.yaml
5157
pattern: "not slow and not network and not single_cpu"
5258
extra_apt: "language-pack-zh-hans"
59+
# Use the utf8 version as the default, it has no bad side-effect.
5360
lang: "zh_CN.utf8"
5461
lc_all: "zh_CN.utf8"
62+
# Also install zh_CN (its encoding is gb2312) but do not activate it.
63+
# It will be temporarily activated during tests with locale.setlocale
64+
extra_loc: "zh_CN"
5565
- name: "Copy-on-Write"
5666
env_file: actions-310.yaml
5767
pattern: "not slow and not network and not single_cpu"
@@ -146,6 +156,12 @@ jobs:
146156
# xsel for clipboard tests
147157
run: sudo apt-get update && sudo apt-get install -y xsel ${{ env.EXTRA_APT }}
148158

159+
- name: Generate extra locales
160+
# These extra locales will be available for locale.setlocale() calls in tests
161+
run: |
162+
sudo locale-gen ${{ matrix.extra_loc }}
163+
if: ${{ matrix.extra_loc }}
164+
149165
- name: Set up Conda
150166
uses: ./.github/actions/setup-conda
151167
with:

0 commit comments

Comments
 (0)