From 1cc5b67f6c497bab03b4438881bdea3134be0486 Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Sat, 18 Mar 2017 17:03:05 -0400 Subject: [PATCH 1/3] TST: have the build test exercise pandas.test() --- .travis.yml | 9 ++++----- ci/install_travis.sh | 45 +++++++++++++++++++++++--------------------- ci/script_multi.sh | 3 ++- 3 files changed, 30 insertions(+), 27 deletions(-) diff --git a/.travis.yml b/.travis.yml index 88e1655363a4e..705b2380ac697 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,6 @@ matrix: - PYTHON_VERSION=3.5 - JOB_NAME: "35_osx" - TEST_ARGS="--skip-slow --skip-network" - - BUILD_TYPE=conda - JOB_TAG=_OSX - TRAVIS_PYTHON_VERSION=3.5 - CACHE_NAME="35_osx" @@ -107,12 +106,12 @@ matrix: - python: 2.7 env: - PYTHON_VERSION=2.7 - - JOB_NAME: "27_build_test_conda" + - JOB_NAME: "27_build_test" - JOB_TAG=_BUILD_TEST - TEST_ARGS="--skip-slow" - FULL_DEPS=true - BUILD_TEST=true - - CACHE_NAME="27_build_test_conda" + - CACHE_NAME="27_build_test" - USE_CACHE=true # In allow_failures - python: 3.5 @@ -147,12 +146,12 @@ matrix: - python: 2.7 env: - PYTHON_VERSION=2.7 - - JOB_NAME: "27_build_test_conda" + - JOB_NAME: "27_build_test" - JOB_TAG=_BUILD_TEST - TEST_ARGS="--skip-slow" - FULL_DEPS=true - BUILD_TEST=true - - CACHE_NAME="27_build_test_conda" + - CACHE_NAME="27_build_test" - USE_CACHE=true - python: 3.5 env: diff --git a/ci/install_travis.sh b/ci/install_travis.sh index de3b3fb6a464e..f47f88dc8810a 100755 --- a/ci/install_travis.sh +++ b/ci/install_travis.sh @@ -132,9 +132,7 @@ fi if [ "$BUILD_TEST" ]; then # build testing - pip uninstall --yes cython - pip install cython==0.23 - ( python setup.py build_ext --inplace && python setup.py develop ) || true + python setup.py install || exit 1 else @@ -142,26 +140,31 @@ else echo "[build em]" time python setup.py build_ext --inplace || exit 1 - # we may have run installations - echo "[conda installs]" - REQ="ci/requirements-${PYTHON_VERSION}${JOB_TAG}.run" - if [ -e ${REQ} ]; then - time conda install -n pandas --file=${REQ} || exit 1 - fi +fi - # we may have additional pip installs - echo "[pip installs]" - REQ="ci/requirements-${PYTHON_VERSION}${JOB_TAG}.pip" - if [ -e ${REQ} ]; then - pip install -r $REQ - fi +# we may have run installations +echo "[conda installs]" +REQ="ci/requirements-${PYTHON_VERSION}${JOB_TAG}.run" +if [ -e ${REQ} ]; then + time conda install -n pandas --file=${REQ} || exit 1 +fi - # may have addtl installation instructions for this build - echo "[addtl installs]" - REQ="ci/requirements-${PYTHON_VERSION}${JOB_TAG}.sh" - if [ -e ${REQ} ]; then - time bash $REQ || exit 1 - fi +# we may have additional pip installs +echo "[pip installs]" +REQ="ci/requirements-${PYTHON_VERSION}${JOB_TAG}.pip" +if [ -e ${REQ} ]; then + pip install -r $REQ +fi + +# may have addtl installation instructions for this build +echo "[addtl installs]" +REQ="ci/requirements-${PYTHON_VERSION}${JOB_TAG}.sh" +if [ -e ${REQ} ]; then + time bash $REQ || exit 1 +fi + +# finish install if we are not doing a build-testk +if [ -z "$BUILD_TEST" ]; then # remove any installed pandas package # w/o removing anything else diff --git a/ci/script_multi.sh b/ci/script_multi.sh index 41f71fd21f63f..2d1211b2f7b96 100755 --- a/ci/script_multi.sh +++ b/ci/script_multi.sh @@ -24,7 +24,8 @@ export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 429496 echo PYTHONHASHSEED=$PYTHONHASHSEED if [ "$BUILD_TEST" ]; then - echo "We are not running pytest as this is simply a build test." + cd /tmp + python -c "import pandas; pandas.test(['-n 2'])" elif [ "$COVERAGE" ]; then echo pytest -s -n 2 -m "not single" --cov=pandas --cov-append --cov-report xml:/tmp/cov.xml --junitxml=/tmp/multiple.xml $TEST_ARGS pandas pytest -s -n 2 -m "not single" --cov=pandas --cov-append --cov-report xml:/tmp/cov.xml --junitxml=/tmp/multiple.xml $TEST_ARGS pandas From ed7c5267834a5a64c82b06ac9f66e2850e4624fd Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Sat, 18 Mar 2017 19:10:11 -0400 Subject: [PATCH 2/3] modify install tests --- ci/install_test.sh | 17 ----------------- ci/install_travis.sh | 9 +++++++-- 2 files changed, 7 insertions(+), 19 deletions(-) delete mode 100755 ci/install_test.sh diff --git a/ci/install_test.sh b/ci/install_test.sh deleted file mode 100755 index 9ace633d7f39d..0000000000000 --- a/ci/install_test.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -echo "inside $0" - -if [ "$INSTALL_TEST" ]; then - source activate pandas - echo "Starting installation test." - conda uninstall cython || exit 1 - python "$TRAVIS_BUILD_DIR"/setup.py sdist --formats=zip,gztar || exit 1 - pip install "$TRAVIS_BUILD_DIR"/dist/*tar.gz || exit 1 - pytest pandas/tests/test_series.py --junitxml=/tmp/pytest_install.xml -else - echo "Skipping installation test." -fi -RET="$?" - -exit "$RET" diff --git a/ci/install_travis.sh b/ci/install_travis.sh index f47f88dc8810a..053a2d15a287c 100755 --- a/ci/install_travis.sh +++ b/ci/install_travis.sh @@ -131,8 +131,13 @@ fi if [ "$BUILD_TEST" ]; then - # build testing - python setup.py install || exit 1 + # build & install testing + echo ["Starting installation test."] + python setup.py clean + python setup.py build_ext --inplace + python setup.py sdist --formats=gztar + conda uninstall cython + pip install dist/*tar.gz || exit 1 else From a99b713353516c041a47152a25e1369fc06faa05 Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Sat, 18 Mar 2017 19:52:43 -0400 Subject: [PATCH 3/3] suppress the import json warning when generating _version --- versioneer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/versioneer.py b/versioneer.py index c010f63e3ead8..104e8e97c6bd6 100644 --- a/versioneer.py +++ b/versioneer.py @@ -1130,7 +1130,9 @@ def versions_from_parentdir(parentdir_prefix, root, verbose): # unpacked source archive. Distribution tarballs contain a pre-generated copy # of this file. -import json +from warnings import catch_warnings +with catch_warnings(record=True): + import json import sys version_json = '''