Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/kmuehlbauer/wradlib
Browse files Browse the repository at this point in the history
  • Loading branch information
kmuehlbauer committed Feb 23, 2016
2 parents 6f1a5d0 + 4f37374 commit db40ae3
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .coveragerc
@@ -0,0 +1,5 @@
[run]
source = wradlib
omit =
*/setup.py
*/tests*
38 changes: 38 additions & 0 deletions .travis.yml
@@ -0,0 +1,38 @@
# run on container-based infrastructure
sudo: false

language: python

addons:
apt:
packages:
- gfortran

env:
global:
# wradlib-docs
- secure: "IGK2D/g89w2J2bJomtPTL2UT6SXlyUV+QfoQZP9MCUDQZI3tRddL2M0YYIO5WegUhPDYuCaQDqZCc03tF+UedZgMhyCAsAQWY8Kgt5cC8EXdj4AEs0L5FHB0yuPkOJhJX2cGezKTMjqFfF7pFQWxYmEK3zFzz/8pVBPa7jPkRn2U0ZlWp3v+vO5WbTYgkFdnYSH6+yTnRbnLHmOTbPg62G75mkDU9/RCCZ4a4oKmz40RKIhroSFQtw8HK4UbwVLQsoE06/iL0Q8dbT0o63W1liXcwUbqoljIBHq2i8RVHB1GrtMFIzY40mgIHVOtlJuw6pg0bNaawTGp3wBIfAdk2sCeKLoX5bPsCewed8Bo+kkYdF4TT8mHJVwPHaKjZ0grhavcboHcgC6+ddUS+4TrS9ZKlFyd87EIhCnqdW4X3n665QM8foP7sB6B+hRYrQFneAoHpuif4ea3/wuk//J8Wd5HlVROkd/1Fxqika0KmDNUH5cH1cvIAa2D37MKCf3nKGe/sCBB/TZBkwcmXl1Q4JA+PWzuC6QSc6qWrKZGiqgvPJKKczto5j1hssUh0tBTO9FM5kue/33TvTq1Hkk1tPfl0e4VFmz3BvlLXKLTDpGF+cPn09irINoZJooA3andBjTynwWDYMbtXDQJ4YwCJXyS3N6yAAyaO8pGV23W3aQ="

matrix:
include:
- python: 2.7
env:
- PYTHON_VERSION="2.7"
- COVERALLS="true"
- DOC_BUILD="true"
- python: 3.4
env:
- PYTHON_VERSION="3.4"
- python: 3.5
env:
- PYTHON_VERSION="3.5"

install: source scripts/install.sh

script:
- export GDAL_DATA=/home/travis/miniconda2/envs/wradlib/share/gdal
- xvfb-run coverage run --source wradlib testrunner.py -a

after_success:
- if [[ "$COVERALLS" == "true" ]]; then coveralls || echo "failed"; fi
- if [[ "$DOC_BUILD" == "true" ]]; then cd $TRAVIS_BUILD_DIR; scripts/build_docs.sh; fi
33 changes: 33 additions & 0 deletions scripts/build_docs.sh
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
# Adapted from the continuous_integration/build_docs.sh file from the pyart project
# https://github.com/ARM-DOE/pyart/
set -e

cd "$TRAVIS_BUILD_DIR"

echo "Building Docs"

#mv "$TRAVIS_BUILD_DIR"/doc /tmp
sphinx-build -b html doc/source doc-build

# upload to wradlib-docs repo if this is not a pull request and
# secure token is available.
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ $TRAVIS_SECURE_ENV_VARS == 'true' ]; then
cd doc-build
git config --global user.email "wradlib-docs@example.com"
git config --global user.name "wradlib-docs"

git init
touch README
git add README
git commit -m "Initial commit" --allow-empty
git branch gh-pages
git checkout gh-pages
touch .nojekyll
git add --all .
git commit -m "Version" --allow-empty
git remote add origin https://$GH_TOKEN@github.com/wradlib/wradlib-docs.git &> /dev/null
git push origin gh-pages -fq &> /dev/null
fi

exit 0
30 changes: 30 additions & 0 deletions scripts/install.sh
@@ -0,0 +1,30 @@
#!/bin/bash

wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh \
-O miniconda.sh
chmod +x miniconda.sh
./miniconda.sh -b
export PATH=/home/travis/miniconda2/bin:$PATH
conda update --yes conda
conda update --yes conda

# Create a testenv with the correct Python version
conda create -n wradlib --yes pip python=$PYTHON_VERSION
source activate wradlib

# Install wradlib dependencies
conda install --yes numpy scipy matplotlib netcdf4 proj4

conda install --yes sphinx gdal numpydoc h5py geos
ls -lart /home/travis/miniconda2/envs/wradlib/share/gdal
conda install --yes sphinx_rtd_theme
pip install sphinxcontrib-bibtex
pip install xmltodict

# install coverage modules
pip install coverage
if [[ "$COVERALLS" == "true" ]]; then
pip install python-coveralls
fi

python setup.py install
6 changes: 4 additions & 2 deletions wradlib/vis.py
Expand Up @@ -41,6 +41,8 @@

# site packages
import numpy as np
import pylab as pl
import matplotlib
import matplotlib as mpl
import matplotlib.pyplot as pl
from matplotlib import patches
Expand Down Expand Up @@ -555,7 +557,7 @@ def create_cg(st, fig=None, subplot=111):

if st == 'RHI':
# create transformation
tr = Affine2D().scale(np.pi / 180, 1.) + PolarAxes.PolarTransform()
tr = Affine2D().scale(np.pi / 180, 1) + PolarAxes.PolarTransform()

# build up curvelinear grid
extreme_finder = angle_helper.ExtremeFinderCycle(20, 20,
Expand Down Expand Up @@ -597,7 +599,7 @@ def create_cg(st, fig=None, subplot=111):
)

# locator and formatter for angle annotation
grid_locator1 = FixedLocator([i for i in np.arange(0, 350, 10, dtype=np.int32)])
grid_locator1 = FixedLocator([i for i in np.arange(0, 359, 10)])
grid_locator1 = angle_helper.LocatorDMS(35)
tick_formatter1 = angle_helper.FormatterDMS()

Expand Down

0 comments on commit db40ae3

Please sign in to comment.