From 7030d2145bd9a1099777c999015db3565f888c89 Mon Sep 17 00:00:00 2001 From: Vincent Sarago Date: Fri, 20 Dec 2024 16:59:46 +0100 Subject: [PATCH] remove python 3.8 and add python 3.13 (#773) --- .github/workflows/ci.yml | 20 +++++++++---------- .pre-commit-config.yaml | 2 +- docs/src/examples/STAC_datacube_support.ipynb | 2 -- .../src/examples/Using-nonEarth-dataset.ipynb | 1 - docs/src/examples/Using-tms.ipynb | 2 -- pyproject.toml | 7 +++++-- 6 files changed, 16 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c45199a..1973ef50 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: - '*' pull_request: env: - LATEST_PY_VERSION: '3.11' + LATEST_PY_VERSION: '3.13' jobs: tests: @@ -17,16 +17,16 @@ jobs: strategy: matrix: python-version: - - '3.8' - '3.9' - '3.10' - '3.11' - '3.12' + - '3.13' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -57,11 +57,11 @@ jobs: needs: [tests] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.13' - name: Install dependencies run: | @@ -95,7 +95,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.13' - name: Install dependencies run: | @@ -110,9 +110,9 @@ jobs: runs-on: ubuntu-latest if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: ${{ env.LATEST_PY_VERSION }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 70602941..ea7cfa88 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: language_version: python - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.3.5 + rev: v0.8.4 hooks: - id: ruff args: ["--fix"] diff --git a/docs/src/examples/STAC_datacube_support.ipynb b/docs/src/examples/STAC_datacube_support.ipynb index db427932..4598d92d 100644 --- a/docs/src/examples/STAC_datacube_support.ipynb +++ b/docs/src/examples/STAC_datacube_support.ipynb @@ -47,7 +47,6 @@ "\n", "import attr\n", "import xarray\n", - "import rioxarray\n", "from morecantile import TileMatrixSet\n", "from rio_tiler.io import XarrayReader\n", "from rio_tiler.constants import WEB_MERCATOR_TMS\n", @@ -341,7 +340,6 @@ "from typing import Set, Type, Tuple, Dict\n", "from rio_tiler.types import AssetInfo\n", "from rio_tiler.io import STACReader, BaseReader\n", - "from rio_tiler.io.stac import STAC_ALTERNATE_KEY\n", "\n", "valid_types = {\n", " \"image/tiff; application=geotiff\",\n", diff --git a/docs/src/examples/Using-nonEarth-dataset.ipynb b/docs/src/examples/Using-nonEarth-dataset.ipynb index df232d57..38ebccf7 100644 --- a/docs/src/examples/Using-nonEarth-dataset.ipynb +++ b/docs/src/examples/Using-nonEarth-dataset.ipynb @@ -188,7 +188,6 @@ "\n", " @run_on_executor\n", " def _get_tile(self, z, x, y):\n", - "\n", " try:\n", " with Reader(self.url, tms=europa_tms) as src:\n", " data = src.tile(x, y, z)\n", diff --git a/docs/src/examples/Using-tms.ipynb b/docs/src/examples/Using-tms.ipynb index 16651f05..93cbee1e 100644 --- a/docs/src/examples/Using-tms.ipynb +++ b/docs/src/examples/Using-tms.ipynb @@ -91,7 +91,6 @@ "\n", "\n", "class TileServer:\n", - "\n", " def __init__(self, src_path):\n", " \"\"\"Initialize Tornado app.\"\"\"\n", " self.server = None\n", @@ -123,7 +122,6 @@ "\n", " @run_on_executor\n", " def _get_tile(self, tms, z, x, y):\n", - "\n", " try:\n", " with Reader(self.url, tms=morecantile.tms.get(tms)) as cog:\n", " img = cog.tile(x, y, z, indexes=(1, 2, 3))\n", diff --git a/pyproject.toml b/pyproject.toml index 9156f9d0..ef06ed32 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "rio-tiler" description = "User friendly Rasterio plugin to read raster datasets." readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" license = {file = "LICENSE"} authors = [ {name = "Vincent Sarago", email = "vincent@developmentseed.com"}, @@ -12,11 +12,11 @@ classifiers = [ "Intended Audience :: Information Technology", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering :: GIS", ] dynamic = ["version"] @@ -153,6 +153,9 @@ ignore = [ "B905", # ignore zip() without an explicit strict= parameter, only support with python >3.10 "B028", ] +exclude = [ + "*.ipynb" +] [tool.ruff.lint.mccabe] max-complexity = 14