From 507079fdb0f4bd8f637ad3d32a97308e91269724 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sun, 17 Jan 2016 17:02:16 +0000 Subject: [PATCH 1/8] Install everyting but numpy and pandas from pypi Ensures that we always get the latest version so we spot issues early. The speedup of the wheelhouse is minimal for these packages which are mainly pure python anyway and we are useing the wheel cache for the ones that are not wheels --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0f2d3e836f5b..9ff25ed80d6c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,12 +71,12 @@ install: pip install --upgrade setuptools # Install only from travis wheelhouse - if [ -z "$PRE" ]; then - wheelhouse_pip_install python-dateutil $NUMPY $PANDAS pyparsing!=2.0.4 pillow sphinx!=1.3.0 $MOCK; + wheelhouse_pip_install $NUMPY $PANDAS; else - pip install $PRE python-dateutil $NUMPY pyparsing!=2.0.4 pillow sphinx!=1.3.0; + pip install $PRE $NUMPY $PANDAS; fi # Always install from pypi - - pip install $PRE pep8 cycler coveralls coverage + - pip install $PRE pep8 cycler coveralls coverage python-dateutil pyparsing!=2.0.4 pillow sphinx!=1.3.0 $MOCK - 'pip install git+https://github.com/jenshnielsen/nose.git@matplotlibnose' # We manually install humor sans using the package from Ubuntu 14.10. Unfortunatly humor sans is not From 81f795f3ee2499478f2434808f8ec11ae8e0f083 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sun, 17 Jan 2016 17:14:36 +0000 Subject: [PATCH 2/8] Unify install section of travis file --- .travis.yml | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9ff25ed80d6c..85a8276f7e87 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,31 +62,30 @@ before_install: - export PATH=/usr/lib/ccache:$PATH install: - - ccache -s - # Upgrade pip and setuptools. Mock has issues with the default version of - # setuptools - | + ccache -s + # Upgrade pip and setuptools and wheel to get as clean an install as possible pip install --upgrade pip pip install --upgrade wheel pip install --upgrade setuptools - # Install only from travis wheelhouse - - if [ -z "$PRE" ]; then + # Install only from travis wheelhouse + if [ -z "$PRE" ]; then wheelhouse_pip_install $NUMPY $PANDAS; else pip install $PRE $NUMPY $PANDAS; fi - # Always install from pypi - - pip install $PRE pep8 cycler coveralls coverage python-dateutil pyparsing!=2.0.4 pillow sphinx!=1.3.0 $MOCK - - 'pip install git+https://github.com/jenshnielsen/nose.git@matplotlibnose' + # Always install from pypi + pip install $PRE pep8 cycler coveralls coverage python-dateutil pyparsing!=2.0.4 + pip install pillow sphinx!=1.3.0 $MOCK numpydoc ipython colorspacious + # Install nose from a build which has partial + # support for python36 and suport for coverage output suppressing + pip install git+https://github.com/jenshnielsen/nose.git@matplotlibnose - # We manually install humor sans using the package from Ubuntu 14.10. Unfortunatly humor sans is not - # availible in the Ubuntu version used by Travis but we can manually install the deb from a later - # version since is it basically just a .ttf file - # The current Travis Ubuntu image is to old to search .local/share/fonts so we store fonts in .fonts - - - | + # We manually install humor sans using the package from Ubuntu 14.10. Unfortunatly humor sans is not + # availible in the Ubuntu version used by Travis but we can manually install the deb from a later + # version since is it basically just a .ttf file + # The current Travis Ubuntu image is to old to search .local/share/fonts so we store fonts in .fonts if [[ $BUILD_DOCS == true ]]; then - pip install $PRE numpydoc ipython colorspacious wget https://github.com/google/fonts/blob/master/ofl/felipa/Felipa-Regular.ttf?raw=true -O Felipa-Regular.ttf wget http://mirrors.kernel.org/ubuntu/pool/universe/f/fonts-humor-sans/fonts-humor-sans_1.0-1_all.deb mkdir -p tmp @@ -99,8 +98,7 @@ install: # Use the special local version of freetype for testing cp ci/travis/setup.cfg . fi; - - - pip install -e . + pip install -e . script: # The number of processes is hardcoded, because using too many causes the From bd08e4c972aeec05d3cdb18dc51620c7a2a380a5 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sun, 17 Jan 2016 17:15:17 +0000 Subject: [PATCH 3/8] Cleanup Yaml syntax in script section: --- .travis.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 85a8276f7e87..1ce690bd79d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -104,9 +104,9 @@ script: # The number of processes is hardcoded, because using too many causes the # Travis VM to run out of memory (since so many copies of inkscape and # ghostscript are running at the same time). - - echo Testing using $NPROC processes - - echo The following args are passed to nose $NOSE_ARGS - | + echo Testing using $NPROC processes + echo The following args are passed to nose $NOSE_ARGS if [[ $BUILD_DOCS == false ]]; then export MPL_REPO_DIR=$PWD # needed for pep8-conformance test of the examples gdb -return-child-result -batch -ex r -ex bt --args python tests.py $NOSE_ARGS $TEST_ARGS @@ -122,16 +122,16 @@ script: fi after_failure: - | - if [[ $BUILD_DOCS == false && $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' ]]; then - gem install travis-artifacts - cd $TRAVIS_BUILD_DIR/../tmp_test_dir - tar cjf result_images.tar.bz2 result_images - travis-artifacts upload --path result_images.tar.bz2 - echo https://s3.amazonaws.com/matplotlib-test-results/artifacts/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/result_images.tar.bz2 - else - echo "The result images will only be uploaded if they are on the matplotlib/matplotlib repo - this is for security reasons to prevent arbitrary PRs echoing security details." - fi + - | + if [[ $BUILD_DOCS == false && $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' ]]; then + gem install travis-artifacts + cd $TRAVIS_BUILD_DIR/../tmp_test_dir + tar cjf result_images.tar.bz2 result_images + travis-artifacts upload --path result_images.tar.bz2 + echo https://s3.amazonaws.com/matplotlib-test-results/artifacts/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/result_images.tar.bz2 + else + echo "The result images will only be uploaded if they are on the matplotlib/matplotlib repo - this is for security reasons to prevent arbitrary PRs echoing security details." + fi after_success: | From 1d582bc05a54dcccf7760803aa7fc3abdf7699cd Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sun, 17 Jan 2016 17:18:24 +0000 Subject: [PATCH 4/8] Cleanup Yaml syntax in after section: --- .travis.yml | 62 ++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1ce690bd79d1..cb65815c9242 100644 --- a/.travis.yml +++ b/.travis.yml @@ -134,33 +134,33 @@ after_failure: fi after_success: - | - if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' && $BUILD_DOCS == true && $TRAVIS_BRANCH == 'master' ]]; then - cd $TRAVIS_BUILD_DIR - echo "Uploading documentation" - openssl aes-256-cbc -K $encrypted_cc802e084cd0_key -iv $encrypted_cc802e084cd0_iv -in ci/travis/matplotlibDeployKey.enc -out ci/travis/matplotlibDeployKey -d - eval `ssh-agent -s` - chmod 600 ci/travis/matplotlibDeployKey - ssh-add ci/travis/matplotlibDeployKey - cd .. - git clone git@github.com:matplotlib/devdocs.git - cd devdocs - git checkout --orphan gh-pages - git reset --hard first_commit - cp -R ../matplotlib/doc/build/html/. . - touch .nojekyll - git config --global user.email "MatplotlibTravisBot@nomail" - git config --global user.name "MatplotlibTravisBot" - git config --global push.default simple - git add . - git commit -m "Docs build of $TRAVIS_COMMIT" - git push --set-upstream origin gh-pages --force - else - echo "Will only deploy docs build from matplotlib master branch" - fi - if [[ $TRAVIS_PULL_REQUEST == false ]] && \ - [[ $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' ]] && \ - [[ $TRAVIS_BRANCH == 'master' ]]; then + - | + if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' && $BUILD_DOCS == true && $TRAVIS_BRANCH == 'master' ]]; then + cd $TRAVIS_BUILD_DIR + echo "Uploading documentation" + openssl aes-256-cbc -K $encrypted_cc802e084cd0_key -iv $encrypted_cc802e084cd0_iv -in ci/travis/matplotlibDeployKey.enc -out ci/travis/matplotlibDeployKey -d + eval `ssh-agent -s` + chmod 600 ci/travis/matplotlibDeployKey + ssh-add ci/travis/matplotlibDeployKey + cd .. + git clone git@github.com:matplotlib/devdocs.git + cd devdocs + git checkout --orphan gh-pages + git reset --hard first_commit + cp -R ../matplotlib/doc/build/html/. . + touch .nojekyll + git config --global user.email "MatplotlibTravisBot@nomail" + git config --global user.name "MatplotlibTravisBot" + git config --global push.default simple + git add . + git commit -m "Docs build of $TRAVIS_COMMIT" + git push --set-upstream origin gh-pages --force + else + echo "Will only deploy docs build from matplotlib master branch" + fi + if [[ $TRAVIS_PULL_REQUEST == false ]] && \ + [[ $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' ]] && \ + [[ $TRAVIS_BRANCH == 'master' ]]; then cd $TRAVIS_BUILD_DIR python ci/travis/travis_after_all.py export $(cat .to_export_back) @@ -172,7 +172,7 @@ after_success: echo "Some Failed; no OSX build" fi fi - fi - if [[ $NOSE_ARGS="--with-coverage" ]]; then - coveralls - fi + fi + if [[ $NOSE_ARGS="--with-coverage" ]]; then + coveralls + fi From dbfbb3d0e147b639dd6e73bb6c0a5e47773b57fc Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sun, 17 Jan 2016 17:22:05 +0000 Subject: [PATCH 5/8] Upgrade pip before installing link checker --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index cb65815c9242..f35c464b95ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -115,8 +115,10 @@ script: python make.py html --small --warningsaserrors # We don't build the LaTeX docs here, so linkchecker will complain touch build/html/Matplotlib.pdf + # Linkchecker only works with python 2.7 for the time being deactivate source ~/virtualenv/python2.7/bin/activate + pip install pip --upgrade pip install linkchecker linkchecker build/html/index.html fi From 7c9eeed667dd336a88893e9014fc7fca586b219b Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sun, 17 Jan 2016 17:32:54 +0000 Subject: [PATCH 6/8] Split install into meaningfull sections --- .travis.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index f35c464b95ea..7743018b5a68 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,23 +55,28 @@ matrix: - python: "nightly" before_install: - - source ci/travis/travis_tools.sh - # Install into our own pristine virtualenv - - virtualenv --python=python venv - - source venv/bin/activate - - export PATH=/usr/lib/ccache:$PATH + - | + # Install into our own pristine virtualenv + source ci/travis/travis_tools.sh + virtualenv --python=python venv + source venv/bin/activate + export PATH=/usr/lib/ccache:$PATH install: - | + # Setup environment ccache -s # Upgrade pip and setuptools and wheel to get as clean an install as possible pip install --upgrade pip pip install --upgrade wheel pip install --upgrade setuptools - # Install only from travis wheelhouse + - | + # Install dependencies if [ -z "$PRE" ]; then + # Install only from travis wheelhouse wheelhouse_pip_install $NUMPY $PANDAS; else + # Fall back to pypi for non suported python versions pip install $PRE $NUMPY $PANDAS; fi # Always install from pypi @@ -98,6 +103,8 @@ install: # Use the special local version of freetype for testing cp ci/travis/setup.cfg . fi; + - | + # Install matplotlib pip install -e . script: From 0ccce1b218c08634ceaedb975b15ba663c6a2922 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sun, 17 Jan 2016 22:01:07 +0000 Subject: [PATCH 7/8] Convert docstring to numpy doc to work around sphinx issue --- lib/matplotlib/patches.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index 666b8954ebd2..d864ccf32770 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -3011,15 +3011,21 @@ class Bar(_Base): def __init__(self, armA=0., armB=0., fraction=0.3, angle=None): """ - *armA* : minimum length of armA + Parameters + ---------- + armA : float + minimum length of armA - *armB* : minimum length of armB + armB : float + minimum length of armB - *fraction* : a fraction of the distance between two points that - will be added to armA and armB. + fraction : float + a fraction of the distance between two points that + will be added to armA and armB. - *angle* : angle of the connecting line (if None, parallel to A - and B) + angle : float or None + angle of the connecting line (if None, parallel + to A and B) """ self.armA = armA self.armB = armB From 7f3744397ac5728a8b99c58de29219bad67cb134 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sun, 17 Jan 2016 22:25:05 +0000 Subject: [PATCH 8/8] Remove :option: which seems to serve no purpose and raises a warning with sphinx 1.3.4 --- lib/matplotlib/dviread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/dviread.py b/lib/matplotlib/dviread.py index 665f301f1013..695e3ea9d10d 100644 --- a/lib/matplotlib/dviread.py +++ b/lib/matplotlib/dviread.py @@ -958,7 +958,7 @@ def find_tex_file(filename, format=None): """ Call :program:`kpsewhich` to find a file in the texmf tree. If *format* is not None, it is used as the value for the - :option:`--format` option. + `--format` option. Apparently most existing TeX distributions on Unix-like systems use kpathsea. I hear MikTeX (a popular distribution on Windows)