Skip to content

[MRG+1] Travis: move scipy-dev-wheels build to a cron job #9852

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ matrix:
# versions of numpy, scipy with ATLAS that comes with Ubuntu Trusty 14.04
- env: DISTRIB="ubuntu" PYTHON_VERSION="2.7" CYTHON_VERSION="0.23.4"
COVERAGE=true
if: type != cron
addons:
apt:
packages:
Expand All @@ -35,30 +36,31 @@ matrix:
- env: DISTRIB="conda" PYTHON_VERSION="2.7" INSTALL_MKL="false"
NUMPY_VERSION="1.8.2" SCIPY_VERSION="0.13.3" CYTHON_VERSION="0.23.5"
COVERAGE=true
if: type != cron
# This environment tests the newest supported Anaconda release (4.4.0)
# It also runs tests requiring Pandas.
- env: DISTRIB="conda" PYTHON_VERSION="3.6.1" INSTALL_MKL="true"
NUMPY_VERSION="1.13" SCIPY_VERSION="0.19.0" PANDAS_VERSION="0.20.2"
CYTHON_VERSION="0.25.2" COVERAGE=true
if: type != cron
# This environment use pytest to run the tests. It uses the newest
# supported Anaconda release (4.4.0). It also runs tests requiring Pandas.
- env: USE_PYTEST="true" DISTRIB="conda" PYTHON_VERSION="3.6.1"
INSTALL_MKL="true" NUMPY_VERSION="1.12.1" SCIPY_VERSION="0.19.0"
PANDAS_VERSION="0.20.1" CYTHON_VERSION="0.25.2"
TEST_DOCSTRINGS="true"
if: type != cron
# flake8 linting on diff wrt common ancestor with upstream/master
- env: RUN_FLAKE8="true" SKIP_TESTS="true"
DISTRIB="conda" PYTHON_VERSION="3.5" INSTALL_MKL="true"
NUMPY_VERSION="1.13" SCIPY_VERSION="0.19.0" CYTHON_VERSION="0.23.5"
if: type != cron
# This environment tests scikit-learn against numpy and scipy master
# installed from their CI wheels in a virtualenv with the Python
# interpreter provided by travis.
- python: 3.5
env: DISTRIB="scipy-dev-wheels"
allow_failures:
# allow_failures seems to be keyed on the python version
# We are using this to allow failures for DISTRIB=scipy-dev-wheels
- python: 3.5
- python: 3.6
env: USE_PYTEST="true" DISTRIB="scipy-dev-wheels"
if: type = cron

install: source build_tools/travis/install.sh
script: bash build_tools/travis/test_script.sh
Expand Down
7 changes: 6 additions & 1 deletion build_tools/travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,12 @@ elif [[ "$DISTRIB" == "scipy-dev-wheels" ]]; then
echo "Installing numpy and scipy master wheels"
dev_url=https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com
pip install --pre --upgrade --timeout=60 -f $dev_url numpy scipy cython
pip install nose nose-timer
if [[ $USE_PYTEST == "true" ]]; then
pip install pytest
else
# Install nose-timer via pip
pip install nose nose-timer
fi
fi

if [[ "$COVERAGE" == "true" ]]; then
Expand Down
8 changes: 7 additions & 1 deletion build_tools/travis/test_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ run_tests() {
cd $OLDPWD

if [[ "$USE_PYTEST" == "true" ]]; then
pytest $(find doc -name '*.rst' | sort)
# Do not run doctests in scipy-dev-wheels build for now
# (broken by numpy 1.14.dev array repr/str formatting
# change even with np.set_printoptions(sign='legacy')).
# See https://github.com/numpy/numpy/issues/9804 for more details
if [[ "$DISTRIB" != "scipy-dev-wheels" ]]; then
pytest $(find doc -name '*.rst' | sort)
fi
else
# Makefile is using nose
make test-doc
Expand Down
8 changes: 8 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@
# For example, this allows to build extensions in place and run pytest
# doc/modules/clustering.rst and use sklearn from the local folder
# rather than the one from site-packages.

# Set numpy array str/repr to legacy behaviour on numpy > 1.13 to make
# the doctests pass
import numpy as np
try:
np.set_printoptions(sign='legacy')
except TypeError:
pass