Skip to content

Commit

Permalink
TST: clean up build testing
Browse files Browse the repository at this point in the history
Author: Jeff Reback <[email protected]>

Closes pandas-dev#15734 from jreback/build and squashes the following commits:

a99b713 [Jeff Reback] suppress the import json warning when generating _version
ed7c526 [Jeff Reback] modify install tests
1cc5b67 [Jeff Reback] TST: have the build test exercise pandas.test()
  • Loading branch information
jreback committed Mar 19, 2017
1 parent 59b88ab commit 5f4a5b4
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 46 deletions.
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
17 changes: 0 additions & 17 deletions ci/install_test.sh

This file was deleted.

52 changes: 30 additions & 22 deletions ci/install_travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,37 +131,45 @@ 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
# 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

# build but don't install
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
Expand Down
3 changes: 2 additions & 1 deletion ci/script_multi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion versioneer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '''
Expand Down

0 comments on commit 5f4a5b4

Please sign in to comment.