diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 634a67811..12f80aa01 100644 --- a/.github/workflows/ci.yaml +++ b/.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 diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index b9c8e0b3a..4bc28a5fa 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -42,41 +42,36 @@ jobs: matrix: include: - os: windows-2019 - cibw_archs: "AMD64 ARM64" - artifact_name: "win" + cibw_archs: "AMD64" + - os: windows-2019 + cibw_archs: "ARM64" - os: macos-13 - cibw_archs: "x86_64 arm64" - artifact_name: "mac" - - os: "ubuntu-20.04" + 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@v4 - run: | git fetch --prune --unshallow - - name: Set up QEMU - if: runner.os == 'Linux' - uses: docker/setup-qemu-action@v3 - with: - platforms: all - - name: Build wheels uses: pypa/cibuildwheel@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@v4 with: - name: wheels-${{ matrix.artifact_name }} + name: "wheels-${{ matrix.os }}-${{ matrix.cibw_archs }}" path: ./wheelhouse/*.whl upload_test_pypi: @@ -90,25 +85,11 @@ jobs: with: name: sdist path: dist - - name: Download wheels artifact - win - uses: actions/download-artifact@v4 - with: - name: wheels-win - path: dist - - name: Download wheels artifact - mac - uses: actions/download-artifact@v4 - with: - name: wheels-mac - path: dist - - name: Download wheels artifact - ubuntu aarch - uses: actions/download-artifact@v4 - with: - name: wheels-ubuntu-aarch - path: dist - - name: Download wheels artifact - ubuntu x86_64 + - name: Download wheels artifact uses: actions/download-artifact@v4 with: - name: wheels-ubuntu-x86_64 + pattern: wheels-* + merge-multiple: true path: dist - name: Publish package to PyPI if: github.event.action != 'published' @@ -127,25 +108,11 @@ jobs: with: name: sdist path: dist - - name: Download wheels artifact - win - uses: actions/download-artifact@v4 - with: - name: wheels-win - path: dist - - name: Download wheels artifact - mac - uses: actions/download-artifact@v4 - with: - name: wheels-mac - path: dist - - name: Download wheels artifact - ubuntu aarch - uses: actions/download-artifact@v4 - with: - name: wheels-ubuntu-aarch - path: dist - - name: Download wheels artifact - ubuntu x86_64 + - name: Download wheels artifact uses: actions/download-artifact@v4 with: - name: wheels-ubuntu-x86_64 + pattern: wheels-* + merge-multiple: true path: dist - name: Publish package to PyPI if: github.event.action == 'published' diff --git a/.readthedocs.yml b/.readthedocs.yml index bf51795b5..1377d73fb 100644 --- a/.readthedocs.yml +++ b/.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: diff --git a/continuous_integration/environment.yaml b/continuous_integration/environment.yaml index e1734d3b5..0651c666b 100644 --- a/continuous_integration/environment.yaml +++ b/continuous_integration/environment.yaml @@ -25,6 +25,5 @@ dependencies: - pytest - pytest-cov - pytest-lazy-fixtures - - importlib-metadata - sphinx-reredirects - odc-geo diff --git a/docs/environment.yml b/docs/environment.yml index ed5006dff..9b9cc728b 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -2,7 +2,7 @@ name: readthedocs channels: - conda-forge dependencies: - - python=3.10 + - python=3.12 - pip - xarray - zarr diff --git a/pyproject.toml b/pyproject.toml index 242b2a8b3..a158c33c8 100644 --- a/pyproject.toml +++ b/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 diff --git a/pyresample/_compat.py b/pyresample/_compat.py index 44daefc59..75616c432 100644 --- a/pyresample/_compat.py +++ b/pyresample/_compat.py @@ -17,15 +17,4 @@ # satpy. If not, see . """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 diff --git a/pyresample/geometry.py b/pyresample/geometry.py index 9e02ac77a..0925c3520 100644 --- a/pyresample/geometry.py +++ b/pyresample/geometry.py @@ -2126,8 +2126,8 @@ def update_hash(self, existing_hash: Optional[_Hash] = None) -> _Hash: 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 diff --git a/pyresample/utils/__init__.py b/pyresample/utils/__init__.py index a06bb12cf..451272847 100644 --- a/pyresample/utils/__init__.py +++ b/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 . """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 diff --git a/setup.py b/setup.py index 8c1d27a02..5898a412f 100644 --- a/setup.py +++ b/setup.py @@ -102,7 +102,7 @@ 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,