Apache DataFusion SQL Query Engine
ARROW-5265: [Python][CI] Add integration test with kartothek
Uwe L. Kornfb664d2da769
diff --git a/.env b/.envindex bf59039181..459c909517 100644--- a/.env+++ b/.env@@ -34,6 +34,7 @@ JDK=8PANDAS=latestDASK=latestTURBODBC=latest+KARTOTHEK=latestHDFS=2.9.2SPARK=masterDOTNET=2.1diff --git a/.github/workflows/python_cron.yml b/.github/workflows/python_cron.ymlindex 3b2879ec53..6b6d6a64f9 100644--- a/.github/workflows/python_cron.yml+++ b/.github/workflows/python_cron.yml@@ -112,6 +112,7 @@ jobs:- dask- hdfs- turbodbc+ - kartothek-latest- pandas-master- pandas-0.24include:@@ -121,6 +122,10 @@ jobs:- name: turbodbclibrary: turbodbctitle: Turbodbc+ - name: kartothek-latest+ library: kartothek+ kartothek: latest+ title: Kartothek latest- name: pandas-0.24library: pandastitle: Pandas 0.24@@ -137,6 +142,7 @@ jobs:DASK: latestTURBODBC: latestPANDAS: ${{ matrix.pandas || 'latest' }}+ KARTOTHEK: ${{ matrix.kartothek || 'latest' }}steps:- name: Checkout Arrowuses: actions/checkout@v1diff --git a/Makefile.docker b/Makefile.dockerindex f1b275978b..a044333e89 100644--- a/Makefile.docker+++ b/Makefile.docker@@ -29,7 +29,7 @@ DEPENDS_ON_CPP = build-c_glib build-python build-rDEPENDS_ON_CPP_ALPINE = build-python-alpineDEPENDS_ON_PYTHON = build-lint build-docs build-dask build-hdfs-integration \build-spark-integration build-python-nopandas \- build-turbodbc-integration+ build-turbodbc-integration build-kartothek-integrationDEPENDS_ON_LINT = build-iwyu build-clang-formatSERVICES = $(LANGUAGES) $(MISC) $(TESTS)diff --git a/ci/docker/conda-python-kartothek.dockerfile b/ci/docker/conda-python-kartothek.dockerfilenew file mode 100644index 0000000000..aa013fe5f3--- /dev/null+++ b/ci/docker/conda-python-kartothek.dockerfile@@ -0,0 +1,40 @@+# 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 repo+ARG arch=amd64+ARG python=3.6+FROM ${repo}:${arch}-conda-python-${python}++# install kartothek dependencies from conda-forge+RUN conda install -c conda-forge -q \+ dask \+ decorator \+ msgpack-python \+ pytest-mock \+ pytest-xdist \+ simplejson \+ simplekv \+ storefact \+ toolz \+ urlquote \+ zstandard && \+ conda clean --all++ARG kartothek=latest+COPY ci/scripts/install_kartothek.sh /arrow/ci/scripts/+RUN /arrow/ci/scripts/install_kartothek.sh ${kartothek} /kartothekdiff --git a/ci/scripts/install_kartothek.sh b/ci/scripts/install_kartothek.shnew file mode 100755index 0000000000..4d88943b6a--- /dev/null+++ b/ci/scripts/install_kartothek.sh@@ -0,0 +1,41 @@+#!/usr/bin/env bash+#+# 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.++set -e++if [ "$#" -ne 2 ]; then+ echo "Usage: $0 <kartothek version> <target directory>"+ exit 1+fi++karthothek=$1+target=$2++git clone --recurse-submodules https://github.com/JDASoftwareGroup/kartothek "${target}"+if [ "${kartothek}" = "master" ]; then+ git -C "${target}" checkout master;+elif [ "${kartothek}" = "latest" ]; then+ git -C "${target}" checkout $(git describe --tags);+else+ git -C "${target}" checkout ${kartothek};+fi++pushd "${target}"+pip install --no-deps .+popddiff --git a/ci/scripts/integration_kartothek.sh b/ci/scripts/integration_kartothek.shnew file mode 100755index 0000000000..f1465ba40e--- /dev/null+++ b/ci/scripts/integration_kartothek.sh@@ -0,0 +1,30 @@+#!/usr/bin/env bash+#+# 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.++set -e++# check that optional pyarrow modules are available+# because pytest would just skip the pyarrow tests+python -c "import pyarrow.parquet"++# check that kartothek is correctly installed+python -c "import kartothek"++pushd /kartothek+pytest -n0diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.ymlindex 0feae007fe..e23f68d3f0 100644--- a/dev/tasks/tasks.yml+++ b/dev/tasks/tasks.yml@@ -121,6 +121,8 @@ groups:- test-conda-python-3.8-dask-master- test-conda-python-3.7-turbodbc-latest- test-conda-python-3.7-turbodbc-master+ - test-conda-python-3.7-kartothek-latest+ - test-conda-python-3.7-kartothek-master- test-conda-python-3.7-hdfs-2.9.2- test-conda-python-3.7-spark-master- test-conda-python-3.8-jpype@@ -202,6 +204,8 @@ groups:- test-conda-python-3.8-dask-master- test-conda-python-3.7-turbodbc-latest- test-conda-python-3.7-turbodbc-master+ - test-conda-python-3.7-kartothek-latest+ - test-conda-python-3.7-kartothek-master- test-conda-python-3.7-hdfs-2.9.2- test-conda-python-3.7-spark-master- test-conda-python-3.8-jpype@@ -286,6 +290,8 @@ groups:- test-conda-python-3.8-dask-master- test-conda-python-3.7-turbodbc-latest- test-conda-python-3.7-turbodbc-master+ - test-conda-python-3.7-kartothek-latest+ - test-conda-python-3.7-kartothek-master- test-conda-python-3.7-hdfs-2.9.2- test-conda-python-3.7-spark-master- test-conda-python-3.8-jpype@@ -2065,6 +2071,34 @@ tasks:- docker-compose build --no-cache conda-python-turbodbc- docker-compose run conda-python-turbodbc+ test-conda-python-3.7-kartothek-latest:+ ci: circle+ platform: linux+ template: docker-tests/circle.linux.yml+ params:+ commands:+ - export PYTHON=3.7 KARTOTHEK=latest+ - docker-compose pull --ignore-pull-failures conda-cpp+ - docker-compose pull --ignore-pull-failures conda-python+ - docker-compose build conda-cpp+ - docker-compose build conda-python+ - docker-compose build --no-cache conda-python-kartothek+ - docker-compose run conda-python-kartothek++ test-conda-python-3.7-kartothek-master:+ ci: circle+ platform: linux+ template: docker-tests/circle.linux.yml+ params:+ commands:+ - export PYTHON=3.7 TURBODBC=master+ - docker-compose pull --ignore-pull-failures conda-cpp+ - docker-compose pull --ignore-pull-failures conda-python+ - docker-compose build conda-cpp+ - docker-compose build conda-python+ - docker-compose build --no-cache conda-python-kartothek+ - docker-compose run conda-python-kartothek+test-conda-python-3.7-hdfs-2.9.2:ci: circleplatform: linuxdiff --git a/docker-compose.yml b/docker-compose.ymlindex 8e33a61b0c..9f501b4c19 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -638,7 +638,7 @@ services:/arrow/ci/scripts/python_test.sh /arrow"]conda-python-turbodbc:- # Possible $DASK parameters:+ # Possible $TURBODBC parameters:# - `latest`: latest release# - `master`: git master branch, use `docker-compose run --no-cache`# - `<version>`: specific version available under github releases@@ -667,6 +667,36 @@ services:/arrow/ci/scripts/python_build.sh /arrow /build &&/arrow/ci/scripts/integration_turbodbc.sh /turbodbc /build"]+ conda-python-kartothek:+ # Possible $KARTOTHEK parameters:+ # - `latest`: latest release+ # - `master`: git master branch, use `docker-compose run --no-cache`+ # - `<version>`: specific version available under github releases+ # Usage:+ # docker-compose build conda-cpp+ # docker-compose build conda-python+ # docker-compose build conda-python-kartothek+ # docker-compose run --rm conda-python-kartothek+ image: ${REPO}:${ARCH}-conda-python-${PYTHON}-kartothek-${KARTOTHEK}+ build:+ context: .+ dockerfile: ci/docker/conda-python-kartothek.dockerfile+ cache_from:+ - ${REPO}:${ARCH}-conda-python-${PYTHON}-kartothek-${KARTOTHEK}+ args:+ repo: ${REPO}+ arch: ${ARCH}+ python: ${PYTHON}+ kartothek: ${KARTOTHEK}+ shm_size: *shm-size+ environment:+ <<: *ccache+ volumes: *conda-volumes+ command:+ ["/arrow/ci/scripts/cpp_build.sh /arrow /build &&+ /arrow/ci/scripts/python_build.sh /arrow /build &&+ /arrow/ci/scripts/integration_kartothek.sh /kartothek /build"]+########################## Python Wheels ####################################centos-python-manylinux1: