forked from automl/auto-sklearn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAINT try build settings based on scikit-learn-contrib
- Loading branch information
Showing
6 changed files
with
193 additions
and
30 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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# 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 | ||
pushd . | ||
cd | ||
mkdir -p download | ||
cd download | ||
echo "Cached in $HOME/download :" | ||
ls -l | ||
echo | ||
if [[ ! -f miniconda.sh ]] | ||
then | ||
wget http://repo.continuum.io/miniconda/Miniconda-3.6.0-Linux-x86_64.sh \ | ||
-O miniconda.sh | ||
fi | ||
chmod +x miniconda.sh && ./miniconda.sh -b | ||
cd .. | ||
export PATH=/home/travis/miniconda/bin:$PATH | ||
conda update --yes conda | ||
popd | ||
|
||
# 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 cython=$CYTHON_VERSION matplotlib | ||
source activate testenv | ||
pip install -r requ.txt | ||
|
||
if [[ "$COVERAGE" == "true" ]]; then | ||
pip install coverage coveralls | ||
fi | ||
|
||
python --version | ||
python -c "import numpy; print('numpy %s' % numpy.__version__)" | ||
python -c "import scipy; print('scipy %s' % scipy.__version__)" | ||
python setup.py develop |
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
# This script is meant to be called in the "deploy" step defined in | ||
# circle.yml. See https://circleci.com/docs/ for more details. | ||
# The behavior of the script is controlled by environment variable defined | ||
# in the circle.yml in the top level folder of the project. | ||
|
||
MSG="Pushing the docs for revision for branch: $CIRCLE_BRANCH, commit $CIRCLE_SHA1" | ||
|
||
cd $HOME | ||
# Copy the build docs to a temporary folder | ||
rm -rf tmp | ||
mkdir tmp | ||
cp -R $HOME/$DOC_REPO/doc/build/html/* ./tmp/ | ||
|
||
# Clone the docs repo if it isnt already there | ||
if [ ! -d $DOC_REPO ]; | ||
then git clone "[email protected]:$USERNAME/"$DOC_REPO".git"; | ||
fi | ||
|
||
cd $DOC_REPO | ||
git branch gh-pages | ||
git checkout -f gh-pages | ||
git reset --hard origin/gh-pages | ||
git clean -dfx | ||
|
||
for name in $(ls -A $HOME/$DOC_REPO); do | ||
case $name in | ||
.nojekyll) # So that github does not build this as a Jekyll website. | ||
;; | ||
circle.yml) # Config so that build gh-pages branch. | ||
;; | ||
*) | ||
git rm -rf $name | ||
;; | ||
esac | ||
done | ||
|
||
# Copy the new build docs | ||
mkdir $DOC_URL | ||
cp -R $HOME/tmp/* ./$DOC_URL/ | ||
|
||
git config --global user.email $EMAIL | ||
git config --global user.name $USERNAME | ||
git add -f ./$DOC_URL/ | ||
git commit -m "$MSG" | ||
git push -f origin gh-pages | ||
|
||
echo $MSG |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
set -e | ||
|
||
if [[ "$COVERAGE" == "true" ]]; then | ||
# Need to run coveralls from a git checkout, so we copy .coverage | ||
# from TEST_DIR where nosetests has been run | ||
cp $TEST_DIR/.coverage $TRAVIS_BUILD_DIR | ||
cd $TRAVIS_BUILD_DIR | ||
# 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. | ||
coveralls || echo "Coveralls upload failed" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
set -e | ||
|
||
# Get into a temp directory to run test from the installed scikit learn and | ||
# check if we do not leave artifacts | ||
mkdir -p $TEST_DIR | ||
|
||
cwd=`pwd` | ||
test_dir=$cwd/tests | ||
|
||
cd $TEST_DIR | ||
|
||
if [[ "$COVERAGE" == "true" ]]; then | ||
nosetests -sv --with-coverage --cover-package=$MODULE $test_dir | ||
else | ||
nosetests -sv $test_dir | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
machine: | ||
environment: | ||
# The github organization or username of the repository which hosts the | ||
# project and documentation. | ||
USERNAME: "automl" | ||
|
||
# The repository where the documentation will be hosted | ||
DOC_REPO: "auto-sklearn" | ||
|
||
# The base URL for the Github page where the documentation will be hosted | ||
DOC_URL: "" | ||
|
||
# The email is to be used for commits in the Github Page | ||
EMAIL: "[email protected]" | ||
|
||
dependencies: | ||
|
||
# Various dependencies | ||
pre: | ||
- sudo -E apt-get -yq remove texlive-binaries --purge | ||
- sudo apt-get update | ||
- sudo apt-get install libatlas-dev libatlas3gf-base | ||
- sudo apt-get install build-essential python-dev python-setuptools | ||
# install numpy first as it is a compile time dependency for other packages | ||
- pip install --upgrade numpy | ||
# install documentation building dependencies | ||
- pip install --upgrade matplotlib setuptools nose coverage sphinx pillow sphinx-gallery sphinx_bootstrap_theme cython numpydoc | ||
# Installing required packages for `make -C doc check command` to work. | ||
- sudo -E apt-get -yq update | ||
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install dvipng texlive-latex-base texlive-latex-extra | ||
# finally install the requirements of the package to allow autodoc | ||
- pip install -r requirements.txt | ||
|
||
# The --user is needed to let sphinx see the source and the binaries | ||
# The pipefail is requested to propagate exit code | ||
override: | ||
- python setup.py clean | ||
- python setup.py develop | ||
- set -o pipefail && cd doc && make html 2>&1 | tee ~/log.txt | ||
test: | ||
# Grep error on the documentation | ||
override: | ||
- cat ~/log.txt && if grep -q "Traceback (most recent call last):" ~/log.txt; then false; else true; fi | ||
deployment: | ||
push: | ||
branch: develop | ||
commands: | ||
- bash ci_scripts/push_doc.sh | ||
general: | ||
# Open the doc to the API | ||
artifacts: | ||
- "doc/_build/html" | ||
- "~/log.txt" | ||
# Restric the build to the branch master only | ||
branches: | ||
only: | ||
- develop |