Skip to content
Merged

Ci #1

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
7 changes: 7 additions & 0 deletions .landscape.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
doc-warnings: yes
test-warnings: yes
strictness: veryhigh
max-line-length: 80
autodetect: yes
ignore-paths:
- doc
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
language: python
virtualenv:
system_site_packages: true
env:
matrix:
- DISTRIB="conda" PYTHON_VERSION="2.7" INSTALL_MKL="false"
COVERAGE="true" NUMPY_VERSION="1.6.2" SCIPY_VERSION="0.11.0"
# This environment tests the oldest supported anaconda env
- DISTRIB="conda" PYTHON_VERSION="2.6" INSTALL_MKL="false"
NUMPY_VERSION="1.6.2" SCIPY_VERSION="0.11.0"
# This environment tests the newest supported anaconda env
- DISTRIB="conda" PYTHON_VERSION="3.4" INSTALL_MKL="true"
NUMPY_VERSION="1.8.1" SCIPY_VERSION="0.14.0"
install: source continuous_integration/install.sh
script: bash continuous_integration/test_script.sh
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
13 changes: 13 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
Random output trees
===================

.. image:: https://secure.travis-ci.org/arjoly/andom-output-trees.png?branch=master
:target: https://secure.travis-ci.org/arjoly/random-output-trees
:alt: Build status

.. image:: https://coveralls.io/repos/arjoly/andom-output-trees/badge.png?branch=master
:target: https://coveralls.io/r/arjoly/random-output-trees
:alt: Coverage status

.. image:: https://landscape.io/github/arjoly/random-output-trees/master/landscape.svg
:target: https://landscape.io/github/arjoly/random-output-trees/master
:alt: Code Health


Random output trees is a python package to grow decision tree ensemble on
randomized output space. The core tree implementation is based on scikit-learn
0.15.2. All provided estimators and transformers are scikit-learn compatible.
Expand Down
66 changes: 66 additions & 0 deletions continuous_integration/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/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

# This file is originally from the scikit-learn project

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++

sudo apt-get update -qq
if [[ "$INSTALL_ATLAS" == "true" ]]; then
sudo apt-get install -qq libatlas3gf-base libatlas-dev
fi

if [[ "$DISTRIB" == "conda" ]]; then
# 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
wget http://repo.continuum.io/miniconda/Miniconda-3.6.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
conda create -n testenv --yes python=$PYTHON_VERSION pip nose \
numpy=$NUMPY_VERSION scipy=$SCIPY_VERSION
source activate testenv

if [[ "$INSTALL_MKL" == "true" ]]; then
# Make sure that MKL is used
conda install --yes mkl
else
# Make sure that MKL is not used
conda remove --yes --features mkl || echo "MKL not installed"
fi

elif [[ "$DISTRIB" == "ubuntu" ]]; then
# Use standard ubuntu packages in their default version
sudo apt-get install -qq python-scipy python-nose python-pip
fi

if [[ "$COVERAGE" == "true" ]]; then
pip install coverage coveralls
fi

pip install scikit-learn


python --version
python -c "import numpy; print('numpy %s' % numpy.__version__)"
python -c "import scipy; print('scipy %s' % scipy.__version__)"
python -c "import sklearn; print('sklearn %s' % sklearn.__version__)"
python setup.py build_ext --inplace
25 changes: 25 additions & 0 deletions continuous_integration/test_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/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

# This file is originally from the scikit-learn project

set -e

python --version
python -c "import numpy; print('numpy %s' % numpy.__version__)"
python -c "import scipy; print('scipy %s' % scipy.__version__)"
python -c "import sklearn; print('sklearn %s' % sklearn.__version__)"

# Do not use "make test" or "make test-coverage" as they enable verbose mode
# which renders travis output too slow to display in a browser.
if [[ "$COVERAGE" == "true" ]]; then
nosetests -s --with-coverage random_output_trees
else
nosetests -s random_output_trees
fi

Loading