This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new feb128e69c GH-36541: [Python][CI] Ensure the "Without pandas" CI build 
has no pandas installed (don't install doc requirements in conda-python image) 
(#36542)
feb128e69c is described below

commit feb128e69cfff2e21b643cf860c915838047d036
Author: Joris Van den Bossche <[email protected]>
AuthorDate: Sat Jul 8 23:17:50 2023 +0200

    GH-36541: [Python][CI] Ensure the "Without pandas" CI build has no pandas 
installed (don't install doc requirements in conda-python image) (#36542)
    
    ### Rationale for this change
    
    The "Without Pandas" CI build is actually having pandas installed and thus 
not testing the case of an environment without pandas.
    
    * Closes: #36541
    
    Authored-by: Joris Van den Bossche <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 ci/docker/conda-python-pandas.dockerfile    | 7 +++++++
 ci/docker/conda-python.dockerfile           | 2 --
 python/pyarrow/tests/test_dataset.py        | 2 ++
 python/pyarrow/tests/test_extension_type.py | 3 ++-
 4 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/ci/docker/conda-python-pandas.dockerfile 
b/ci/docker/conda-python-pandas.dockerfile
index 0c476881ab..83ad52a13d 100644
--- a/ci/docker/conda-python-pandas.dockerfile
+++ b/ci/docker/conda-python-pandas.dockerfile
@@ -22,6 +22,13 @@ FROM ${repo}:${arch}-conda-python-${python}
 
 ARG pandas=latest
 ARG numpy=latest
+
+# the doc builds are using the conda-python-pandas image,
+# so ensure to install doc requirements
+COPY ci/conda_env_sphinx.txt /arrow/ci/
+RUN mamba install -q -y --file arrow/ci/conda_env_sphinx.txt && \
+    mamba clean --all
+
 COPY ci/scripts/install_pandas.sh /arrow/ci/scripts/
 RUN mamba uninstall -q -y numpy && \
     /arrow/ci/scripts/install_pandas.sh ${pandas} ${numpy}
diff --git a/ci/docker/conda-python.dockerfile 
b/ci/docker/conda-python.dockerfile
index ba50d26730..21e57228f4 100644
--- a/ci/docker/conda-python.dockerfile
+++ b/ci/docker/conda-python.dockerfile
@@ -22,11 +22,9 @@ FROM ${repo}:${arch}-conda-cpp
 # install python specific packages
 ARG python=3.8
 COPY ci/conda_env_python.txt \
-     ci/conda_env_sphinx.txt \
      /arrow/ci/
 RUN mamba install -q -y \
         --file arrow/ci/conda_env_python.txt \
-        --file arrow/ci/conda_env_sphinx.txt \
         gdb \
         python=${python} \
         nomkl && \
diff --git a/python/pyarrow/tests/test_dataset.py 
b/python/pyarrow/tests/test_dataset.py
index e8026a2af6..814454861e 100644
--- a/python/pyarrow/tests/test_dataset.py
+++ b/python/pyarrow/tests/test_dataset.py
@@ -3251,6 +3251,7 @@ def test_json_format(tempdir, dataset_reader):
     assert result.equals(table)
 
 
[email protected]
 def test_json_format_options(tempdir, dataset_reader):
     table = pa.table({'a': pa.array([1, 2, 3], type="int64"),
                       'b': pa.array([.1, .2, .3], type="float64")})
@@ -3271,6 +3272,7 @@ def test_json_format_options(tempdir, dataset_reader):
     assert result.equals(table)
 
 
[email protected]
 def test_json_fragment_options(tempdir, dataset_reader):
     table = pa.table({'a': pa.array([1, 2, 3], type="int64"),
                       'b': pa.array([.1, .2, .3], type="float64")})
diff --git a/python/pyarrow/tests/test_extension_type.py 
b/python/pyarrow/tests/test_extension_type.py
index 152b64a028..009896fd67 100644
--- a/python/pyarrow/tests/test_extension_type.py
+++ b/python/pyarrow/tests/test_extension_type.py
@@ -1096,7 +1096,8 @@ def test_empty_take():
     ([1, 2, 3], IntegerType),
     (["cat", "dog", "horse"], LabelType)
 ))
[email protected]("into", ("to_numpy", "to_pandas"))
[email protected](
+    "into", ["to_numpy", pytest.param("to_pandas", marks=pytest.mark.pandas)])
 def test_extension_array_to_numpy_pandas(data, ty, into):
     storage = pa.array(data)
     ext_arr = pa.ExtensionArray.from_storage(ty(), storage)

Reply via email to