Skip to content
Commits on Source (9)
pyresample/version.py export-subst
......@@ -27,8 +27,8 @@ install:
- 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:
- if [[ $PYTHON_VERSION == 3.6 ]]; then coveralls; codecov; fi
deploy:
......
## Version 1.12.0 (2019/04/06)
### Issues Closed
* [Issue 178](https://github.com/pytroll/pyresample/issues/178) - Can't install pyresample on OSX Mojave
In this release 1 issue was closed.
### Pull Requests Merged
#### Bugs fixed
* [PR 177](https://github.com/pytroll/pyresample/pull/177) - Fix dynamic omerc parameter computation to survive nans
#### Features added
* [PR 182](https://github.com/pytroll/pyresample/pull/182) - Implement striding and aggregation for Swath- and AreaDefinitions
In this release 2 pull requests were closed.
## Version 1.11.2 (2019/03/18)
### Pull Requests Merged
#### Documentation changes
* [PR 176](https://github.com/pytroll/pyresample/pull/176) - Fix typos in README and index page
In this release 1 pull request was closed.
## Version 1.11.1 (2019/03/18)
### Issues Closed
* [Issue 165](https://github.com/pytroll/pyresample/issues/165) - Update use of dask `atop` to `blockwise`
* [Issue 172](https://github.com/pytroll/pyresample/issues/172) - Missing metadata on PyPI ([PR 173](https://github.com/pytroll/pyresample/pull/173))
In this release 2 issues were closed.
### Pull Requests Merged
#### Bugs fixed
* [PR 175](https://github.com/pytroll/pyresample/pull/175) - Fix dask.blockwise backwards compatibility with dask.atop
In this release 1 pull request was closed.
## Version 1.11.0 (2019/03/15)
### Issues Closed
* [Issue 160](https://github.com/pytroll/pyresample/issues/160) - No coastlines in cartopy if area is flipped ([PR 161](https://github.com/pytroll/pyresample/pull/161))
* [Issue 136](https://github.com/pytroll/pyresample/issues/136) - Update documentation to not reference scipy kdtree ([PR 155](https://github.com/pytroll/pyresample/pull/155))
In this release 2 issues were closed.
### Pull Requests Merged
#### Bugs fixed
* [PR 170](https://github.com/pytroll/pyresample/pull/170) - Allow create_area_def to work with incomplete proj dicts to create DynamicAreas
* [PR 167](https://github.com/pytroll/pyresample/pull/167) - Fix yaml area loading when projection is latlong (units degrees)
#### Features added
* [PR 164](https://github.com/pytroll/pyresample/pull/164) - Delete unused requirements.txt file
* [PR 156](https://github.com/pytroll/pyresample/pull/156) - Refactor pyresample.utils in to separate modules
* [PR 150](https://github.com/pytroll/pyresample/pull/150) - Switch to versioneer
* [PR 145](https://github.com/pytroll/pyresample/pull/145) - Refactor and deprecate geometry "*_dask" methods
* [PR 138](https://github.com/pytroll/pyresample/pull/138) - Add `create_area_def` utility method and refactor AreaDefinition arguments
#### Documentation changes
* [PR 155](https://github.com/pytroll/pyresample/pull/155) - Update installation instructions to match current best practices ([136](https://github.com/pytroll/pyresample/issues/136))
In this release 8 pull requests were closed.
## Version 1.10.3 (2018/11/23)
### Issues Closed
......
......@@ -3,3 +3,6 @@ recursive-include docs/source *
include test/test_files/*
include LICENSE.txt
include pyresample/ewa/*.h
include versioneer.py
include pyresample/version.py
include README.md
......@@ -2,19 +2,37 @@
[![Build status](https://ci.appveyor.com/api/projects/status/a34o4utf8dqjsob1/branch/master?svg=true)](https://ci.appveyor.com/project/pytroll/pyresample/branch/master)
[![codebeat badge](https://codebeat.co/badges/2b9f14bc-758c-4fe1-967d-85b11e934983)](https://codebeat.co/projects/github-com-pytroll-pyresample-master)
Python package for geospatial resampling
----------------------------------------
Pyresample
----------
Resampling (reprojection) of geospatial image data in Python.
Pyresample uses a kd-tree approach for resampling.
Pyresample is designed for resampling of remote sensing data and supports resampling from both fixed grids and geolocated swath data.
Several types of resampling are supported including nearest neighbour, gaussian weighting and weighting with a user defined radial function.
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 a python package for resampling geospatial image data. It is the
primary method for resampling in the [SatPy](https://github.com/pytroll/satpy)
library, but can also be used as a standalone library. Resampling or
reprojection is the process of mapping input geolocated data points to a
new target geographic projection and area.
Pyresample can operate on both fixed grids of data and geolocated swath data.
To describe these data Pyresample uses various "geometry" objects including
the `AreaDefinition` and `SwathDefinition` classes.
Pyresample offers multiple resampling algorithms including:
- Nearest Neighbor
- Elliptical Weighted Average (EWA)
- Bilinear
For nearest neighbor and bilinear interpolation pyresample uses a kd-tree
approach by using the fast KDTree implementation provided by the
[pykdtree](https://github.com/storpipfugl/pykdtree) library.
Pyresample works with numpy arrays and numpy masked arrays. Interfaces to
XArray objects (including dask array support) are provided in separate
Resampler class interfaces and are in active development.
Utility functions are available to easily plot data using Cartopy.
Pyresample is tested with Python 2.7 and 3.6, but should additionally work
on Python 3.4+.
on Python 3.4+. Pyresample will drop Python 2.7 at the end of 2019.
[Documentation](https://pyresample.readthedocs.org/en/latest/)
Look at [pytroll.org](http://pytroll.org/) for more information.
See [pytroll.github.io](http://pytroll.github.io/) for more information on the
PyTroll group and related packages.
# Releasing Pyresample
prerequisites: `pip install bumpversion setuptools twine`
NB! You do not need `mercurial`. `bumpversion` is supposed to function without it. If it still doesn't work it might be that your PATH variable is screwed up. Check that all elements of your PATH are readable!
1. checkout master
2. pull from repo
3. run the unittests
......@@ -15,36 +11,15 @@ loghub pytroll/pyresample -u <username> -st v0.8.0 -plg bug "Bugs fixed" -plg en
Don't forget to commit!
5. run `bumpversion` with either `patch`, `minor`, `major`, `pre`, or `num` to
reach the desired version number
See [semver.org](http://semver.org/) for the definition of those values.
If the current "dev" version is not the desired version run:
5. Create a tag with the new version number, starting with a 'v', eg:
```
bumpversion <level>
git tag -a v0.22.45 -m "Version 0.22.45"
```
Where `level` is `num`, `pre`, `patch`, `minor`, or `major` to get to the correct
version. Check version.py to verify proper version. Then run:
See [semver.org](http://semver.org/) on how to write a version number.
```
bumpversion --tag release
```
To remove the `devN` portion of the version number and tag the release.
6. push changes to github `git push --follow-tags`
7. Verify travis tests passed and deploy sdist and wheel to PyPI
8. Update version to "dev" version of next release:
```
bumpversion patch
```
Which will set the version to "X.Y.Zdev0"
See [this issue](https://github.com/peritus/bumpversion/issues/77) for more information.
9. Push changes to github `git push` (there shouldn't be any new tags).
7. Verify travis tests passed and deployed sdist and wheel to PyPI
......@@ -8,21 +8,6 @@ environment:
CONDA_CHANNEL_PRIORITY: "True"
matrix:
- PYTHON: "C:\\Python27_32"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "32"
NUMPY_VERSION: "stable"
- PYTHON: "C:\\Python27_64"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "64"
NUMPY_VERSION: "stable"
- PYTHON: "C:\\Python36_32"
PYTHON_VERSION: "3.6"
PYTHON_ARCH: "32"
NUMPY_VERSION: "stable"
- PYTHON: "C:\\Python36_64"
PYTHON_VERSION: "3.6"
PYTHON_ARCH: "64"
......
ignore:
- "satpy/version.py"
- "versioneer.py"
pyresample (1.10.3-2) UNRELEASED; urgency=medium
pyresample (1.12.0-1) experimental; urgency=medium
[ Bas Couwenberg ]
* Bump Standards-Version to 4.3.0, no changes.
* Remove package name from lintian overrides.
-- Antonio Valentino <antonio.valentino@tiscali.it> Tue, 25 Dec 2018 23:04:14 +0100
[ Antonio Valentino ]
* New upstream release.
* Update debian/copyright file.
* debian/patches:
- drop 0001-fix-doc-build.patch (applied upstream)
- refresh and renumber remaining pathces
- improve 0002-Skip-dask-related-tests-if-dask-is-not-available.patch
* debian/control:
- added dependencies from xarray and matplotlib
-- Antonio Valentino <antonio.valentino@tiscali.it> Mon, 22 Apr 2019 12:36:25 +0000
pyresample (1.10.3-1) unstable; urgency=medium
......
......@@ -35,6 +35,9 @@ Build-Depends: debhelper (>= 11.0.0),
python3-scipy,
python-rasterio,
python3-rasterio,
python-xarray,
python3-xarray,
python3-dask,
cython,
cython3
Standards-Version: 4.3.0
......@@ -55,10 +58,12 @@ Depends: ${misc:Depends},
python-six,
python-rasterio,
python-pyresample-test
Recommends: python-numexpr,
Recommends: python-cartopy,
python-matplotlib,
python-numexpr,
python-pil,
python-cartopy,
python-scipy
python-scipy,
python-xarray
Suggests: python-pyresample-doc,
python-mpltoolkits.basemap
Description: Resampling of remote sensing data in Python 2
......@@ -85,11 +90,12 @@ Depends: ${misc:Depends},
python3-six,
python3-rasterio,
python-pyresample-test
Recommends: python3-numexpr,
Recommends: python3-cartopy,
python3-dask,
python3-matplotlib,
python3-numexpr,
python3-pil,
python3-cartopy,
python3-scipy,
python3-dask
python3-scipy
Suggests: python-pyresample-doc,
python3-mpltoolkits.basemap,
python3-xarray
......
......@@ -3,13 +3,18 @@ Upstream-Name: pyresample
Source: https://github.com/pytroll/pyresample
Files: *
Copyright: 2014-2018, PyTroll Developers
Copyright: 2015-2019, Pyresample developers
2014-2018, PyTroll Developers
2010-2016, Esben S. Nielsen <esn@dmi.dk>
2010-2016, Thomas Lavergne <t.lavergne@met.no>
2010, 2014-2016, Adam Dybbroe
2010, 2013-2015, 2017, Martin Raspaud <martin.raspaud@smhi.se>
License: LGPL-3+
Files: versioneer.py
Copyright: 2018, Brian Warner
License: CC0-1.0
Files: pyresample/bilinear/__init__.py
Copyright: 2017 Panu Lahtinen <panu.lahtinen@fmi.fi>
License: GPL-3+
......@@ -21,7 +26,7 @@ Copyright: 2016 David Hoese <david.hoese@ssec.wisc.edu>
License: GPL-3+
Files: debian/*
Copyright: 2013-2015, Antonio Valentino <antonio.valentino@tiscali.it>
Copyright: 2013-2019, Antonio Valentino <antonio.valentino@tiscali.it>
License: GPL-3+
License: GPL-3+
......@@ -58,3 +63,13 @@ License: LGPL-3+
On Debian systems, the complete text of the GNU Lesser General
Public License can be found in "/usr/share/common-licenses/LGPL-3".
License: CC0-1.0
To the extent possible under law, the author(s) have dedicated all copyright
and related and neighboring rights to this software to the public domain
worldwide. This software is distributed without any warranty.
.
You should have received a copy of the CC0 Public Domain Dedication along with
this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
.
On Debian systems, the complete text of the CC0 1.0 Universal license can be
found in ‘/usr/share/common-licenses/CC0-1.0’.
From: Antonio Valentino <antonio.valentino@tiscali.it>
Date: Sat, 11 Jul 2015 19:39:20 +0000
Subject: fix doc build
---
docs/source/API.rst | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/docs/source/API.rst b/docs/source/API.rst
index 5282938..8d20c17 100644
--- a/docs/source/API.rst
+++ b/docs/source/API.rst
@@ -3,45 +3,45 @@ pyresample API
pyresample.geometry
-------------------
-.. automodule:: geometry
+.. automodule:: pyresample.geometry
:members:
pyresample.image
----------------
-.. automodule:: image
+.. automodule:: pyresample.image
:members:
pyresample.grid
---------------
-.. automodule:: grid
+.. automodule:: pyresample.grid
:members:
pyresample.kd_tree
------------------
-.. automodule:: kd_tree
+.. automodule:: pyresample.kd_tree
:members:
pyresample.bilinear
-------------------
-.. automodule:: bilinear
+.. automodule:: pyresample.bilinear
:members:
pyresample.utils
----------------
-.. automodule:: utils
+.. automodule:: pyresample.utils
:members:
pyresample.data_reduce
----------------------
-.. automodule:: data_reduce
+.. automodule:: pyresample.data_reduce
:members:
pyresample.plot
---------------
-.. automodule:: plot
+.. automodule:: pyresample.plot
:members:
pyresample.ewa
--------------
-.. automodule:: ewa
+.. automodule:: pyresample.ewa
:members:
......@@ -21,10 +21,10 @@ index 063264d..620e665 100644
YSIZE: 480
AREA_EXTENT: (-20037508.342789244, -10018754.171394622, 20037508.342789244, 10018754.171394622)
diff --git a/pyresample/test/test_geometry.py b/pyresample/test/test_geometry.py
index 19520b9..2f52e8c 100644
index b916fa6..98ca468 100644
--- a/pyresample/test/test_geometry.py
+++ b/pyresample/test/test_geometry.py
@@ -428,7 +428,7 @@ class Test(unittest.TestCase):
@@ -450,7 +450,7 @@ class Test(unittest.TestCase):
swath_def = geometry.SwathDefinition(lons, lats)
filter_area = geometry.AreaDefinition('test', 'test', 'test',
{'proj': 'eqc', 'lon_0': 0.0,
......@@ -33,7 +33,7 @@ index 19520b9..2f52e8c 100644
8, 8,
(-20037508.34, -10018754.17, 20037508.34, 10018754.17))
filter = np.array([[1, 1, 1, 1, 0, 0, 0, 0],
@@ -453,7 +453,7 @@ class Test(unittest.TestCase):
@@ -475,7 +475,7 @@ class Test(unittest.TestCase):
data = np.array([1, 2, 3, 4])
filter_area = geometry.AreaDefinition('test', 'test', 'test',
{'proj': 'eqc', 'lon_0': 0.0,
......@@ -42,7 +42,7 @@ index 19520b9..2f52e8c 100644
8, 8,
(-20037508.34, -10018754.17, 20037508.34, 10018754.17))
filter = np.array([[1, 1, 1, 1, 0, 0, 0, 0],
@@ -488,7 +488,7 @@ class Test(unittest.TestCase):
@@ -510,7 +510,7 @@ class Test(unittest.TestCase):
data = np.dstack((data1, data2, data3))
filter_area = geometry.AreaDefinition('test', 'test', 'test',
{'proj': 'eqc', 'lon_0': 0.0,
......@@ -51,7 +51,7 @@ index 19520b9..2f52e8c 100644
8, 8,
(-20037508.34, -10018754.17, 20037508.34, 10018754.17))
filter = np.array([[1, 1, 1, 1, 0, 0, 0, 0],
@@ -557,7 +557,7 @@ class Test(unittest.TestCase):
@@ -579,7 +579,7 @@ class Test(unittest.TestCase):
def test_latlong_area(self):
area_def = geometry.AreaDefinition('', '', '',
......
From: Antonio Valentino <antonio.valentino@tiscali.it>
Date: Wed, 11 Jul 2018 06:50:33 +0000
Subject: Skip dask-related tests if dask is not available
---
pyresample/test/test_geometry.py | 12 +++++++++++-
pyresample/test/test_kd_tree.py | 6 ++++++
setup.py | 2 +-
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/pyresample/test/test_geometry.py b/pyresample/test/test_geometry.py
index 98ca468..8fbe1ed 100644
--- a/pyresample/test/test_geometry.py
+++ b/pyresample/test/test_geometry.py
@@ -9,7 +9,8 @@ import numpy as np
from pyresample import geo_filter, geometry
from pyresample.geometry import (IncompatibleAreas,
combine_area_extents_vertical,
- concatenate_area_defs)
+ concatenate_area_defs,
+ DataArray)
from pyresample.test.utils import catch_warnings
try:
@@ -23,6 +24,11 @@ if sys.version_info < (2, 7):
else:
import unittest
+try:
+ import dask
+except ImportError:
+ dask = None
+
class Test(unittest.TestCase):
@@ -725,6 +731,7 @@ class Test(unittest.TestCase):
np.array([-675286.976033, -682358.043845, -689429.111657, -696500.179469,
-703571.247281]))
+ @unittest.skipIf(not dask, 'dask not available')
def test_get_proj_coords_dask(self):
"""Test get_proj_coords usage with dask arrays."""
from pyresample import utils
@@ -1267,6 +1274,8 @@ class TestSwathDefinition(unittest.TestCase):
assert_np_dict_allclose(res.proj_dict, proj_dict)
self.assertEqual(res.shape, (3, 3))
+ @unittest.skipIf(not hasattr(DataArray, 'coarsen'), 'DataArray.coarsen not available')
+ @unittest.skipIf(not dask, 'dask not available')
def test_aggregation(self):
"""Test aggregation on SwathDefinitions."""
if (sys.version_info < (3, 0)):
@@ -1284,6 +1293,7 @@ class TestSwathDefinition(unittest.TestCase):
np.testing.assert_allclose(res.lons, [[179, -179]])
np.testing.assert_allclose(res.lats, [[0.5, 0.5]], atol=2e-5)
+ @unittest.skipIf(not dask, 'dask not available')
def test_striding(self):
"""Test striding."""
import dask.array as da
diff --git a/pyresample/test/test_kd_tree.py b/pyresample/test/test_kd_tree.py
index b3ef1a2..30108ca 100644
--- a/pyresample/test/test_kd_tree.py
+++ b/pyresample/test/test_kd_tree.py
@@ -14,6 +14,11 @@ if sys.version_info < (2, 7):
else:
import unittest
+try:
+ import dask.array as da
+except ImportError:
+ da = None
+
class Test(unittest.TestCase):
@@ -696,6 +701,7 @@ class Test(unittest.TestCase):
self.assertTrue(np.array_equal(fill_mask, expected_fill_mask))
+@unittest.skipIf(not da, 'dask not available')
class TestXArrayResamplerNN(unittest.TestCase):
"""Test the XArrayResamplerNN class."""
diff --git a/setup.py b/setup.py
index cb098f7..15db3f5 100644
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,7 @@ extras_require = {'numexpr': ['numexpr'],
'rasterio': ['rasterio'],
'dask': ['dask>=0.16.1']}
-test_requires = ['rasterio', 'dask', 'xarray', 'cartopy', 'pillow', 'matplotlib', 'scipy']
+test_requires = ['rasterio', 'xarray', 'cartopy', 'pillow', 'matplotlib', 'scipy']
if sys.version_info < (3, 3):
test_requires.append('mock')
From: Antonio Valentino <antonio.valentino@tiscali.it>
Date: Wed, 11 Jul 2018 06:50:33 +0000
Subject: Skip TestXArrayResamplerNN if dask is not available
---
pyresample/test/test_kd_tree.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/pyresample/test/test_kd_tree.py b/pyresample/test/test_kd_tree.py
index ccaea19..65007cc 100644
--- a/pyresample/test/test_kd_tree.py
+++ b/pyresample/test/test_kd_tree.py
@@ -14,6 +14,11 @@ if sys.version_info < (2, 7):
else:
import unittest
+try:
+ import dask.array as da
+except ImportError:
+ da = None
+
class Test(unittest.TestCase):
@@ -696,6 +701,7 @@ class Test(unittest.TestCase):
self.assertTrue(np.array_equal(fill_mask, expected_fill_mask))
+@unittest.skipIf(not da, 'dask not available')
class TestXArrayResamplerNN(unittest.TestCase):
"""Test the XArrayResamplerNN class."""
0001-fix-doc-build.patch
0002-fix-proj4-initialization.patch
0003-Skip-TestXArrayResamplerNN-if-dask-is-not-available.patch
0001-fix-proj4-initialization.patch
0002-Skip-dask-related-tests-if-dask-is-not-available.patch
ease_sh:
description: Antarctic EASE grid
projection:
a: 6371228.0
units: m
lon_0: 0
proj: laea
lat_0: -90
shape:
height: 425
width: 425
area_extent:
lower_left_xy: [-5326849.0625, -5326849.0625]
upper_right_xy: [5326849.0625, 5326849.0625]
units: m
ease_nh:
description: Arctic EASE grid
projection:
a: 6371228.0
units: m
lon_0: 0
proj: laea
lat_0: 90
shape:
height: 425
width: 425
area_extent:
lower_left_xy: [-5326849.0625, -5326849.0625]
upper_right_xy: [5326849.0625, 5326849.0625]
units: m
../pyresample/test/test_files/areas.yaml
\ No newline at end of file
......@@ -3,45 +3,45 @@ pyresample API
pyresample.geometry
-------------------
.. automodule:: geometry
.. automodule:: pyresample.geometry
:members:
pyresample.image
----------------
.. automodule:: image
.. automodule:: pyresample.image
:members:
pyresample.grid
---------------
.. automodule:: grid
.. automodule:: pyresample.grid
:members:
pyresample.kd_tree
------------------
.. automodule:: kd_tree
.. automodule:: pyresample.kd_tree
:members:
pyresample.bilinear
-------------------
.. automodule:: bilinear
.. automodule:: pyresample.bilinear
:members:
pyresample.utils
----------------
.. automodule:: utils
.. automodule:: pyresample.utils
:members:
pyresample.data_reduce
----------------------
.. automodule:: data_reduce
.. automodule:: pyresample.data_reduce
:members:
pyresample.plot
---------------
.. automodule:: plot
.. automodule:: pyresample.plot
:members:
pyresample.ewa
--------------
.. automodule:: ewa
.. automodule:: pyresample.ewa
:members: