Skip to content

Commit dbd4580

Browse files
authored
Merge branch 'main' into read_html-extract-hrefs
2 parents ffdcf8a + 22cb379 commit dbd4580

File tree

900 files changed

+34522
-16156
lines changed

Some content is hidden

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

900 files changed

+34522
-16156
lines changed

.circleci/config.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ jobs:
88
environment:
99
ENV_FILE: ci/deps/circle-38-arm64.yaml
1010
PYTEST_WORKERS: auto
11-
PATTERN: "not slow and not network and not clipboard and not arm_slow"
11+
PATTERN: "not single_cpu and not slow and not network and not clipboard and not arm_slow and not db"
1212
PYTEST_TARGET: "pandas"
13+
PANDAS_CI: "1"
1314
steps:
1415
- checkout
15-
- run: ci/setup_env.sh
16+
- run: .circleci/setup_env.sh
1617
- run: PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH ci/run_tests.sh
1718

1819
workflows:

.circleci/setup_env.sh

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
#!/bin/bash -e
2+
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
14+
15+
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
45+
46+
echo
47+
echo "which conda"
48+
which conda
49+
50+
echo
51+
echo "update conda"
52+
conda config --set ssl_verify false
53+
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
55+
56+
echo "conda info -a"
57+
conda info -a
58+
59+
echo "conda list (root environment)"
60+
conda list
61+
62+
echo
63+
# Clean up any left-over from a previous build
64+
mamba env remove -n pandas-dev
65+
echo "mamba env update --file=${ENV_FILE}"
66+
# See https://github.com/mamba-org/mamba/issues/633
67+
mamba create -q -n pandas-dev
68+
time mamba env update -n pandas-dev --file="${ENV_FILE}"
69+
70+
echo "conda list -n pandas-dev"
71+
conda list -n pandas-dev
72+
73+
if [[ "$BITS32" == "yes" ]]; then
74+
# activate 32-bit compiler
75+
export CONDA_BUILD=1
76+
fi
77+
78+
echo "activate pandas-dev"
79+
source activate pandas-dev
80+
81+
# Explicitly set an environment variable indicating that this is pandas' CI environment.
82+
#
83+
# This allows us to enable things like -Werror that shouldn't be activated in
84+
# downstream CI jobs that may also build pandas from source.
85+
export PANDAS_CI=1
86+
87+
if pip list | grep -q ^pandas; then
88+
echo
89+
echo "remove any installed pandas package w/o removing anything else"
90+
pip uninstall -y pandas || true
91+
fi
92+
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+
100+
echo "Build extensions"
101+
python setup.py build_ext -q -j3
102+
103+
echo "Install pandas"
104+
python -m pip install --no-build-isolation --no-use-pep517 -e .
105+
106+
echo "done"

.github/PULL_REQUEST_TEMPLATE.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
- [ ] closes #xxxx (Replace xxxx with the Github issue number)
22
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
33
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
4+
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
45
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

.github/actions/build_pandas/action.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ runs:
88
run: |
99
conda info
1010
conda list
11-
shell: bash -l {0}
11+
shell: bash -el {0}
1212

1313
- name: Build Pandas
1414
run: |
15-
python setup.py build_ext -j 2
15+
python setup.py build_ext -j $N_JOBS
1616
python -m pip install -e . --no-build-isolation --no-use-pep517 --no-index
17-
shell: bash -l {0}
17+
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

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Run tests and report results
2+
runs:
3+
using: composite
4+
steps:
5+
- name: Test
6+
run: ci/run_tests.sh
7+
shell: bash -el {0}
8+
9+
- name: Publish test results
10+
uses: actions/upload-artifact@v2
11+
with:
12+
name: Test results
13+
path: test-data.xml
14+
if: failure()
15+
16+
- name: Report Coverage
17+
run: coverage report -m
18+
shell: bash -el {0}
19+
if: failure()
20+
21+
- name: Upload coverage to Codecov
22+
uses: codecov/codecov-action@v2
23+
with:
24+
flags: unittests
25+
name: codecov-pandas
26+
fail_ci_if_error: false
27+
if: failure()
+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Set up Conda environment
2+
inputs:
3+
environment-file:
4+
description: Conda environment file to use.
5+
default: environment.yml
6+
environment-name:
7+
description: Name to use for the Conda environment
8+
default: test
9+
python-version:
10+
description: Python version to install
11+
required: false
12+
pyarrow-version:
13+
description: If set, overrides the PyArrow version in the Conda environment to the given string.
14+
required: false
15+
runs:
16+
using: composite
17+
steps:
18+
- name: Set Arrow version in ${{ inputs.environment-file }} to ${{ inputs.pyarrow-version }}
19+
run: |
20+
grep -q ' - pyarrow' ${{ inputs.environment-file }}
21+
sed -i"" -e "s/ - pyarrow/ - pyarrow=${{ inputs.pyarrow-version }}/" ${{ inputs.environment-file }}
22+
cat ${{ inputs.environment-file }}
23+
shell: bash
24+
if: ${{ inputs.pyarrow-version }}
25+
26+
- name: Install ${{ inputs.environment-file }}
27+
uses: conda-incubator/[email protected]
28+
with:
29+
environment-file: ${{ inputs.environment-file }}
30+
activate-environment: ${{ inputs.environment-name }}
31+
python-version: ${{ inputs.python-version }}
32+
channel-priority: ${{ runner.os == 'macOS' && 'flexible' || 'strict' }}
33+
channels: conda-forge
34+
mamba-version: "0.24"
35+
use-mamba: true
36+
use-only-tar-bz2: true
37+
condarc-file: ci/condarc.yml

.github/actions/setup/action.yml

-12
This file was deleted.

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

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: 32 Bit Linux
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 1.4.x
8+
pull_request:
9+
branches:
10+
- main
11+
- 1.4.x
12+
paths-ignore:
13+
- "doc/**"
14+
15+
jobs:
16+
pytest:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Run 32-bit manylinux2014 Docker Build / Tests
25+
run: |
26+
# Without this (line 34), versioneer will not be able to determine the pandas version.
27+
# This is because of a security update to git that blocks it from reading the config folder if
28+
# it is not owned by the current user. We hit this since the "mounted" folder is not hit by the
29+
# Docker container.
30+
# xref https://github.com/pypa/manylinux/issues/1309
31+
docker pull quay.io/pypa/manylinux2014_i686
32+
docker run --platform linux/386 -v $(pwd):/pandas quay.io/pypa/manylinux2014_i686 \
33+
/bin/bash -xc "cd pandas && \
34+
git config --global --add safe.directory /pandas && \
35+
/opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \
36+
. ~/virtualenvs/pandas-dev/bin/activate && \
37+
python -m pip install --no-deps -U pip wheel 'setuptools<60.0.0' && \
38+
pip install cython numpy python-dateutil pytz pytest pytest-xdist pytest-asyncio>=0.17 hypothesis && \
39+
python setup.py build_ext -q -j2 && \
40+
python -m pip install --no-build-isolation --no-use-pep517 -e . && \
41+
export PANDAS_CI=1 && \
42+
pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml"
43+
44+
- name: Publish test results for Python 3.8-32 bit full Linux
45+
uses: actions/upload-artifact@v3
46+
with:
47+
name: Test results
48+
path: test-data.xml
49+
if: failure()

.github/workflows/asv-bot.yml

+6-10
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
defaults:
1919
run:
20-
shell: bash -l {0}
20+
shell: bash -el {0}
2121

2222
concurrency:
2323
# Set concurrency to prevent abuse(full runs are ~5.5 hours !!!)
@@ -29,24 +29,20 @@ jobs:
2929

3030
steps:
3131
- name: Checkout
32-
uses: actions/checkout@v2
32+
uses: actions/checkout@v3
3333
with:
3434
fetch-depth: 0
3535

3636
- name: Cache conda
37-
uses: actions/cache@v2
37+
uses: actions/cache@v3
3838
with:
3939
path: ~/conda_pkgs_dir
4040
key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}
4141

4242
# Although asv sets up its own env, deps are still needed
4343
# during discovery process
44-
- uses: conda-incubator/setup-miniconda@v2
45-
with:
46-
activate-environment: pandas-dev
47-
channel-priority: strict
48-
environment-file: ${{ env.ENV_FILE }}
49-
use-only-tar-bz2: true
44+
- name: Set up Conda
45+
uses: ./.github/actions/setup-conda
5046

5147
- name: Run benchmarks
5248
id: bench
@@ -65,7 +61,7 @@ jobs:
6561
echo 'EOF' >> $GITHUB_ENV
6662
echo "REGEX=$REGEX" >> $GITHUB_ENV
6763
68-
- uses: actions/github-script@v5
64+
- uses: actions/github-script@v6
6965
env:
7066
BENCH_OUTPUT: ${{env.BENCH_OUTPUT}}
7167
REGEX: ${{env.REGEX}}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Set up Python
15-
uses: actions/setup-python@v2
15+
uses: actions/setup-python@v3
1616
- name: Cache multiple paths
17-
uses: actions/cache@v2
17+
uses: actions/cache@v3
1818
with:
1919
path: |
2020
~/.cache/pre-commit

0 commit comments

Comments
 (0)