[Git][debian-gis-team/pyresample][upstream] New upstream version 1.32.0
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Sat Feb 1 10:02:15 GMT 2025
Antonio Valentino pushed to branch upstream at Debian GIS Project / pyresample
Commits:
9be2b15b by Antonio Valentino at 2025-02-01T09:30:09+00:00
New upstream version 1.32.0
- - - - -
17 changed files:
- .github/workflows/ci.yaml
- .github/workflows/deploy.yaml
- .pre-commit-config.yaml
- .readthedocs.yml
- CHANGELOG.md
- continuous_integration/environment.yaml
- docs/environment.yml
- pyproject.toml
- pyresample/_compat.py
- pyresample/_formatting_html.py
- pyresample/geometry.py
- pyresample/gradient/__init__.py
- pyresample/gradient/_gradient_search.pyx
- pyresample/test/test_gradient.py
- pyresample/utils/__init__.py
- pyresample/version.py
- setup.py
Changes:
=====================================
.github/workflows/ci.yaml
=====================================
@@ -15,10 +15,10 @@ jobs:
fail-fast: true
matrix:
os: ["windows-latest", "ubuntu-latest", "macos-latest"]
- python-version: ["3.9", "3.11", "3.12"]
+ python-version: ["3.11", "3.12", "3.13"]
experimental: [false]
include:
- - python-version: "3.12"
+ - python-version: "3.13"
os: "ubuntu-latest"
experimental: true
@@ -36,11 +36,12 @@ jobs:
uses: conda-incubator/setup-miniconda at v3
with:
miniforge-version: latest
- mamba-version: "1.5.10"
python-version: ${{ matrix.python-version }}
environment-file: continuous_integration/environment.yaml
activate-environment: test-environment
channels: conda-forge
+ conda-remove-defaults: true
+ channel-priority: strict
- name: Install unstable dependencies
if: matrix.experimental == true
@@ -85,7 +86,7 @@ jobs:
cd docs && mkdir doctest && sphinx-build -E -n -b doctest ./source ./doctest && cd ..
- name: Upload unittest coverage to Codecov
- uses: codecov/codecov-action at v4
+ uses: codecov/codecov-action at v5
with:
flags: unittests
file: ./coverage.xml
=====================================
.github/workflows/deploy.yaml
=====================================
@@ -42,41 +42,36 @@ jobs:
matrix:
include:
- os: windows-2019
- cibw_archs: "AMD64 ARM64"
- artifact_name: "win"
- - os: macos-12
- cibw_archs: "x86_64 arm64"
- artifact_name: "mac"
- - os: "ubuntu-20.04"
+ cibw_archs: "AMD64"
+ - os: windows-2019
+ cibw_archs: "ARM64"
+ - os: macos-13
+ cibw_archs: "x86_64"
+ - os: macos-14
+ cibw_archs: "arm64"
+ - os: "ubuntu-24.04-arm"
cibw_archs: "aarch64"
- artifact_name: "ubuntu-aarch"
- - os: "ubuntu-20.04"
+ - os: "ubuntu-22.04"
cibw_archs: "x86_64"
- artifact_name: "ubuntu-x86_64"
steps:
- uses: actions/checkout at v4
- run: |
git fetch --prune --unshallow
- - name: Set up QEMU
- if: runner.os == 'Linux'
- uses: docker/setup-qemu-action at v3
- with:
- platforms: all
-
- name: Build wheels
- uses: pypa/cibuildwheel at v2.20.0
+ uses: pypa/cibuildwheel at v2.22.0
env:
- CIBW_SKIP: "cp36-* cp37-* cp38-* cp313-* pp* *i686 *-musllinux*"
+ CIBW_SKIP: "cp36-* cp37-* cp38-* cp39-* cp310-* pp* *i686 *-musllinux*"
CIBW_ARCHS: "${{ matrix.cibw_archs }}"
CIBW_TEST_COMMAND: "python -c \"import pyresample; assert 'unknown' not in pyresample.__version__, 'incorrect version found'\""
- CIBW_TEST_SKIP: "*_arm64 *_universal2:arm64"
+ CIBW_TEST_SKIP: "*-win_arm64"
+ CIBW_BUILD_VERBOSITY: 1
- name: Upload wheel(s) as build artifacts
uses: actions/upload-artifact at v4
with:
- name: wheels-${{ matrix.artifact_name }}
+ name: "wheels-${{ matrix.os }}-${{ matrix.cibw_archs }}"
path: ./wheelhouse/*.whl
upload_test_pypi:
@@ -90,29 +85,15 @@ jobs:
with:
name: sdist
path: dist
- - name: Download wheels artifact - win
- uses: actions/download-artifact at v4
- with:
- name: wheels-win
- path: dist
- - name: Download wheels artifact - mac
- uses: actions/download-artifact at v4
- with:
- name: wheels-mac
- path: dist
- - name: Download wheels artifact - ubuntu aarch
- uses: actions/download-artifact at v4
- with:
- name: wheels-ubuntu-aarch
- path: dist
- - name: Download wheels artifact - ubuntu x86_64
+ - name: Download wheels artifact
uses: actions/download-artifact at v4
with:
- name: wheels-ubuntu-x86_64
+ pattern: wheels-*
+ merge-multiple: true
path: dist
- name: Publish package to PyPI
if: github.event.action != 'published'
- uses: pypa/gh-action-pypi-publish at v1.10.0
+ uses: pypa/gh-action-pypi-publish at v1.12.3
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
@@ -127,29 +108,15 @@ jobs:
with:
name: sdist
path: dist
- - name: Download wheels artifact - win
- uses: actions/download-artifact at v4
- with:
- name: wheels-win
- path: dist
- - name: Download wheels artifact - mac
- uses: actions/download-artifact at v4
- with:
- name: wheels-mac
- path: dist
- - name: Download wheels artifact - ubuntu aarch
- uses: actions/download-artifact at v4
- with:
- name: wheels-ubuntu-aarch
- path: dist
- - name: Download wheels artifact - ubuntu x86_64
+ - name: Download wheels artifact
uses: actions/download-artifact at v4
with:
- name: wheels-ubuntu-x86_64
+ pattern: wheels-*
+ merge-multiple: true
path: dist
- name: Publish package to PyPI
if: github.event.action == 'published'
- uses: pypa/gh-action-pypi-publish at v1.10.0
+ uses: pypa/gh-action-pypi-publish at v1.12.3
with:
user: __token__
password: ${{ secrets.pypi_password }}
=====================================
.pre-commit-config.yaml
=====================================
@@ -2,7 +2,7 @@ exclude: '^$'
fail_fast: false
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: 'v0.6.9'
+ rev: 'v0.8.6'
hooks:
- id: ruff
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -13,12 +13,12 @@ repos:
- id: check-yaml
args: [--unsafe]
- repo: https://github.com/PyCQA/bandit
- rev: '1.7.10' # Update me!
+ rev: '1.8.0' # Update me!
hooks:
- id: bandit
args: [--ini, .bandit]
- repo: https://github.com/pre-commit/mirrors-mypy
- rev: 'v1.11.2' # Use the sha / tag you want to point at
+ rev: 'v1.14.1' # Use the sha / tag you want to point at
hooks:
- id: mypy
additional_dependencies:
=====================================
.readthedocs.yml
=====================================
@@ -1,9 +1,9 @@
version: 2
build:
- os: "ubuntu-20.04"
+ os: "ubuntu-lts-latest"
tools:
- python: "mambaforge-4.10"
+ python: "mambaforge-latest"
# Build documentation in the docs/ directory with Sphinx
sphinx:
=====================================
CHANGELOG.md
=====================================
@@ -1,3 +1,30 @@
+## Version 1.32.0 (2025/01/29)
+
+### Issues Closed
+
+* [Issue 642](https://github.com/pytroll/pyresample/issues/642) - Gradient search skips some data when resampling from geos to mercator ([PR 643](https://github.com/pytroll/pyresample/pull/643) by [@mraspaud](https://github.com/mraspaud))
+* [Issue 638](https://github.com/pytroll/pyresample/issues/638) - Stored area documentation refers to SSP where this is not meaningful ([PR 639](https://github.com/pytroll/pyresample/pull/639) by [@BENR0](https://github.com/BENR0))
+
+In this release 2 issues were closed.
+
+### Pull Requests Merged
+
+#### Bugs fixed
+
+* [PR 643](https://github.com/pytroll/pyresample/pull/643) - Fix bug that would add spurious nan lines in gradient search ([642](https://github.com/pytroll/pyresample/issues/642), [642](https://github.com/pytroll/pyresample/issues/642))
+* [PR 639](https://github.com/pytroll/pyresample/pull/639) - Fix for resolution stating SSP in non geos cases ([638](https://github.com/pytroll/pyresample/issues/638))
+
+#### Features added
+
+* [PR 633](https://github.com/pytroll/pyresample/pull/633) - Drop support for Python <3.11
+
+#### Backward incompatible changes
+
+* [PR 633](https://github.com/pytroll/pyresample/pull/633) - Drop support for Python <3.11
+
+In this release 4 pull requests were closed.
+
+
## Version 1.31.0 (2024/10/25)
### Issues Closed
=====================================
continuous_integration/environment.yaml
=====================================
@@ -25,6 +25,5 @@ dependencies:
- pytest
- pytest-cov
- pytest-lazy-fixtures
- - importlib-metadata
- sphinx-reredirects
- odc-geo
=====================================
docs/environment.yml
=====================================
@@ -2,7 +2,7 @@ name: readthedocs
channels:
- conda-forge
dependencies:
- - python=3.10
+ - python=3.12
- pip
- xarray
- zarr
=====================================
pyproject.toml
=====================================
@@ -22,7 +22,7 @@ convention = "google"
max-complexity = 10
[tool.mypy]
-python_version = "3.9"
+python_version = "3.11"
# See https://github.com/python/mypy/issues/12286 for automatic multi-platform support
platform = "linux"
# platform = win32
=====================================
pyresample/_compat.py
=====================================
@@ -17,15 +17,4 @@
# satpy. If not, see <http://www.gnu.org/licenses/>.
"""Backports and compatibility fixes for pyresample."""
-import sys
-
-if sys.version_info < (3, 10):
- from importlib_metadata import entry_points # noqa
-else:
- from importlib.metadata import entry_points # noqa
-
-try:
- from numpy.typing import ArrayLike # noqa
-except ImportError:
- # numpy <1.20
- from numpy import ndarray as ArrayLike # noqa
+from importlib.metadata import entry_points # noqa
=====================================
pyresample/_formatting_html.py
=====================================
@@ -190,6 +190,10 @@ def proj_area_attrs_section(area: 'geom.AreaDefinition') -> str: # noqa F821
sorted(proj_dict.keys())]))
area_units = proj_dict.get("units", "")
+ resolution_bp_name = "Resolution x/y"
+ if proj_dict.get("proj") == "geos":
+ resolution_bp_name += " (SSP)"
+
attrs_icon = _icon("icon-file-text2")
area_attrs = ("<dl>"
@@ -197,7 +201,7 @@ def proj_area_attrs_section(area: 'geom.AreaDefinition') -> str: # noqa F821
f"<dt>Description</dt><dd>{area.description}</dd>"
f"<dt>Projection</dt><dd>{proj_str}</dd>"
f"<dt>Width/Height</dt><dd>{area.width}/{area.height} Pixel</dd>"
- f"<dt>Resolution x/y (SSP)</dt><dd>{resolution_str} {area_units}</dd>"
+ f"<dt>{resolution_bp_name}</dt><dd>{resolution_str} {area_units}</dd>"
f"<dt>Extent (ll_x, ll_y, ur_x, ur_y)</dt>"
f"<dd>{tuple(round(float(x), 4) for x in area.area_extent)}</dd>"
"</dl>"
=====================================
pyresample/geometry.py
=====================================
@@ -2126,8 +2126,8 @@ class AreaDefinition(_ProjectionDefinition):
if existing_hash is None:
existing_hash = hashlib.sha1() # nosec: B324
existing_hash.update(self.crs_wkt.encode('utf-8'))
- existing_hash.update(np.array(self.shape))
- existing_hash.update(np.array(self.area_extent))
+ existing_hash.update(np.array(self.shape)) # type: ignore[arg-type]
+ existing_hash.update(np.array(self.area_extent)) # type: ignore[arg-type]
return existing_hash
@daskify_2in_2out
=====================================
pyresample/gradient/__init__.py
=====================================
@@ -309,7 +309,7 @@ def gradient_resampler(data, source_area, target_area, method='bilinear'):
method=method)
-def gradient_resampler_indices_block(block_info=None, **kwargs):
+def gradient_resampler_indices_block(block_info, **kwargs):
"""Do the gradient search resampling using block_info for areas, returning the resulting indices."""
source_area = block_info[0]["area"]
target_area = block_info[None]["area"]
=====================================
pyresample/gradient/_gradient_search.pyx
=====================================
@@ -187,6 +187,7 @@ cdef void one_step_gradient_search_no_gil(const data_type[:, :, :] data,
for _ in range(x_size):
if isinf(dst_x[i, j]):
+ j += col_step
continue
cnt = 0
while True:
=====================================
pyresample/test/test_gradient.py
=====================================
@@ -32,7 +32,11 @@ import xarray as xr
from pyresample.area_config import create_area_def
from pyresample.geometry import AreaDefinition, SwathDefinition
-from pyresample.gradient import ResampleBlocksGradientSearchResampler, create_gradient_search_resampler
+from pyresample.gradient import (
+ ResampleBlocksGradientSearchResampler,
+ create_gradient_search_resampler,
+ gradient_resampler_indices,
+)
class TestRBGradientSearchResamplerArea2Area:
@@ -624,3 +628,23 @@ class TestGradientCython():
self.dst_x, self.dst_y)
np.testing.assert_allclose(res_x, expected_x)
np.testing.assert_allclose(res_y, expected_y)
+
+
+def test_resampling_geos_edge_to_mercator():
+ """Test that projecting the edges of geos onto a mercator area does not produce unnecessary NaNs."""
+ source_area = AreaDefinition.from_extent(area_id="side",
+ projection={'ellps': 'WGS84', 'h': '35786400', 'lon_0': '0',
+ 'no_defs': 'None', 'proj': 'geos', 'type': 'crs',
+ 'units': 'm', 'x_0': '0', 'y_0': '0'},
+ area_extent=(-2483999.9974, 5121999.9947, -1739999.9982, 4809999.995),
+ shape=(156, 372))
+ dest_area = AreaDefinition.from_extent(area_id="dest",
+ projection={'a': '6378137', 'b': '6378137', 'k': '1', 'lat_ts': '0',
+ 'lon_0': '0', 'nadgrids': '@null', 'no_defs': 'None',
+ 'proj': 'merc', 'type': 'crs', 'units': 'm', 'wktext': 'None',
+ 'x_0': '0', 'y_0': '0'},
+ area_extent=(-7800000.0, 8595618.56, -6073037.8378, 10321713.92),
+ shape=(512, 512))
+
+ res = gradient_resampler_indices(source_area, dest_area, fill_value=np.nan)
+ assert not np.any(np.isnan(res[:, :, -1]))
=====================================
pyresample/utils/__init__.py
=====================================
@@ -16,12 +16,8 @@
# 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/>.
"""Miscellaneous utility functions for pyresample."""
-try:
- from collections.abc import Mapping
-except ImportError:
- from collections import Mapping
-
import warnings
+from collections.abc import Mapping
import numpy as np
=====================================
pyresample/version.py
=====================================
@@ -26,9 +26,9 @@ def get_keywords() -> Dict[str, str]:
# setup.py/versioneer.py will grep for the variable names, so they must
# each be defined on a line of their own. _version.py will just call
# get_keywords().
- git_refnames = " (HEAD -> main, tag: v1.31.0)"
- git_full = "bd21270e5033940147f91e3c1cba5e4ffbd2e616"
- git_date = "2024-10-25 10:45:19 +0200"
+ git_refnames = " (tag: v1.32.0)"
+ git_full = "dde652d430e57df1b338a46e9c279ac9e6c15071"
+ git_date = "2025-01-29 21:16:05 -0600"
keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
return keywords
=====================================
setup.py
=====================================
@@ -102,7 +102,7 @@ if __name__ == "__main__":
packages=find_packages(),
package_data={'pyresample.test': ['test_files/*']},
include_package_data=True,
- python_requires='>=3.9',
+ python_requires='>=3.11',
setup_requires=['setuptools>=3.2'],
install_requires=requirements,
extras_require=extras_require,
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyresample/-/commit/9be2b15bbfe2fda8cc4f90763b5a677a540c8e04
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyresample/-/commit/9be2b15bbfe2fda8cc4f90763b5a677a540c8e04
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/20250201/39b1ba38/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list