Skip to content

Apache DataFusion SQL Query Engine

ARROW-10845: [Python][CI] Build with nightly numpy and pandas artifacts

Krisztián Szűcs28847005291b
diff --git a/.env b/.env
index 603f3ca017..2c23b0d16e 100644
--- a/.env
+++ b/.env
@@ -33,6 +33,7 @@ GO=1.12
NODE=14
MAVEN=3.5.4
JDK=8
+NUMPY=latest
PANDAS=latest
DASK=latest
TURBODBC=latest
diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
index 02829ebb39..2727d15d42 100644
--- a/.github/workflows/python.yml
+++ b/.github/workflows/python.yml
@@ -77,6 +77,7 @@ jobs:
PYTHON: ${{ matrix.python || 3.7 }}
UBUNTU: ${{ matrix.ubuntu || 18.04 }}
PANDAS: ${{ matrix.pandas || 'latest' }}
+ NUMPY: ${{ matrix.numpy || 'latest' }}
steps:
- name: Checkout Arrow
uses: actions/checkout@v2
diff --git a/ci/docker/conda-python-pandas.dockerfile b/ci/docker/conda-python-pandas.dockerfile
index 66918a6b07..303cc80e48 100644
--- a/ci/docker/conda-python-pandas.dockerfile
+++ b/ci/docker/conda-python-pandas.dockerfile
@@ -21,5 +21,7 @@ ARG python=3.6
FROM ${repo}:${arch}-conda-python-${python}
ARG pandas=latest
+ARG numpy=latest
COPY ci/scripts/install_pandas.sh /arrow/ci/scripts/
-RUN /arrow/ci/scripts/install_pandas.sh ${pandas}
+RUN conda uninstall -q -y numpy && \
+ /arrow/ci/scripts/install_pandas.sh ${pandas} ${numpy}
diff --git a/ci/scripts/install_pandas.sh b/ci/scripts/install_pandas.sh
index aa0b94c46b..5aca65f825 100755
--- a/ci/scripts/install_pandas.sh
+++ b/ci/scripts/install_pandas.sh
@@ -19,20 +19,28 @@
set -e
-if [ "$#" -ne 1 ]; then
- echo "Usage: $0 <pandas version>"
+if [ "$#" -lt 1 ]; then
+ echo "Usage: $0 <pandas version> <optional numpy version = latest>"
exit 1
fi
pandas=$1
+numpy=${2:-"latest"}
+
+if [ "${numpy}" = "nightly" ]; then
+ pip install --extra-index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple --pre numpy
+elif [ "${numpy}" = "latest" ]; then
+ pip install numpy
+else
+ pip install numpy==${numpy}
+fi
if [ "${pandas}" = "master" ]; then
- conda install -q numpy
pip install git+https://github.com/pandas-dev/pandas.git --no-build-isolation
+elif [ "${pandas}" = "nightly" ]; then
+ pip install --extra-index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple --pre pandas
elif [ "${pandas}" = "latest" ]; then
- conda install -q pandas
+ pip install pandas
else
- conda install -q pandas=${pandas}
+ pip install pandas==${pandas}
fi
-
-conda clean --all
diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
index 0c80ea0d71..ef02189147 100644
--- a/dev/tasks/tasks.yml
+++ b/dev/tasks/tasks.yml
@@ -1759,6 +1759,16 @@ tasks:
# use the latest pandas release, so prevent reusing any cached layers
run: --no-leaf-cache conda-python-pandas
+ test-conda-python-3.8-pandas-nightly:
+ ci: github
+ template: docker-tests/github.linux.yml
+ params:
+ env:
+ PYTHON: 3.8
+ PANDAS: nightly
+ NUMPY: nightly
+ run: --no-leaf-cache conda-python-pandas
+
test-conda-python-3.7-pandas-master:
ci: github
template: docker-tests/github.linux.yml
diff --git a/docker-compose.yml b/docker-compose.yml
index bf5c06cfab..f194d2d63c 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -633,6 +633,7 @@ services:
repo: ${REPO}
arch: ${ARCH}
python: ${PYTHON}
+ numpy: ${NUMPY}
pandas: ${PANDAS}
shm_size: *shm-size
environment: