Skip to content

Commit

Permalink
Merge branch 'main' into index-is_unique-slice
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke authored Aug 5, 2024
2 parents 8a2fd84 + 7a5bfc4 commit dc2ce58
Show file tree
Hide file tree
Showing 659 changed files with 10,371 additions and 6,869 deletions.
99 changes: 56 additions & 43 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,66 @@
version: 2.1

jobs:
test-arm:
test-linux-arm:
machine:
image: default
resource_class: arm.large
environment:
ENV_FILE: ci/deps/circle-310-arm64.yaml
ENV_FILE: ci/deps/circle-311-arm64.yaml
PYTEST_WORKERS: auto
PATTERN: "not single_cpu and not slow and not network and not clipboard and not arm_slow and not db"
PYTEST_TARGET: "pandas"
PANDAS_CI: "1"
steps:
- checkout
- run: .circleci/setup_env.sh
- run: >
PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH
LD_PRELOAD=$HOME/miniconda3/envs/pandas-dev/lib/libgomp.so.1:$LD_PRELOAD
ci/run_tests.sh
linux-musl:
- run:
name: Install Environment and Run Tests
shell: /bin/bash -exo pipefail
# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions-azure-pipelines-travis-ci-and-gitlab-ci-cd
command: |
MINI_URL="https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Miniforge3-24.3.0-0-Linux-aarch64.sh"
wget -q $MINI_URL -O Miniforge3.sh
chmod +x Miniforge3.sh
MINI_DIR="$HOME/miniconda3"
rm -rf $MINI_DIR
./Miniforge3.sh -b -p $MINI_DIR
export PATH=$MINI_DIR/bin:$PATH
conda info -a
conda env create -q -n pandas-dev -f $ENV_FILE
conda list -n pandas-dev
source activate pandas-dev
if pip show pandas 1>/dev/null; then
pip uninstall -y pandas
fi
python -m pip install --no-build-isolation -ve . --config-settings=setup-args="--werror"
PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH
sudo apt-get update && sudo apt-get install -y libegl1 libopengl0
ci/run_tests.sh
test-linux-musl:
docker:
- image: quay.io/pypa/musllinux_1_1_aarch64
resource_class: arm.large
steps:
# Install pkgs first to have git in the image
# (needed for checkout)
- run: |
apk update
apk add git
apk add musl-locales
- run:
name: Install System Packages
command: |
apk update
apk add git
apk add musl-locales
- checkout
- run: |
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
. ~/virtualenvs/pandas-dev/bin/activate
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
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
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
python -m pip list --no-cache-dir
- run: |
. ~/virtualenvs/pandas-dev/bin/activate
export PANDAS_CI=1
python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml
- run:
name: Install Environment and Run Tests
command: |
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
. ~/virtualenvs/pandas-dev/bin/activate
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytz pytest>=7.3.2 pytest-xdist>=3.4.0 hypothesis>=6.84.0
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
python -m pip list --no-cache-dir
export PANDAS_CI=1
python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml
build-aarch64:
parameters:
cibw-build:
Expand Down Expand Up @@ -71,29 +91,24 @@ jobs:
name: Build aarch64 wheels
no_output_timeout: 30m # Sometimes the tests won't generate any output, make sure the job doesn't get killed by that
command: |
pip3 install cibuildwheel==2.15.0
pip3 install cibuildwheel==2.18.1
cibuildwheel --prerelease-pythons --output-dir wheelhouse
environment:
CIBW_BUILD: << parameters.cibw-build >>

- run:
name: Install Anaconda Client & Upload Wheels
shell: /bin/bash -exo pipefail
command: |
echo "Install Mambaforge"
MAMBA_URL="https://github.com/conda-forge/miniforge/releases/download/23.1.0-0/Mambaforge-23.1.0-0-Linux-aarch64.sh"
echo "Downloading $MAMBA_URL"
wget -q $MAMBA_URL -O minimamba.sh
chmod +x minimamba.sh
MAMBA_DIR="$HOME/miniconda3"
rm -rf $MAMBA_DIR
./minimamba.sh -b -p $MAMBA_DIR
export PATH=$MAMBA_DIR/bin:$PATH
mamba install -y -c conda-forge anaconda-client
MINI_URL="https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Miniforge3-24.3.0-0-Linux-aarch64.sh"
wget -q $MINI_URL -O Miniforge3.sh
chmod +x Miniforge3.sh
MINI_DIR="$HOME/miniconda3"
rm -rf $MINI_DIR
./Miniforge3.sh -b -p $MINI_DIR
export PATH=$MINI_DIR/bin:$PATH
conda install -y -c conda-forge anaconda-client
source ci/upload_wheels.sh
set_upload_vars
upload_wheels
Expand All @@ -107,14 +122,14 @@ workflows:
not:
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
jobs:
- test-arm
- test-linux-arm
test-musl:
# Don't run trigger this one when scheduled pipeline runs
when:
not:
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
jobs:
- linux-musl
- test-linux-musl
build-wheels:
jobs:
- build-aarch64:
Expand All @@ -123,11 +138,9 @@ workflows:
only: /^v.*/
matrix:
parameters:
cibw-build: ["cp39-manylinux_aarch64",
"cp310-manylinux_aarch64",
cibw-build: ["cp310-manylinux_aarch64",
"cp311-manylinux_aarch64",
"cp312-manylinux_aarch64",
"cp39-musllinux_aarch64",
"cp310-musllinux_aarch64",
"cp311-musllinux_aarch64",
"cp312-musllinux_aarch64",]
60 changes: 0 additions & 60 deletions .circleci/setup_env.sh

This file was deleted.

6 changes: 5 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ci export-ignore
doc export-ignore
gitpod export-ignore
MANIFEST.in export-ignore
scripts export-ignore
scripts/** export-ignore
typings export-ignore
web export-ignore
CITATION.cff export-ignore
Expand All @@ -82,3 +82,7 @@ setup.py export-ignore
# csv_dir_path fixture checks the existence of the directory
# exclude the whole directory to avoid running related tests in sdist
pandas/tests/io/parser/data export-ignore

# Include cibw script in sdist since it's needed for building wheels
scripts/cibw_before_build.sh -export-ignore
scripts/cibw_before_test.sh -export-ignore
11 changes: 2 additions & 9 deletions .github/actions/build_pandas/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ inputs:
editable:
description: Whether to build pandas in editable mode (default true)
default: true
meson_args:
description: Extra flags to pass to meson
required: false
cflags_adds:
description: Items to append to the CFLAGS variable
required: false
runs:
using: composite
steps:
Expand All @@ -30,12 +24,11 @@ runs:

- name: Build Pandas
run: |
export CFLAGS="$CFLAGS ${{ inputs.cflags_adds }}"
if [[ ${{ inputs.editable }} == "true" ]]; then
pip install -e . --no-build-isolation -v --no-deps ${{ inputs.meson_args }} \
pip install -e . --no-build-isolation -v --no-deps \
--config-settings=setup-args="--werror"
else
pip install . --no-build-isolation -v --no-deps ${{ inputs.meson_args }} \
pip install . --no-build-isolation -v --no-deps \
--config-settings=setup-args="--werror"
fi
shell: bash -el {0}
4 changes: 2 additions & 2 deletions .github/actions/run-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ runs:
shell: bash -el {0}

- name: Publish test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Test results
path: test-data.xml
if: failure()

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
flags: unittests
name: codecov-pandas
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ jobs:
# TODO: The doctests have to be run first right now, since the Cython doctests only work
# with pandas installed in non-editable mode
# This can be removed once pytest-cython doesn't require C extensions to be installed inplace

- name: Extra installs
# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions-azure-pipelines-travis-ci-and-gitlab-ci-cd
run: sudo apt-get update && sudo apt-get install -y libegl1 libopengl0

- name: Run doctests
run: cd ci && ./code_checks.sh doctests
if: ${{ steps.build.outcome == 'success' && always() }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docbuild-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ jobs:
- name: Build Pandas
uses: ./.github/actions/build_pandas

- name: Extra installs
# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions-azure-pipelines-travis-ci-and-gitlab-ci-cd
run: sudo apt-get update && sudo apt-get install -y libegl1 libopengl0

- name: Test website
run: python -m pytest web/

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.10', '3.11']
fail-fast: false
name: Test Conda Forge Recipe - Python ${{ matrix.python-version }}
concurrency:
Expand Down
Loading

0 comments on commit dc2ce58

Please sign in to comment.