-
Notifications
You must be signed in to change notification settings - Fork 876
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from rasbt/tensorflow08
Tensorflow08
- Loading branch information
Showing
4 changed files
with
149 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,29 @@ | ||
sudo: required | ||
dist: trusty | ||
language: python | ||
sudo: false | ||
os: | ||
- linux | ||
virtualenv: | ||
system_site_packages: true | ||
env: | ||
matrix: | ||
- PYTHON_VERSION="2.7" LATEST="true" | ||
- PYTHON_VERSION="3.4" LATEST="true" | ||
- PYTHON_VERSION="3.5" LATEST="true" | ||
- PYTHON_VERSION="3.5" NUMPY_VERSION="1.10.4" SCIPY_VERSION="0.17" SKLEARN_VERSION="0.17" PANDAS_VERSION="0.17.1" MATPLOTLIB_VERSION="1.5.1" | ||
- PYTHON_VERSION="3.5" COVERAGE="true" LATEST="true" | ||
- PYTHON_VERSION="2.7" TENSORFLOW="true" LATEST="true" | ||
- PYTHON_VERSION="3.4" TENSORFLOW="true" LATEST="true" | ||
install: source ./ci/.travis_install.sh | ||
script: bash ./ci/.travis_test.sh | ||
matrix: | ||
include: | ||
- python: 3.5 | ||
env: LATEST="false" TENSORFLOW="false" COVERAGE="false" NUMPY_VERSION="1.10.4" SCIPY_VERSION="0.17" SKLEARN_VERSION="0.17" PANDAS_VERSION="0.17.1" MATPLOTLIB_VERSION="1.5.1" | ||
- python: 3.5 | ||
env: LATEST="true" TENSORFLOW="false" COVERAGE="false" | ||
- python: 3.4 | ||
env: LATEST="true" TENSORFLOW="false" COVERAGE="false" | ||
- python: 3.4 | ||
env: LATEST="true" TENSORFLOW="true" COVERAGE="false" | ||
- python: 2.7 | ||
env: LATEST="true" TENSORFLOW="false" COVERAGE="false" | ||
- python: 2.7 | ||
env: LATEST="true" TENSORFLOW="true" COVERAGE="false" | ||
install: | ||
- ci/.travis_install.sh | ||
script: | ||
- echo "test" | ||
after_success: | ||
# Ignore coveralls failures as the coveralls server is not very reliable | ||
# but we don't want travis to report a failure in the github UI just | ||
# because the coverage report failed to be published. | ||
- if [[ "$COVERAGE" == "true" ]]; then coveralls || echo "failed"; fi | ||
cache: apt | ||
sudo: false | ||
- if [[ "${COVERAGE}" == "true" ]]; then coveralls || echo "failed"; fi | ||
notifications: | ||
email: | ||
recipients: | ||
- [email protected] | ||
email: | ||
recipients: | ||
- [email protected] | ||
on_success: always | ||
on_failure: always | ||
|
||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- gcc-4.8 | ||
- g++-4.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,49 @@ | ||
#!/bin/bash | ||
# This script is meant to be called by the "install" step defined in | ||
# .travis.yml. See http://docs.travis-ci.com/ for more details. | ||
# The behavior of the script is controlled by environment variabled defined | ||
# in the .travis.yml in the top level folder of the project. | ||
|
||
# License: 3-clause BSD | ||
|
||
|
||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
# Fix the compilers to workaround avoid having the Python 3.4 build | ||
# lookup for g++44 unexpectedly. | ||
#export CC=gcc | ||
#export CXX=g++ | ||
|
||
# Deactivate the travis-provided virtual environment and setup a | ||
# conda-based environment instead | ||
deactivate | ||
|
||
# Use the miniconda installer for faster download / install of conda | ||
# itself | ||
if [[ "$PYTHON_VERSION" == "2.7" ]]; then | ||
wget http://repo.continuum.io/miniconda/Miniconda2-4.0.5-Linux-x86_64.sh \ | ||
-O miniconda.sh | ||
if [ "${TRAVIS_PYTHON_VERSION}" == "2.7" ]; then | ||
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; | ||
else | ||
wget http://repo.continuum.io/miniconda/Miniconda3-4.0.5-Linux-x86_64.sh \ | ||
-O miniconda.sh | ||
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; | ||
fi | ||
|
||
wget http://repo.continuum.io/miniconda/Miniconda-3.16.0-Linux-x86_64.sh \ | ||
-O miniconda.sh | ||
chmod +x miniconda.sh && ./miniconda.sh -b | ||
export PATH=/home/travis/miniconda/bin:$PATH | ||
conda update --yes conda | ||
|
||
# Configure the conda environment and put it in the path using the | ||
# provided versions | ||
bash miniconda.sh -b -p $HOME/miniconda | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
hash -r | ||
conda config --set always_yes yes --set changeps1 no | ||
conda update -q conda | ||
conda info -a | ||
|
||
|
||
if [[ "$LATEST" == "true" ]]; then | ||
conda create -n testenv --yes python=$PYTHON_VERSION pip nose \ | ||
numpy scipy scikit-learn cython pandas matplotlib | ||
if [ "${LATEST}" = "true" ]; then | ||
conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION numpy scipy matplotlib pandas scikit-learn; | ||
else | ||
conda create -n testenv --yes python=$PYTHON_VERSION pip nose \ | ||
numpy=$NUMPY_VERSION scipy=$SCIPY_VERSION \ | ||
scikit-learn=$SKLEARN_VERSION \ | ||
pandas=$PANDAS_VERSION \ | ||
matplotlib=$MATPLOTLIB_VERSION cython | ||
conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION numpy=$NUMPY_VERSION scipy=$SCIPY_VERSION matplotlib=$MATPLOTLIB_VERSION pandas=$PANDAS_VERSION scikit-learn=$SKLEARN_VERSION; | ||
fi | ||
|
||
source activate test-environment | ||
|
||
source activate testenv | ||
|
||
pip install nose-exclude | ||
pip install nose nose-exclude; | ||
|
||
if [[ "$COVERAGE" == "true" ]]; then | ||
pip install coverage coveralls | ||
if [ "${COVERAGE}" = "true" ]; then | ||
pip install coverage coveralls; | ||
fi | ||
|
||
if [[ "$TENSORFLOW" == "true" ]]; then | ||
# workaround for "Cannot remove entries from nonexistent file /home/travis/miniconda/envs/testenv/lib/python3.4/site-packages/easy-install.pth" | ||
conda update setuptools --yes | ||
curl https://bootstrap.pypa.io/ez_setup.py -o - | python | ||
case "$TRAVIS_OS_NAME" in | ||
"linux") | ||
case "$PYTHON_VERSION" in | ||
"2.7") | ||
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl | ||
;; | ||
"3.4") | ||
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp34-none-linux_x86_64.whl | ||
;; | ||
esac | ||
;; | ||
"osx") | ||
case "$PYTHON_VERSION" in | ||
"2.7") | ||
pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.7.1-cp27-none-any.whl | ||
;; | ||
"3.5") | ||
pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.7.1-cp35-none-any.whl | ||
;; | ||
esac | ||
;; | ||
esac | ||
fi | ||
|
||
# Build mlxtend in the install.sh script to collapse the verbose | ||
# build output in the travis output when it succeeds. | ||
|
||
if [[ "$TENSORFLOW" == "true" ]]; then | ||
python -c "import tensorflow; print('tensorflow %s' % tensorflow.__version__)" | ||
python --version | ||
python -c "import pandas; print('pandas %s' % pandas.__version__)"; | ||
python -c "import matplotlib; print('matplotlib %s' % matplotlib.__version__)"; | ||
python -c "import numpy; print('numpy %s' % numpy.__version__)" | ||
python -c "import scipy; print('scipy %s' % scipy.__version__)" | ||
|
||
if [ "${TENSORFLOW}" = "true" ]; then | ||
if [ "${TRAVIS_PYTHON_VERSION}" = "2.7" ]; then | ||
pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl; | ||
else | ||
pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp34-cp34m-linux_x86_64.whl; | ||
fi | ||
python -c "import tensorflow; print('tensorflow %s' % tensorflow.__version__)"; | ||
else | ||
python -c "import sklearn; print('sklearn %s' % sklearn.__version__)" | ||
python -c "import pandas; print('pandas %s' % pandas.__version__)" | ||
python -c "import matplotlib; print('matplotlib %s' % matplotlib.__version__)" | ||
python -c "import sklearn; print('sklearn %s' % sklearn.__version__)"; | ||
fi | ||
|
||
# install mlxtend | ||
python setup.py install #build_ext --inplace | ||
python setup.py install; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,16 @@ | ||
#!/bin/bash | ||
# This script is meant to be called by the "script" step defined in | ||
# .travis.yml. See http://docs.travis-ci.com/ for more details. | ||
# The behavior of the script is controlled by environment variabled defined | ||
# in the .travis.yml in the top level folder of the project. | ||
|
||
# License: 3-clause BSD | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
python --version | ||
python -c "import numpy; print('numpy %s' % numpy.__version__)" | ||
python -c "import scipy; print('scipy %s' % scipy.__version__)" | ||
|
||
|
||
if [[ "$TENSORFLOW" == "true" ]]; then | ||
python -c "import tensorflow; print('tensorflow %s' % tensorflow.__version__)" | ||
nosetests -s -v mlxtend.tf_classifier --nologcapture | ||
if [ "$TENSORFLOW" == "true" ]; then | ||
if [[ "$COVERAGE" == "true" ]]; then | ||
nosetests -s -v mlxtend.tf_classifier --nologcapture --with-coverage | ||
else | ||
nosetests -s -v mlxtend.tf_classifier --nologcapture | ||
else | ||
python -c "import sklearn; print('sklearn %s' % sklearn.__version__)" | ||
python -c "import pandas; print('pandas %s' % pandas.__version__)" | ||
python -c "import matplotlib; print('matplotlib %s' % matplotlib.__version__)" | ||
|
||
if [[ "$COVERAGE" == "true" ]]; then | ||
nosetests -s -v --with-coverage --exclude-dir=mlxtend/tf_classifier --exclude-dir=mlxtend/data --exclude-dir=mlxtend/general_plotting | ||
|
||
else | ||
nosetests -s -v --exclude-dir=mlxtend/tf_classifier --exclude-dir=mlxtend/data --exclude-dir=mlxtend/general_plotting | ||
fi | ||
|
||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters