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

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


The following commit(s) were added to refs/heads/master by this push:
     new 50bc9f4  ARROW-4640: [Python] Add docker-compose configuration to 
build and test the project without pandas installed
50bc9f4 is described below

commit 50bc9f49671afb56594910f49b9bf34e080a70e7
Author: Krisztián Szűcs <szucs.kriszt...@gmail.com>
AuthorDate: Tue Mar 19 21:31:28 2019 +0100

    ARROW-4640: [Python] Add docker-compose configuration to build and test the 
project without pandas installed
    
    ```bash
    make -f Makefile.docker python-nopandas
    make -f Makefile.docker run python-nopandas
    ```
    
    OR
    
    ```bash
    $ docker-compose build cpp
    $ docker-compose build python
    $ docker-compose build python-nopandas
    $ docker-compose run --rm python-nopandas
    ```
    
    The tests will fail until [ARROW-4794: [Python] Make pandas an optional 
test dependency](https://issues.apache.org/jira/browse/ARROW-4794) is 
implemented.
    
    Author: Krisztián Szűcs <szucs.kriszt...@gmail.com>
    
    Closes #3833 from kszucs/ARROW-4640 and squashes the following commits:
    
    1b77cc93 <Krisztián Szűcs> rename servers to tests in the docker makefile
    3794a5f4 <Krisztián Szűcs> license header
    294bb97b <Krisztián Szűcs> test without pandas installed
---
 Makefile.docker            |  7 ++++---
 dev/tasks/tests.yml        | 28 ++++++++++++++++++++++++++++
 docker-compose.yml         | 16 ++++++++++++++++
 python/Dockerfile.nopandas | 24 ++++++++++++++++++++++++
 4 files changed, 72 insertions(+), 3 deletions(-)

diff --git a/Makefile.docker b/Makefile.docker
index 8e7d861..01949fe 100644
--- a/Makefile.docker
+++ b/Makefile.docker
@@ -22,15 +22,16 @@
 
 LANGUAGES = cpp cpp-alpine cpp-cmake32 c_glib go java js python python-alpine 
rust r
 MISC = lint iwyu clang-format docs pandas-master
-SERVERS = dask hdfs-integration spark-integration
+TESTS = dask hdfs-integration spark-integration python-nopandas
 
 # declare images dependencies
 DEPENDS_ON_CPP = build-c_glib build-python build-r
 DEPENDS_ON_CPP_ALPINE = build-python-alpine
-DEPENDS_ON_PYTHON = build-lint build-docs build-dask build-hdfs-integration 
build-spark-integration
+DEPENDS_ON_PYTHON = build-lint build-docs build-dask build-hdfs-integration \
+                    build-spark-integration build-python-nopandas
 DEPENDS_ON_LINT = build-iwyu build-clang-format
 
-SERVICES = $(LANGUAGES) $(MISC) $(SERVERS)
+SERVICES = $(LANGUAGES) $(MISC) $(TESTS)
 .PHONY: clean build-% run-% $(SERVICES)
 
 DC := docker-compose
diff --git a/dev/tasks/tests.yml b/dev/tasks/tests.yml
index 32131ab..a316381 100644
--- a/dev/tasks/tests.yml
+++ b/dev/tasks/tests.yml
@@ -31,6 +31,8 @@ groups:
     - docker-python-3.7
     - docker-python-2.7-alpine
     - docker-python-3.6-alpine
+    - docker-python-2.7-nopandas
+    - docker-python-3.6-nopandas
     - docker-java
     - docker-js
     - docker-docs
@@ -54,8 +56,10 @@ groups:
     - docker-cpp-cmake32
     - docker-python-2.7
     - docker-python-2.7-alpine
+    - docker-python-2.7-nopandas
     - docker-python-3.6
     - docker-python-3.6-alpine
+    - docker-python-3.6-nopandas
     - docker-python-3.7
 
 tasks:
@@ -199,6 +203,30 @@ tasks:
         - docker-compose build python-alpine
         - docker-compose run python-alpine
 
+  docker-python-2.7-nopandas:
+    platform: linux
+    template: docker-tests/travis.linux.yml
+    params:
+      environment:
+        PYTHON_VERSION: 2.7
+      commands:
+        - docker-compose build cpp
+        - docker-compose build python
+        - docker-compose build python-nopandas
+        - docker-compose run python-nopandas
+
+  docker-python-3.6-alpine:
+    platform: linux
+    template: docker-tests/travis.linux.yml
+    params:
+      environment:
+        PYTHON_VERSION: 3.6
+      commands:
+        - docker-compose build cpp
+        - docker-compose build python
+        - docker-compose build python-nopandas
+        - docker-compose run python-nopandas
+
   ###################### Documentation building tests #########################
 
   docker-docs:
diff --git a/docker-compose.yml b/docker-compose.yml
index 44d0d7f..13ad4f7 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -274,6 +274,22 @@ services:
         PYTHON_VERSION: ${PYTHON_VERSION:-3.6}
     volumes: *alpine-volumes
 
+  python-nopandas:
+    # Usage:
+    #   export PYTHON_VERSION=2.7|3.6|3.7
+    #   docker-compose build cpp
+    #   docker-compose build python
+    #   docker-compose build python-nopandas
+    #   docker-compose run python-nopandas
+    image: arrow:python-${PYTHON_VERSION:-3.6}-nopandas
+    shm_size: 2G
+    build:
+      context: .
+      dockerfile: python/Dockerfile.nopandas
+      args:
+        PYTHON_VERSION: ${PYTHON_VERSION:-3.6}
+    volumes: *ubuntu-volumes
+
   rust:
     # Usage:
     #   docker-compose build rust
diff --git a/python/Dockerfile.nopandas b/python/Dockerfile.nopandas
new file mode 100644
index 0000000..58aaeed
--- /dev/null
+++ b/python/Dockerfile.nopandas
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+ARG PYTHON_VERSION=3.6
+FROM arrow:python-$PYTHON_VERSION
+
+# not installing pandas doesn't mean that it's not grabbed as a transitive
+# dependency, so We remove it explicitly to make sure We don't have pandas
+# installed
+RUN conda remove pandas && conda clean -a

Reply via email to