Skip to content

Commit f0c47b2

Browse files
committed
Merge branch 'main' into add-recommended-dependencies-as-extras_require-in-setup.cfg
2 parents dc64923 + 00b5cc5 commit f0c47b2

File tree

375 files changed

+8024
-3077
lines changed

Some content is hidden

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

375 files changed

+8024
-3077
lines changed

.circleci/setup_env.sh

+12-54
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/scorecards.yml

+54
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/ubuntu.yml

+16-2
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,26 @@ jobs:
4242
- name: "Minimum Versions"
4343
env_file: actions-38-minimum_versions.yaml
4444
pattern: "not slow and not network and not single_cpu"
45-
- name: "Locale: it_IT.utf8"
45+
- name: "Locale: it_IT"
4646
env_file: actions-38.yaml
4747
pattern: "not slow and not network and not single_cpu"
4848
extra_apt: "language-pack-it"
49+
# Use the utf8 version as the default, it has no bad side-effect.
4950
lang: "it_IT.utf8"
5051
lc_all: "it_IT.utf8"
51-
- 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"
5256
env_file: actions-38.yaml
5357
pattern: "not slow and not network and not single_cpu"
5458
extra_apt: "language-pack-zh-hans"
59+
# Use the utf8 version as the default, it has no bad side-effect.
5560
lang: "zh_CN.utf8"
5661
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"
5765
- name: "Copy-on-Write"
5866
env_file: actions-310.yaml
5967
pattern: "not slow and not network and not single_cpu"
@@ -148,6 +156,12 @@ jobs:
148156
# xsel for clipboard tests
149157
run: sudo apt-get update && sudo apt-get install -y xsel ${{ env.EXTRA_APT }}
150158

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+
151165
- name: Set up Conda
152166
uses: ./.github/actions/setup-conda
153167
with:

0 commit comments

Comments
 (0)