[Git][debian-gis-team/pyresample][upstream] New upstream version 1.9.0

Antonio Valentino gitlab at salsa.debian.org
Sat Apr 28 09:28:02 BST 2018


Antonio Valentino pushed to branch upstream at Debian GIS Project / pyresample


Commits:
2a28761a by Antonio Valentino at 2018-04-28T07:21:56+00:00
New upstream version 1.9.0
- - - - -


21 changed files:

- .bumpversion.cfg
- .github/ISSUE_TEMPLATE.md
- .github/PULL_REQUEST_TEMPLATE.md
- .travis.yml
- README.md
- appveyor.yml
- − appveyor/install.ps1
- − appveyor/run_with_compiler.cmd
- changelog.rst
- + docs/source/_static/images/viirs_i04_cartopy.png
- docs/source/plot.rst
- pyresample/__init__.py
- + pyresample/_cartopy.py
- pyresample/geometry.py
- pyresample/kd_tree.py
- pyresample/plot.py
- pyresample/test/test_geometry.py
- pyresample/test/test_kd_tree.py
- pyresample/test/test_plot.py
- pyresample/version.py
- setup.py


Changes:

=====================================
.bumpversion.cfg
=====================================
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 1.8.3
+current_version = 1.9.0
 commit = True
 tag = True
 


=====================================
.github/ISSUE_TEMPLATE.md
=====================================
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -15,4 +15,4 @@ expected output is a better solution.]
 
 #### Versions of Python, package at hand and relevant dependencies
 
-Thank you for reporting an issue !
+<!-- Thank you for reporting an issue ! -->


=====================================
.github/PULL_REQUEST_TEMPLATE.md
=====================================
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,7 +1,7 @@
-Please make the PR against the `develop` branch.
+<!-- Please make the PR against the `develop` branch. -->
 
- - [ ] Closes #xxxx (remove if there is no corresponding issue, which should only be the case for minor changes)
- - [ ] Tests added (for all bug fixes or enhancements)
- - [ ] Tests passed (for all non-documentation changes)
- - [ ] Passes ``git diff origin/develop **/*py | flake8 --diff`` (remove if you did not edit any Python files)
- - [ ] Fully documented (remove if this change should not be visible to users, e.g., if it is an internal clean-up, or if this is part of a larger project that will be documented later)
+ - [ ] Closes #xxxx <!-- remove if there is no corresponding issue, which should only be the case for minor changes -->
+ - [ ] Tests added <!-- for all bug fixes or enhancements -->
+ - [ ] Tests passed <!-- for all non-documentation changes -->
+ - [ ] Passes ``git diff origin/develop **/*py | flake8 --diff`` <!-- remove if you did not edit any Python files  -->
+ - [ ] Fully documented <!-- remove if this change should not be visible to users, e.g., if it is an internal clean-up, or if this is part of a larger project that will be documented later -->


=====================================
.travis.yml
=====================================
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,33 +1,23 @@
 language: python
 python:
 - '2.7'
-- '3.4'
-- '3.5'
 - '3.6'
-before_install:
-- sudo add-apt-repository ppa:ubuntugis/ppa -y
-- sudo apt-get update -qq
-- sudo apt-get install libfreetype6-dev
-- sudo apt-get install libgeos-dev
+env:
+    global:
+        # Set defaults to avoid repeating in most cases
+        - PYTHON_VERSION=$TRAVIS_PYTHON_VERSION
+        - NUMPY_VERSION=stable
+        - MAIN_CMD='python setup.py'
+        - CONDA_DEPENDENCIES='xarray dask toolz Cython pykdtree sphinx cartopy pillow matplotlib basemap pyyaml pyproj coveralls configobj coverage'
+        - SETUP_XVFB=False
+        - EVENT_TYPE='push pull_request'
+        - SETUP_CMD='test'
+        - CONDA_CHANNELS='conda-forge'
 install:
-# matplotlib 2.1.0 has a bug that causes plotting masked arrays to fail
-# https://github.com/matplotlib/matplotlib/issues/9280
-- if [[ $TRAVIS_PYTHON_VERSION == "2.7" ]]; then pip install "matplotlib>=1.5.0,!=2.1.0"; fi
-- if [[ $TRAVIS_PYTHON_VERSION == "2.7" ]]; then pip install "sphinx>=1.5.0"; fi
-- if [[ $TRAVIS_PYTHON_VERSION == "3.4" ]]; then pip install "matplotlib>=1.5.0,!=2.1.0"; fi
-- if [[ $TRAVIS_PYTHON_VERSION == "3.4" ]]; then pip install "sphinx>=1.5.0"; fi
-- if [[ $TRAVIS_PYTHON_VERSION == "3.5" ]]; then pip install "matplotlib>=1.5.0,!=2.1.0"; fi
-- if [[ $TRAVIS_PYTHON_VERSION == "3.5" ]]; then pip install "sphinx>=1.5.0"; fi
-- if [[ $TRAVIS_PYTHON_VERSION == "3.6" ]]; then pip install "matplotlib>=1.5.0,!=2.1.0"; fi
-- if [[ $TRAVIS_PYTHON_VERSION == "3.6" ]]; then pip install "sphinx>=1.5.0"; fi
-- pip install -r requirements.txt
-- pip install toolz
-- pip install dask
-- pip install xarray
-- pip install -e ".[pykdtree,quicklook]"
-- pip install coveralls
+    - git clone --depth 1 git://github.com/astropy/ci-helpers.git
+    - source ci-helpers/travis/setup_conda.sh
 script:
-- coverage run --source=pyresample setup.py test && cd docs && mkdir doctest && sphinx-build -E -n -b doctest ./source ./doctest && cd ..
+    - coverage run --source=pyresample setup.py test && cd docs && mkdir doctest && sphinx-build -E -n -b doctest ./source ./doctest && cd ..
 after_success: coveralls
 notifications:
   slack: pytroll:96mNSYSI1dBjGyzVXkBT6qFt


=====================================
README.md
=====================================
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
 [![Build Status](https://travis-ci.org/pytroll/pyresample.svg?branch=master)](https://travis-ci.org/pytroll/pyresample)
-[![Build status](https://ci.appveyor.com/api/projects/status/10qdrecp45rgkf73/branch/master?svg=true)](https://ci.appveyor.com/project/davidh-ssec/pyresample-ly2q0/branch/master)
+[![Build status](https://ci.appveyor.com/api/projects/status/a34o4utf8dqjsob1/branch/master?svg=true)](https://ci.appveyor.com/project/pytroll/pyresample/branch/master)
 
 
 Python package for geospatial resampling
@@ -13,29 +13,9 @@ Pyresample works with Numpy arrays including support for masked arrays.
 Support for parallel resampling using multiple processor cores.
 Plotting capablity using Basemap. As of v0.8.0 [pykdtree](https://github.com/storpipfugl/pykdtree) can be used to speed up processing.
 
-Pyresample is tested with Python 2.7, 3.4, 3.5, and 3.6.
-
-Note: For numpy >= 1.6.2 use pyresample >= 0.7.13  
+Pyresample is tested with Python 2.7 and 3.6, but should additionally work
+on Python 3.4+.
 
 [Documentation](https://pyresample.readthedocs.org/en/latest/)
 Look at [pytroll.org](http://pytroll.org/) for more information.
 
-
-===News===
-  * *2015-02-03*: Pyresample-1.1.3 released. Switch to LGPLv3.
-
-  * *2014-12-17*: Pyresample-1.1.2 released. Fix to allow tests to run on travis.
-
-  * *2014-12-10*: Pyresample-1.1.1 released. Wrapping of longitudes and latitudes is now implemented.
-
-  * *2013-10-23*: Pyresample-1.1.0 released. Added option for calculating uncertainties for weighted kd-tree resampling. From now on pyresample will adhere to [http://semver.org/ semantic versioning].
-
-  * *2013-07-03*: Pyresample-1.0.0 released. Minor API change to the geometry.py module as the boundary variable is removed and replaced by proj_x_coords and proj_y_coords. Caching scheme removed from projection coordinate calculation in geometry.py as it introduced excessive complications. The numexpr package is now used for minor bottleneck optimization if available. Version number bumped to 1.0.0 as pyresample has been running stable in production environments for several years now.
-   
-  * *2013-03-20*: Pyresample-0.8.0 released. Enables use of pykdtree. Fixes projection handling for 'latlong' projection.
-
-  * *2013-01-21*: Pyresample-0.7.13 released. Fixes numpy incompability introduced with numpy v1.6.2
-
-  * *2012-10-18*: Pyresample-0.7.12 released. Better integration with Basemap with support for plotting using globe projections (geos, ortho and nspere). Documentation updated with correct description of the epsilon parameter.
-
-  * *2012-07-03*: Pyresample-0.7.11 released. Support for plotting in Plate Carree projection and bugfixes for meridians and parallels in plots. Added utils.fwhm2sigma convenience function for use in Gauss resampling.   


=====================================
appveyor.yml
=====================================
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,74 +1,39 @@
 environment:
   global:
-    # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
-    # /E:ON and /V:ON options are not enabled in the batch script intepreter
-    # See: http://stackoverflow.com/a/13751649/163740
-    CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_compiler.cmd"
-  # Don't build pykdtree with openmp because it isn't supported in appveyor's compilers
+    PYTHON: "C:\\conda"
+    MINICONDA_VERSION: "latest"
+    CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci-helpers\\appveyor\\windows_sdk.cmd"
+    # Don't build pykdtree with openmp because it isn't supported in appveyor's compilers
     USE_OMP: "0"
+    CONDA_DEPENDENCIES: "xarray dask toolz Cython pykdtree sphinx cartopy pillow matplotlib pyyaml pyproj coveralls configobj coverage"
+    CONDA_CHANNELS: "conda-forge"
 
   matrix:
     - PYTHON: "C:\\Python27_32"
-      PYTHON_VERSION: "2.7.8"
+      PYTHON_VERSION: "2.7"
       PYTHON_ARCH: "32"
-      MINICONDA_VERSION: "2"
+      NUMPY_VERSION: "stable"
 
     - PYTHON: "C:\\Python27_64"
-      PYTHON_VERSION: "2.7.8"
+      PYTHON_VERSION: "2.7"
       PYTHON_ARCH: "64"
-      MINICONDA_VERSION: "2"
-
-    - PYTHON: "C:\\Python34_32"
-      PYTHON_VERSION: "3.4.1"
-      PYTHON_ARCH: "32"
-      MINICONDA_VERSION: "3"
-
-    - PYTHON: "C:\\Python34_64"
-      PYTHON_VERSION: "3.4.1"
-      PYTHON_ARCH: "64"
-      MINICONDA_VERSION: "3"
+      NUMPY_VERSION: "stable"
 
     - PYTHON: "C:\\Python36_32"
       PYTHON_VERSION: "3.6"
       PYTHON_ARCH: "32"
-      MINICONDA_VERSION: "3"
+      NUMPY_VERSION: "stable"
 
     - PYTHON: "C:\\Python36_64"
       PYTHON_VERSION: "3.6"
       PYTHON_ARCH: "64"
-      MINICONDA_VERSION: "3"
+      NUMPY_VERSION: "stable"
 
 install:
-  - "git submodule update --init --recursive"
-  - ECHO "Filesystem root:"
-  - ps: "ls \"C:/\""
-
-  - ECHO "Installed SDKs:"
-  - ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
-
-  # install miniconda with the powershell script install.ps1
-  - "powershell ./appveyor/install.ps1"
-
-  # Prepend newly installed Python to the PATH of this build (this cannot be
-  # done from inside the powershell script as it would require to restart
-  # the parent CMD process).
-  - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
-
-  # Check that we have the expected version and architecture for Python
-  - "python --version"
-  - "python -c \"import struct; print(struct.calcsize('P') * 8)\""
-
-  # Install the build dependencies of the project. If some dependencies contain
-  # compiled extensions and are not provided as pre-built wheel packages,
-  # pip will build them from source using the MSVC compiler matching the
-  # target Python version and architecture
-  - "conda update --yes conda"
-  - "conda config --add channels conda-forge"
-  - "conda create -q --yes -n test python=%PYTHON_VERSION% basemap-data-hires sphinx pyproj scipy pykdtree dask xarray"
-  - "activate test"
-  - "pip install coveralls"
-  - "pip install mock"
-  - "where python"
+    - "git clone --depth 1 git://github.com/astropy/ci-helpers.git"
+    - "powershell ci-helpers/appveyor/install-miniconda.ps1"
+    - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
+    - "activate test"
 
 build: false  # Not a C# project, build stuff at the test step instead.
 


=====================================
appveyor/install.ps1 deleted
=====================================
--- a/appveyor/install.ps1
+++ /dev/null
@@ -1,71 +0,0 @@
-# Sample script to install anaconda under windows
-# Authors: Stuart Mumford
-# Borrwed from: Olivier Grisel and Kyle Kastner
-# License: BSD 3 clause
-
-$MINICONDA_URL = "http://repo.continuum.io/miniconda/"
-
-function DownloadMiniconda ($miniconda_version, $platform_suffix) {
-    $webclient = New-Object System.Net.WebClient
-    $filename = "Miniconda" + $miniconda_version + "-latest" + "-Windows-" + $platform_suffix + ".exe"
-
-    $url = $MINICONDA_URL + $filename
-
-    $basedir = $pwd.Path + "\"
-    $filepath = $basedir + $filename
-    if (Test-Path $filename) {
-        Write-Host "Reusing" $filepath
-        return $filepath
-    }
-
-    # Download and retry up to 3 times in case of network transient errors.
-    Write-Host "Downloading" $filename "from" $url
-    $retry_attempts = 2
-    for($i=0; $i -lt $retry_attempts; $i++){
-        try {
-            $webclient.DownloadFile($url, $filepath)
-            break
-        }
-        Catch [Exception]{
-            Start-Sleep 1
-        }
-   }
-   if (Test-Path $filepath) {
-       Write-Host "File saved at" $filepath
-   } else {
-       # Retry once to get the error message if any at the last try
-       $webclient.DownloadFile($url, $filepath)
-   }
-   return $filepath
-}
-
-function InstallMiniconda ($miniconda_version, $architecture, $python_home) {
-    Write-Host "Installing miniconda" $miniconda_version "for" $architecture "bit architecture to" $python_home
-    if (Test-Path $python_home) {
-        Write-Host $python_home "already exists, skipping."
-        return $false
-    }
-    if ($architecture -eq "32") {
-        $platform_suffix = "x86"
-    } else {
-        $platform_suffix = "x86_64"
-    }
-    $filepath = DownloadMiniconda $miniconda_version $platform_suffix
-    Write-Host "Installing" $filepath "to" $python_home
-    $args = "/InstallationType=AllUsers /S /AddToPath=1 /RegisterPython=1 /D=" + $python_home
-    Write-Host $filepath $args
-    Start-Process -FilePath $filepath -ArgumentList $args -Wait -Passthru
-    #Start-Sleep -s 15
-    if (Test-Path $python_home) {
-        Write-Host "Miniconda $miniconda_version ($architecture) installation complete"
-    } else {
-        Write-Host "Failed to install Python in $python_home"
-        Exit 1
-    }
-}
-
-function main () {
-    InstallMiniconda $env:MINICONDA_VERSION $env:PYTHON_ARCH $env:PYTHON
-}
-
-main


=====================================
appveyor/run_with_compiler.cmd deleted
=====================================
--- a/appveyor/run_with_compiler.cmd
+++ /dev/null
@@ -1,60 +0,0 @@
-:: To build extensions for 64 bit Python 3, we need to configure environment
-:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
-:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1)
-::
-:: To build extensions for 64 bit Python 2, we need to configure environment
-:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
-:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
-::
-:: 32 bit builds do not require specific environment configurations.
-::
-:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
-:: cmd interpreter, at least for (SDK v7.0)
-::
-:: More details at:
-:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
-:: http://stackoverflow.com/a/13751649/163740
-::
-:: Author: Olivier Grisel
-:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
- at ECHO OFF
-
-SET COMMAND_TO_RUN=%*
-SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
-
-SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%"
-SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,1%
-IF %MAJOR_PYTHON_VERSION% == "2" (
-    SET WINDOWS_SDK_VERSION="v7.0"
-    SET SET_SDK_64=Y
-) ELSE IF %MAJOR_PYTHON_VERSION% == "3" (
-    SET WINDOWS_SDK_VERSION="v7.1"
-    IF %MINOR_PYTHON_VERSION% LEQ 4 (
-        SET SET_SDK_64=Y
-    ) ELSE (
-        SET SET_SDK_64=N
-    )
-) ELSE (
-    ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
-    EXIT 1
-)
-
-IF "%PYTHON_ARCH%"=="64" (
-    IF %SET_SDK_64% == Y (
-        ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture
-        SET DISTUTILS_USE_SDK=1
-        SET MSSdk=1
-        "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
-        "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
-        ECHO Executing: %COMMAND_TO_RUN%
-        call %COMMAND_TO_RUN% || EXIT 1
-    )  ELSE (
-        ECHO Using default MSVC build environment for 64 bit architecture
-        ECHO Executing: %COMMAND_TO_RUN%
-        call %COMMAND_TO_RUN% || EXIT 1
-    )
-  ) ELSE (
-      ECHO Using default MSVC build environment for 32 bit architecture
-      ECHO Executing: %COMMAND_TO_RUN%
-      call %COMMAND_TO_RUN% || EXIT 1
-)


=====================================
changelog.rst
=====================================
--- a/changelog.rst
+++ b/changelog.rst
@@ -2,6 +2,62 @@ Changelog
 =========
 
 
+v1.9.0 (2018-04-27)
+-------------------
+- update changelog. [Martin Raspaud]
+- Bump version: 1.8.3 → 1.9.0. [Martin Raspaud]
+- Merge pull request #114 from pytroll/feature-hash-update. [Martin
+  Raspaud]
+
+  Implement Deterministic hashing
+- Fix __hash__ inheritance block in python 3. [Martin Raspaud]
+- Add the hash attribute to all definitions. [Martin Raspaud]
+- Add the update_hash method, centralize __hash__ [Martin Raspaud]
+- Merge pull request #102 from pytroll/feature-cartopy-convert. [David
+  Hoese]
+
+  Add cartopy conversion method to AreaDefinition
+- Add license and copyright to plot and test_plot. [davidh-ssec]
+- Update appveyor badge to point to new project. [davidh-ssec]
+- Fix line too long. [davidh-ssec]
+- Merge branch 'develop' into feature-cartopy-convert. [davidh-ssec]
+
+  # Conflicts:
+  #	appveyor.yml
+  #	pyresample/__init__.py
+  #	pyresample/geometry.py
+  #	pyresample/kd_tree.py
+
+- Merge pull request #109 from pytroll/feature-better-omerc-azimuth.
+  [Martin Raspaud]
+
+  Make azimuth angle for omerc dynamic areas more robust
+- Fix tests for new omerc parameters computation. [Martin Raspaud]
+- Take care of azimuth flipping in omerc parameter computation. [Martin
+  Raspaud]
+- Take care of small omerc azimuth angles. [Martin Raspaud]
+- Use no_rot for better 2-point omerc fitting. [Martin Raspaud]
+- Make azimuth angle for omerc dynamic areas more robust. [Martin
+  Raspaud]
+- Add basemap to travis for doctests. [davidh-ssec]
+- Remove appveyor unused scripts. [davidh-ssec]
+- Fix conda dependencies on travis and switch to ci-helpers for
+  appveyor. [davidh-ssec]
+- Add missing coverage dependency to travis CI. [davidh-ssec]
+- Use conda for travis tests. [davidh-ssec]
+- Update github templates. [davidh-ssec]
+- Fix flake8 issues. [davidh-ssec]
+- Add basemap quicklook generation back in as a fallback. [davidh-ssec]
+- Install proj libraries binaries for cartopy. [davidh-ssec]
+- Remove python 3.4 and 3.5 from CI tests. [davidh-ssec]
+- Add simple cartopy conversion test. [davidh-ssec]
+- Skip basemap tests if basemap isn't available. [davidh-ssec]
+- Switch quicklook to use cartopy instead of basemap. [davidh-ssec]
+- Replace quicklook functionality with cartopy. [davidh-ssec]
+- Update documentation to include cartopy example. [davidh-ssec]
+- Add cartopy conversion method to AreaDefinition. [davidh-ssec]
+
+
 v1.8.3 (2018-03-19)
 -------------------
 - update changelog. [Martin Raspaud]


=====================================
docs/source/_static/images/viirs_i04_cartopy.png
=====================================
Binary files /dev/null and b/docs/source/_static/images/viirs_i04_cartopy.png differ


=====================================
docs/source/plot.rst
=====================================
--- a/docs/source/plot.rst
+++ b/docs/source/plot.rst
@@ -1,14 +1,17 @@
 .. _plot:
 
-Plotting with pyresample and Basemap
+Plotting with pyresample and Cartopy
 ====================================
-Pyresample supports basic integration with Basemap (http://matplotlib.sourceforge.net/basemap).
+
+Pyresample supports basic integration with Cartopy
+(http://scitools.org.uk/cartopy/).
 
 Displaying data quickly
 -----------------------
-Pyresample has some convenience functions for displaying data from a single channel. 
-The function **plot.show_quicklook** shows a Basemap image of a dataset for a specified AreaDefinition.
-The function **plot.save_quicklook** saves the Basemap image directly to file.
+Pyresample has some convenience functions for displaying data from a single
+channel. The function **plot.show_quicklook** shows a Cartopy generated image
+of a dataset for a specified AreaDefinition. The function
+**plot.save_quicklook** saves the Cartopy image directly to file.
 
 **Example usage:**
 
@@ -66,8 +69,11 @@ Assuming **lons**, **lats** and **tb37v** are initialized with real data the res
 
 The Globe projections
 +++++++++++++++++++++
-From v0.7.12 pyresample can use the geos, ortho and nsper projections with Basemap.
-Assuming the file **areas.cfg** has the following area definition for an ortho projection area:
+
+From v0.7.12 pyresample can use the geos, ortho and nsper projections with
+Basemap. Starting with v1.9.0 quicklooks are now generated with Cartopy which
+should also work with these projections. Assuming the file **areas.cfg** has
+the following area definition for an ortho projection area:
 
 .. code-block:: bash
 
@@ -97,10 +103,52 @@ Assuming **lons**, **lats** and **tb37v** are initialized with real data the res
   .. image:: _static/images/tb37v_ortho.png
 
 
+Getting a Cartopy CRS
+---------------------
+
+To make more advanced plots than the preconfigured quicklooks Cartopy can be
+used to work with mapped data alongside matplotlib. The below code is based
+on
+`this <http://scitools.org.uk/cartopy/docs/v0.16/gallery/geostationary.html>`_
+Cartopy example. Pyresample allows any `AreaDefinition` to be converted to a
+Cartopy CRS as long as Cartopy can represent the projection. Once an
+AreaDefinition is converted to a CRS object it can be used like any other
+Cartopy CRS object.
+
+ >>> import numpy as np
+ >>> import matplotlib.pyplot as plt
+ >>> from pyresample import load_area, save_quicklook, SwathDefinition
+ >>> from pyresample.kd_tree import resample_nearest
+ >>> lons = np.zeros(1000)
+ >>> lats = np.arange(-80, -90, -0.01)
+ >>> i04_data = np.arange(1000)
+ >>> swath_def = SwathDefinition(lons, lats)
+ >>> area_def = swath_def.compute_optimal_bb_area({'proj': 'lcc', 'lon_0': -95., 'lat_0': 25., 'lat_1': 25., 'lat_2': 25.})
+ >>> result = resample_nearest(swath_def, i04_data, area_def,
+ ...                           radius_of_influence=20000, fill_value=None)
+ >>> crs = area_def.to_cartopy_crs()
+ >>> ax = plt.axes(projection=crs)
+ >>> ax.coastlines()
+ >>> ax.set_global()
+ >>> plt.imshow(data, transform=crs, extent=crs.bounds, origin='upper')
+ >>> plt.colorbar()
+ >>> plt.savefig('viirs_i04_cartopy.png')
+
+Assuming **lons**, **lats**, and **i04_data** are initialized with real data
+the result might look something like this:
+
+  .. image:: _static/images/viirs_i04_cartopy.png
+
 Getting a Basemap object
 ------------------------
+
+.. warning::
+
+    Basemap is no longer maintained. Cartopy (see above) should be used
+    instead.
+
 In order to make more advanced plots than the preconfigured quicklooks a Basemap object can be generated from an
-AreaDefintion using the **plot.area_def2basemap(area_def, **kwargs)** function.
+AreaDefinition using the **plot.area_def2basemap(area_def, **kwargs)** function.
 
 **Example usage:**
 
@@ -129,17 +177,3 @@ Any keyword arguments (not concerning the projection) passed to **plot.area_def2
 directly to the Basemap initialization.
 
 For more information on how to plot with Basemap please refer to the Basemap and matplotlib documentation.
-
-Limitations
------------
-The pyresample use of Basemap is basically a conversion from a pyresample AreaDefintion to a Basemap object
-which allows for correct plotting of a resampled dataset using the **basemap.imshow** function.
-
-Currently only the following set of Proj.4 arguments can be interpreted in the conversion: 
-{'proj', 'a', 'b', 'ellps', 'lon_0', 'lat_0', 'lon_1', 'lat_1', 'lon_2', 'lat_2', 'lat_ts'}
-
-Any other Proj.4 parameters will be ignored. 
-If the ellipsoid is not defined in terms of 'ellps', 'a' or ('a', 'b') it will default to WGS84.
-
-The xsize and ysize in an AreaDefinition will only be used during resampling when the image data for use in
-**basemap.imshow** is created. The actual size and shape of the final plot is handled by matplotlib.


=====================================
pyresample/__init__.py
=====================================
--- a/pyresample/__init__.py
+++ b/pyresample/__init__.py
@@ -19,6 +19,7 @@ import os
 
 CHUNK_SIZE = int(os.getenv('PYTROLL_CHUNK_SIZE', 4096))
 
+from pyresample.version import __version__  # noqa
 # Backwards compatibility
 from pyresample import geometry  # noqa
 from pyresample import grid  # noqa


=====================================
pyresample/_cartopy.py
=====================================
--- /dev/null
+++ b/pyresample/_cartopy.py
@@ -0,0 +1,112 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2018 PyTroll developers
+#
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Lesser General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+"""Classes for geometry operations"""
+
+from logging import getLogger
+import warnings
+import numpy as np
+
+try:
+    from xarray import DataArray
+except ImportError:
+    DataArray = np.ndarray
+
+from pyresample.utils import proj4_str_to_dict
+import cartopy.crs as ccrs
+import shapely.geometry as sgeom
+
+try:
+    from cartopy.crs import from_proj
+except ImportError:
+    warnings.warn("'cartopy' >= 0.17 required for better 'from_proj' "
+                  "functionality.")
+    from_proj = None
+
+logger = getLogger(__name__)
+
+_GLOBE_PARAMS = {'datum': 'datum',
+                 'ellps': 'ellipse',
+                 'a': 'semimajor_axis',
+                 'b': 'semiminor_axis',
+                 'f': 'flattening',
+                 'rf': 'inverse_flattening',
+                 'towgs84': 'towgs84',
+                 'nadgrids': 'nadgrids'}
+
+
+def _globe_from_proj4(proj4_terms):
+    """Create a `Globe` object from PROJ.4 parameters."""
+    globe_terms = filter(lambda term: term[0] in _GLOBE_PARAMS,
+                         proj4_terms.items())
+    globe = ccrs.Globe(**{_GLOBE_PARAMS[name]: value for name, value in
+                          globe_terms})
+    return globe
+
+
+# copy of class in cartopy (before it was released)
+class _PROJ4Projection(ccrs.Projection):
+    def __init__(self, proj4_terms, globe=None, bounds=None):
+        terms = proj4_str_to_dict(proj4_terms)
+        globe = _globe_from_proj4(terms) if globe is None else globe
+
+        other_terms = []
+        for term in terms.items():
+            if term[0] not in _GLOBE_PARAMS:
+                other_terms.append(term)
+        super(_PROJ4Projection, self).__init__(other_terms, globe)
+
+        self.bounds = bounds
+
+    def __repr__(self):
+        return '_PROJ4Projection({})'.format(self.proj4_init)
+
+    @property
+    def boundary(self):
+        x0, x1, y0, y1 = self.bounds
+        return sgeom.LineString([(x0, y0), (x0, y1), (x1, y1), (x1, y0),
+                                 (x0, y0)])
+
+    @property
+    def x_limits(self):
+        x0, x1, y0, y1 = self.bounds
+        return (x0, x1)
+
+    @property
+    def y_limits(self):
+        x0, x1, y0, y1 = self.bounds
+        return (y0, y1)
+
+    @property
+    def threshold(self):
+        x0, x1, y0, y1 = self.bounds
+        return min(x1 - x0, y1 - y0) / 100.
+
+
+def _lesser_from_proj(proj4_terms, globe=None, bounds=None):
+    """Not-as-good version of cartopy's 'from_proj' function.
+
+    The user doesn't have a newer version of Cartopy so there is
+    no `from_proj` function to use which does a fancier job of
+    creating CRS objects from PROJ.4 strings than this does.
+
+    """
+    return _PROJ4Projection(proj4_terms, globe=globe, bounds=bounds)
+
+
+if from_proj is None:
+    from_proj = _lesser_from_proj


=====================================
pyresample/geometry.py
=====================================
--- a/pyresample/geometry.py
+++ b/pyresample/geometry.py
@@ -17,8 +17,8 @@
 # FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
 # details.
 #
-# You should have received a copy of the GNU Lesser General Public License along
-# with this program.  If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 """Classes for geometry operations"""
 
@@ -90,6 +90,13 @@ class BaseDefinition(object):
         self.lons = lons
         self.ndim = None
         self.cartesian_coords = None
+        self.hash = None
+
+    def __hash__(self):
+        """Compute the hash of this object."""
+        if self.hash is None:
+            self.hash = int(self.update_hash().hexdigest(), 16)
+        return self.hash
 
     def __eq__(self, other):
         """Test for approximate equality"""
@@ -491,23 +498,24 @@ class SwathDefinition(CoordinateDefinition):
         elif lons.ndim > 2:
             raise ValueError('Only 1 and 2 dimensional swaths are allowed')
 
-        self.hash = None
-
     def __hash__(self):
         """Compute the hash of this object."""
         if self.hash is None:
-            hasher = hashlib.sha1()
-            hasher.update(get_array_hashable(self.lons))
-            hasher.update(get_array_hashable(self.lats))
-            try:
-                if self.lons.mask is not np.bool_(False):
-                    hasher.update(get_array_hashable(self.lons.mask))
-            except AttributeError:
-                pass
-            self.hash = int(hasher.hexdigest(), 16)
-
+            self.hash = int(self.update_hash().hexdigest(), 16)
         return self.hash
 
+    def update_hash(self, the_hash=None):
+        if the_hash is None:
+            the_hash = hashlib.sha1()
+        the_hash.update(get_array_hashable(self.lons))
+        the_hash.update(get_array_hashable(self.lats))
+        try:
+            if self.lons.mask is not np.bool_(False):
+                the_hash.update(get_array_hashable(self.lons.mask))
+        except AttributeError:
+            pass
+        return the_hash
+
     def get_lonlats_dask(self, chunks=CHUNK_SIZE):
         """Get the lon lats as a single dask array."""
         import dask.array as da
@@ -531,14 +539,32 @@ class SwathDefinition(CoordinateDefinition):
 
         proj_dict2points = {'proj': 'omerc', 'lat_0': lat, 'ellps': ellipsoid,
                             'lat_1': lat1, 'lon_1': lon1,
-                            'lat_2': lat2, 'lon_2': lon2}
+                            'lat_2': lat2, 'lon_2': lon2, 'no_rot': True}
 
+        # return proj_dict2points
+        # We need to compute alpha-based omerc for geotiff support
         lonc, lat0 = Proj(**proj_dict2points)(0, 0, inverse=True)
+        az1, az2, dist = Geod(**proj_dict2points).inv(lonc, lat0, lon2, lat2)
+        azimuth = az1
         az1, az2, dist = Geod(**proj_dict2points).inv(lonc, lat0, lon1, lat1)
-        del az2, dist
-        return {'proj': 'omerc', 'alpha': float(az1),
-                'lat_0': float(lat0),  'lonc': float(lonc),
-                'no_rot': True, 'ellps': ellipsoid}
+        if abs(az1 - azimuth) > 1:
+            if abs(az2 - azimuth) > 1:
+                logger.warning("Can't find appropriate azimuth.")
+            else:
+                azimuth += az2
+                azimuth /= 2
+        else:
+            azimuth += az1
+            azimuth /= 2
+
+        if abs(azimuth) > 90:
+            azimuth = 180 + azimuth
+
+        prj_params = {'proj': 'omerc', 'alpha': float(azimuth),
+                      'lat_0': float(lat0),  'lonc': float(lonc),
+                      'no_rot': True, 'ellps': ellipsoid}
+
+        return prj_params
 
     def _compute_generic_parameters(self, projection, ellipsoid):
         """Compute the projection bb parameters for most projections."""
@@ -843,6 +869,12 @@ class AreaDefinition(BaseDefinition):
 
         self.dtype = dtype
 
+    def __hash__(self):
+        """Compute the hash of this object."""
+        if self.hash is None:
+            self.hash = int(self.update_hash().hexdigest(), 16)
+        return self.hash
+
     @property
     def proj_str(self):
         return utils.proj4_dict_to_str(self.proj_dict, sort=True)
@@ -866,6 +898,17 @@ class AreaDefinition(BaseDefinition):
                                            proj_str, self.x_size, self.y_size,
                                            self.area_extent)
 
+    __repr__ = __str__
+
+    def to_cartopy_crs(self):
+        from pyresample._cartopy import from_proj
+        bounds = (self.area_extent[0],
+                  self.area_extent[2],
+                  self.area_extent[1],
+                  self.area_extent[3])
+        crs = from_proj(self.proj_str, bounds=bounds)
+        return crs
+
     def create_areas_def(self):
         to_dump = OrderedDict()
         res = OrderedDict()
@@ -902,8 +945,6 @@ class AreaDefinition(BaseDefinition):
                                   area_extent=self.area_extent)
         return area_def_str
 
-    __repr__ = __str__
-
     def __eq__(self, other):
         """Test for equality"""
 
@@ -919,12 +960,14 @@ class AreaDefinition(BaseDefinition):
 
         return not self.__eq__(other)
 
-    def __hash__(self):
-        return hash((
-            self.proj_str,
-            self.shape,
-            self.area_extent
-        ))
+    def update_hash(self, the_hash=None):
+        """Update a hash, or return a new one if needed."""
+        if the_hash is None:
+            the_hash = hashlib.sha1()
+        the_hash.update(self.proj_str.encode('utf-8'))
+        the_hash.update(np.array(self.shape))
+        the_hash.update(np.array(self.area_extent))
+        return the_hash
 
     def colrow2lonlat(self, cols, rows):
         """


=====================================
pyresample/kd_tree.py
=====================================
--- a/pyresample/kd_tree.py
+++ b/pyresample/kd_tree.py
@@ -175,7 +175,7 @@ def resample_gauss(source_geo_def, data, target_geo_def,
         sigmas.__iter__()
         sigma_list = sigmas
         is_multi_channel = True
-    except:  # noqa: E722
+    except AttributeError:
         sigma_list = [sigmas]
 
     for sigma in sigma_list:
@@ -244,13 +244,13 @@ def resample_custom(source_geo_def, data, target_geo_def,
         Counts of number of source values used in weighting per pixel
     """
 
-    try:
+    if not isinstance(weight_funcs, (list, tuple)):
+        if not isinstance(weight_funcs, types.FunctionType):
+            raise TypeError('weight_func must be function object')
+    else:
         for weight_func in weight_funcs:
             if not isinstance(weight_func, types.FunctionType):
                 raise TypeError('weight_func must be function object')
-    except:  # noqa: E722
-        if not isinstance(weight_funcs, types.FunctionType):
-            raise TypeError('weight_func must be function object')
 
     return _resample(source_geo_def, data, target_geo_def, 'custom',
                      radius_of_influence, neighbours=neighbours,


=====================================
pyresample/plot.py
=====================================
--- a/pyresample/plot.py
+++ b/pyresample/plot.py
@@ -1,6 +1,7 @@
-# pyresample, Resampling of remote sensing image data in python
+#!/usr/bin/env python
+# encoding: utf8
 #
-# Copyright (C) 2010-2015
+# Copyright (C) 2010-2018
 #
 # Authors:
 #    Esben S. Nielsen
@@ -16,8 +17,8 @@
 # FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
 # details.
 #
-# You should have received a copy of the GNU Lesser General Public License along
-# with this program.  If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from __future__ import absolute_import
 import numpy as np
@@ -103,6 +104,11 @@ def area_def2basemap(area_def, **kwargs):
     bmap : Basemap object
     """
 
+    import warnings
+    warnings.warn("Basemap is no longer maintained. Please switch to cartopy "
+                  "by using 'area_def.to_cartopy_crs()'. See the pyresample "
+                  "documentation for more details.", DeprecationWarning)
+
     from mpl_toolkits.basemap import Basemap
     try:
         a, b = ellps2axis(area_def.proj_dict['ellps'])
@@ -153,12 +159,9 @@ def area_def2basemap(area_def, **kwargs):
     return Basemap(**basemap_args)
 
 
-def _get_quicklook(area_def, data, vmin=None, vmax=None,
-                   label='Variable (units)', num_meridians=45,
-                   num_parallels=10, coast_res='c', cmap='jet'):
-    """Get default Basemap matplotlib plot
-    """
-
+def _basemap_get_quicklook(area_def, data, vmin=None, vmax=None,
+                           label='Variable (units)', num_meridians=45,
+                           num_parallels=10, coast_res='110m', cmap='jet'):
     if area_def.shape != data.shape:
         raise ValueError('area_def shape %s does not match data shape %s' %
                          (list(area_def.shape), list(data.shape)))
@@ -175,9 +178,66 @@ def _get_quicklook(area_def, data, vmin=None, vmax=None,
     return plt
 
 
+def _get_quicklook(area_def, data, vmin=None, vmax=None,
+                   label='Variable (units)', num_meridians=45,
+                   num_parallels=10, coast_res='110m', cmap='jet'):
+    """Get default Basemap matplotlib plot
+    """
+    bmap_to_cartopy_res = {
+        'c': '110m',
+        'l': '110m',
+        'i': '50m',
+        'h': '10m',
+        'f': '10m'
+    }
+
+    try:
+        from pyresample import _cartopy  # noqa
+    except ImportError:
+        if coast_res.endswith('m'):
+            _rev_map = {v: k for k, v in bmap_to_cartopy_res.items()}
+            coast_res = _rev_map[coast_res]
+        return _basemap_get_quicklook(
+            area_def, data, vmin, vmax, label, num_meridians,
+            num_parallels, coast_res=coast_res, cmap=cmap)
+
+    if coast_res and coast_res not in ['110m', '50m', '10m']:
+        import warnings
+        warnings.warn("'coast_res' should be either '110m', '50m', '10m'.")
+        coast_res = {
+            'c': '110m',
+            'l': '110m',
+            'i': '50m',
+            'h': '10m',
+            'f': '10m'
+        }[coast_res]
+
+    if area_def.shape != data.shape:
+        raise ValueError('area_def shape %s does not match data shape %s' %
+                         (list(area_def.shape), list(data.shape)))
+    import matplotlib.pyplot as plt
+    crs = area_def.to_cartopy_crs()
+    ax = plt.axes(projection=crs)
+    ax.coastlines(resolution=coast_res)
+    ax.set_global()
+
+    xlocs = None
+    ylocs = None
+    if num_meridians:
+        xlocs = np.arange(-180, 180, num_meridians)
+    if num_parallels:
+        ylocs = np.arange(-90, 90, num_parallels)
+    ax.gridlines(xlocs=xlocs, ylocs=ylocs)
+    if not (np.ma.isMaskedArray(data) and data.mask.all()):
+        col = plt.imshow(data, transform=crs, extent=crs.bounds,
+                         origin='upper', vmin=vmin, vmax=vmax, cmap=cmap)
+        plt.colorbar(col, shrink=0.5, pad=0.05).set_label(label)
+    return plt
+
+
 def show_quicklook(area_def, data, vmin=None, vmax=None,
                    label='Variable (units)', num_meridians=45,
-                   num_parallels=10, coast_res='c', cmap='jet'):
+                   num_parallels=10, coast_res='110m', cmap='jet'):
     """Display default quicklook plot
 
     Parameters
@@ -214,7 +274,7 @@ def show_quicklook(area_def, data, vmin=None, vmax=None,
 
 def save_quicklook(filename, area_def, data, vmin=None, vmax=None,
                    label='Variable (units)', num_meridians=45,
-                   num_parallels=10, coast_res='c', backend='AGG',
+                   num_parallels=10, coast_res='110m', backend='AGG',
                    cmap='jet'):
     """Display default quicklook plot
 


=====================================
pyresample/test/test_geometry.py
=====================================
--- a/pyresample/test/test_geometry.py
+++ b/pyresample/test/test_geometry.py
@@ -77,6 +77,28 @@ class Test(unittest.TestCase):
         self.assertTrue((cart_coords.sum() - exp) < 1e-7 * exp,
                         msg='Calculation of cartesian coordinates failed')
 
+    def test_cartopy_crs(self):
+        area_def = geometry.AreaDefinition('areaD', 'Europe (3km, HRV, VTC)',
+                                           'areaD',
+                                           {'a': '6378144.0',
+                                            'b': '6356759.0',
+                                            'lat_0': '50.00',
+                                            'lat_ts': '50.00',
+                                            'lon_0': '8.00',
+                                            'proj': 'stere'},
+                                           800,
+                                           800,
+                                           [-1370912.72,
+                                            -909968.64000000001,
+                                            1029087.28,
+                                            1490031.3600000001])
+        crs = area_def.to_cartopy_crs()
+        self.assertEqual(crs.bounds,
+                         (area_def.area_extent[0],
+                          area_def.area_extent[2],
+                          area_def.area_extent[1],
+                          area_def.area_extent[3]))
+
     def test_base_type(self):
         lons1 = np.arange(-135., +135, 50.)
         lats = np.ones_like(lons1) * 70.
@@ -844,9 +866,9 @@ class TestSwathDefinition(unittest.TestCase):
                          [81.26400756835938, 29.672000885009766, 10.260000228881836]]).T
 
         area = geometry.SwathDefinition(lons, lats)
-        proj_dict = {'no_rot': True, 'lonc': 5.340645620216994,
+        proj_dict = {'no_rot': True, 'lonc': -11.391744043133668,
                      'ellps': 'WGS84', 'proj': 'omerc',
-                     'alpha': 19.022450179020247, 'lat_0': 60.7420043944989}
+                     'alpha': 9.185764390923012, 'lat_0': -0.2821013754097188}
         assert_np_dict_allclose(area._compute_omerc_parameters('WGS84'),
                                 proj_dict)
 
@@ -902,13 +924,13 @@ class TestSwathDefinition(unittest.TestCase):
 
         res = area.compute_optimal_bb_area({'proj': 'omerc', 'ellps': 'WGS84'})
 
-        np.testing.assert_allclose(res.area_extent, (2286629.731529,
-                                                     -2359693.817959,
-                                                     11729881.856072,
-                                                     2437001.523925))
-        proj_dict = {'no_rot': True, 'lonc': 5.340645620216994,
+        np.testing.assert_allclose(res.area_extent, [2253027.149539,
+                                                     -2348379.728104,
+                                                     11687636.846985,
+                                                     2432121.058435])
+        proj_dict = {'no_rot': True, 'lonc': -11.391744043133668,
                      'ellps': 'WGS84', 'proj': 'omerc',
-                     'alpha': 19.022450179020247, 'lat_0': 60.7420043944989}
+                     'alpha': 9.185764390923012, 'lat_0': -0.2821013754097188}
         assert_np_dict_allclose(res.proj_dict, proj_dict)
         self.assertEqual(res.shape, (3, 3))
 
@@ -1095,25 +1117,6 @@ class TestDynamicAreaDefinition(unittest.TestCase):
 
     def test_freeze_with_bb(self):
         """Test freezing the area with bounding box computation."""
-        # area = geometry.DynamicAreaDefinition('test_area', 'A test area',
-        #                                       {'proj': 'omerc'},
-        #                                       optimize_projection=False)
-        # lons = [[10, 12.1, 14.2, 16.3],
-        #         [10, 12, 14, 16],
-        #         [10, 11.9, 13.8, 15.7]]
-        # lats = [[66, 67, 68, 69.],
-        #         [58, 59, 60, 61],
-        #         [50, 51, 52, 53]]
-        # sdef = geometry.SwathDefinition(lons, lats)
-        # result = area.freeze(sdef,
-        #                      resolution=1000)
-        # self.assertTupleEqual(result.area_extent, (5578795.1654752363,
-        #                                            -270848.61872542271,
-        #                                            7694893.3964453982,
-        #                                            126974.877141819))
-        # self.assertEqual(result.x_size, 2116)
-        # self.assertEqual(result.y_size, 398)
-
         area = geometry.DynamicAreaDefinition('test_area', 'A test area',
                                               {'proj': 'omerc'},
                                               optimize_projection=True)
@@ -1126,10 +1129,10 @@ class TestDynamicAreaDefinition(unittest.TestCase):
         sdef = geometry.SwathDefinition(lons, lats)
         result = area.freeze(sdef,
                              resolution=1000)
-        np.testing.assert_allclose(result.area_extent, (5050520.6077326955,
-                                                        -336485.86803662963,
-                                                        8223167.9541879389,
-                                                        192612.12645302597))
+        np.testing.assert_allclose(result.area_extent, [5016583.682258,
+                                                        -336277.698941,
+                                                        8184964.697984,
+                                                        192456.651909])
         self.assertEqual(result.x_size, 3)
         self.assertEqual(result.y_size, 4)
 


=====================================
pyresample/test/test_kd_tree.py
=====================================
--- a/pyresample/test/test_kd_tree.py
+++ b/pyresample/test/test_kd_tree.py
@@ -379,7 +379,6 @@ class Test(unittest.TestCase):
                                msg='Swath multi channel resampling gauss failed on data')
         for i, e_stddev in enumerate(expected_stddev):
             cross_sum_stddev = stddev[:, :, i].sum()
-            print(cross_sum_stddev, e_stddev)
             self.assertAlmostEqual(cross_sum_stddev, e_stddev,
                                    msg='Swath multi channel resampling gauss failed on stddev (channel {})'.format(i))
         self.assertAlmostEqual(cross_sum_counts, expected_counts,


=====================================
pyresample/test/test_plot.py
=====================================
--- a/pyresample/test/test_plot.py
+++ b/pyresample/test/test_plot.py
@@ -1,3 +1,21 @@
+#!/usr/bin/env python
+# encoding: utf8
+#
+# Copyright (C) 2014-2018 PyTroll developers
+#
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Lesser General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
 import unittest
 import os
 
@@ -9,10 +27,10 @@ try:
 except ImportError:
     pass  # Postpone fail to individual tests
 
-
-def tmp(f):
-    f.tmp = True
-    return f
+try:
+    from mpl_toolkits.basemap import Basemap
+except ImportError:
+    Basemap = None
 
 
 class Test(unittest.TestCase):
@@ -39,6 +57,7 @@ class Test(unittest.TestCase):
         self.assertAlmostEqual(b, 6356752.3142451793,
                                msg='Failed to get semi-minor axis of ellipsis')
 
+    @unittest.skipIf(Basemap is None, "basemap is not available")
     def test_area_def2basemap(self):
         from pyresample import plot, utils
         area_def = utils.parse_area_file(os.path.join(os.path.dirname(__file__),


=====================================
pyresample/version.py
=====================================
--- a/pyresample/version.py
+++ b/pyresample/version.py
@@ -1,6 +1,7 @@
 # pyresample, Resampling of remote sensing image data in python
 #
 # Copyright (C) 2010, 2014, 2015  Esben S. Nielsen
+# Copyright (C) 2016-2018 PyTroll developers
 #
 # This program is free software: you can redistribute it and/or modify it under
 # the terms of the GNU Lesser General Public License as published by the Free
@@ -12,7 +13,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU Lesser General Public License along
-# with this program.  If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-__version__ = '1.8.3'
+__version__ = '1.9.0'


=====================================
setup.py
=====================================
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,7 @@ requirements = ['setuptools>=3.2', 'pyproj>=1.9.5.1', 'numpy>=1.10.0', 'configob
                 'pykdtree>=1.1.1', 'pyyaml', 'six']
 extras_require = {'pykdtree': ['pykdtree>=1.1.1'],
                   'numexpr': ['numexpr'],
-                  'quicklook': ['matplotlib', 'basemap', 'pillow'],
+                  'quicklook': ['matplotlib', 'cartopy', 'pillow'],
                   'dask': ['dask>=0.16.1']}
 
 test_requires = []



View it on GitLab: https://salsa.debian.org/debian-gis-team/pyresample/commit/2a28761aaaee0f8a7c39accaa9c0fac6448a8364

---
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyresample/commit/2a28761aaaee0f8a7c39accaa9c0fac6448a8364
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20180428/8cd8d1b4/attachment-0001.html>


More information about the Pkg-grass-devel mailing list