[Git][debian-gis-team/cdsetool][upstream] New upstream version 0.3.2

Antonio Valentino (@antonio.valentino) gitlab at salsa.debian.org
Sun Sep 20 09:18:12 BST 2026



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


Commits:
3f42a697 by Antonio Valentino at 2026-09-20T08:10:08+00:00
New upstream version 0.3.2
- - - - -


8 changed files:

- + .github/release.yml
- .github/workflows/lint.yml
- .github/workflows/publish.yml
- .github/workflows/pytest.yml
- .github/workflows/scan.yml
- README.md
- pyproject.toml
- tests/mock_auth.py


Changes:

=====================================
.github/release.yml
=====================================
@@ -0,0 +1,11 @@
+changelog:
+  categories:
+    - title: What's Changed
+      labels:
+        - "*"
+      exclude:
+        labels:
+          - dependencies
+    - title: Automated Updates
+      labels:
+        - dependencies


=====================================
.github/workflows/lint.yml
=====================================
@@ -8,11 +8,11 @@ jobs:
   ruff:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout at de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
-      - uses: astral-sh/ruff-action at 0ce1b0bf8b818ef400413f810f8a11cdbda0034b # v4.0.0
+      - uses: actions/checkout at 3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+      - uses: astral-sh/ruff-action at 278981a28ce3188b1e39527901f38254bf3aac89 # v4.1.0
         with:
           args: 'format --check --diff'
-      - uses: astral-sh/ruff-action at 0ce1b0bf8b818ef400413f810f8a11cdbda0034b # v4.0.0
+      - uses: astral-sh/ruff-action at 278981a28ce3188b1e39527901f38254bf3aac89 # v4.1.0
         with:
           args: 'check'
 
@@ -22,9 +22,9 @@ jobs:
       matrix:
         python-version: ["3.9", "3.10", "3.11", "3.12"]
     steps:
-      - uses: actions/checkout at de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+      - uses: actions/checkout at 3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
       - name: Set up Python ${{ matrix.python-version }}
-        uses: actions/setup-python at a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
+        uses: actions/setup-python at 5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
         with:
           python-version: ${{ matrix.python-version }}
       - name: Install dependencies
@@ -41,9 +41,9 @@ jobs:
       matrix:
         python-version: ["3.9", "3.10", "3.11", "3.12"]
     steps:
-      - uses: actions/checkout at de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+      - uses: actions/checkout at 3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
       - name: Set up Python ${{ matrix.python-version }}
-        uses: actions/setup-python at a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
+        uses: actions/setup-python at 5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
         with:
           python-version: ${{ matrix.python-version }}
       - name: Install dependencies


=====================================
.github/workflows/publish.yml
=====================================
@@ -20,9 +20,9 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-    - uses: actions/checkout at de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+    - uses: actions/checkout at 3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
     - name: Set up Python
-      uses: actions/setup-python at a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
+      uses: actions/setup-python at 5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
       with:
         python-version: '3.x'
     - name: Install dependencies
@@ -32,7 +32,7 @@ jobs:
     - name: Build package
       run: python -m build
     - name: Publish package
-      uses: pypa/gh-action-pypi-publish at cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
+      uses: pypa/gh-action-pypi-publish at dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
       with:
         user: __token__
         password: ${{ secrets.PYPI_API_TOKEN }}


=====================================
.github/workflows/pytest.yml
=====================================
@@ -15,9 +15,9 @@ jobs:
       matrix:
         python-version: ["3.9", "3.10", "3.11", "3.12"]
     steps:
-    - uses: actions/checkout at de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+    - uses: actions/checkout at 3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
     - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python at a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
+      uses: actions/setup-python at 5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
       with:
         python-version: ${{ matrix.python-version }}
     - name: Install dependencies


=====================================
.github/workflows/scan.yml
=====================================
@@ -20,7 +20,7 @@ jobs:
       security-events: write
     steps:
     - name: Checkout code
-      uses: actions/checkout at de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+      uses: actions/checkout at 3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
     - name: Run vulnerability scanner
       uses: aquasecurity/trivy-action at ed142fd0673e97e23eac54620cfb913e5ce36c25 # 0.36.0
       with:
@@ -30,6 +30,6 @@ jobs:
         output: 'trivy-results.sarif'
         severity: 'MEDIUM,HIGH,CRITICAL'
     - name: Upload Trivy scan results to GitHub Security tab
-      uses: github/codeql-action/upload-sarif at 95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
+      uses: github/codeql-action/upload-sarif at b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0
       with:
         sarif_file: 'trivy-results.sarif'


=====================================
README.md
=====================================
@@ -70,7 +70,7 @@ cdsetool download SENTINEL-2 PATH/TO/DIR --concurrency 4 --search-term contentDa
 Install `cdsetool` using pip:
 
 ```bash
-pip install cdsetool==0.3.1
+pip install cdsetool==0.3.2
 ```
 
 ## Usage
@@ -130,8 +130,8 @@ product = {
     "Attributes": [
         {"Name": "productType", "Value": "S2MSI2A"},
         {"Name": "cloudCover", "Value": 5.2},
-        ...
-    ]
+        ...,
+    ],
 }
 ```
 
@@ -145,13 +145,13 @@ from cdsetool.query import query_features, get_product_attribute
 features = query_features(
     "SENTINEL-2",
     {"contentDateStartGe": "2024-01-01"},
-    options={"expand_attributes": True}
+    options={"expand_attributes": True},
 )
 feature = features[0]
 
 # Access basic properties directly
 print(feature["Name"])  # Product name
-print(feature["Id"])    # Product UUID
+print(feature["Id"])  # Product UUID
 
 # Access attributes using helper function
 cloud_cover = get_product_attribute(feature, "cloudCover")
@@ -215,10 +215,19 @@ Interval syntax is only allowed on the base name, not on suffixed variants, and
 from cdsetool.query import query_features
 from datetime import date, datetime
 
-date_from = date(2020, 1, 1) # or datetime(2020, 1, 1, 23, 59, 59, 123456) or "2020-01-01" or "2020-01-01T23:59:59.123456Z"
+date_from = date(
+    2020, 1, 1
+)  # or datetime(2020, 1, 1, 23, 59, 59, 123456) or "2020-01-01" or "2020-01-01T23:59:59.123456Z"
 date_to = date(2020, 12, 31)
 
-features = query_features("SENTINEL-2", {"contentDateStartGe": date_from, "contentDateStartLe": date_to, "cloudCover": "[0, 30]"})
+features = query_features(
+    "SENTINEL-2",
+    {
+        "contentDateStartGe": date_from,
+        "contentDateStartLe": date_to,
+        "cloudCover": "[0, 30]",
+    },
+)
 ```
 
 #### Listing search terms
@@ -282,7 +291,7 @@ Credentials can be validated using the `validate_credentials` function which wil
 ```python
 from cdsetool.credentials import validate_credentials
 
-validate_credentials(username='user', password='password')
+validate_credentials(username="user", password="password")
 ```
 
 If None are passed to username and password, `validate_credentials` will validate `.netrc`
@@ -299,7 +308,10 @@ The downloaded feature ids are yielded, so its required to await the results.
 from cdsetool.query import query_features
 from cdsetool.download import download_features
 
-features = query_features("SENTINEL-2", {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"})
+features = query_features(
+    "SENTINEL-2",
+    {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"},
+)
 
 download_path = "/path/to/download/folder"
 downloads = download_features(features, download_path, {"concurrency": 4})
@@ -320,7 +332,10 @@ Its possible to download features sequentially in a single thread if desired.
 from cdsetool.query import query_features
 from cdsetool.download import download_feature
 
-features = query_features("SENTINEL-2", {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"})
+features = query_features(
+    "SENTINEL-2",
+    {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"},
+)
 
 download_path = "/path/to/download/folder"
 for feature in features:
@@ -338,11 +353,16 @@ It can be used in CDSETool:
     from cdsetool.query import query_features
     from cdsetool.download import download_features
 
-    features = query_features("SENTINEL-2", {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"})
+    features = query_features(
+        "SENTINEL-2",
+        {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"},
+    )
 
     download_path = "/path/to/download/folder"
     filter_pattern = "*TCI.jp2"
-    downloads = download_features(features, download_path, {"filter_pattern": filter_pattern})
+    downloads = download_features(
+        features, download_path, {"filter_pattern": filter_pattern}
+    )
 
     for id in downloads:
         print(f"feature {id} downloaded")


=====================================
pyproject.toml
=====================================
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
 
 [project]
 name = "cdsetool"
-version = "0.3.1"
+version = "0.3.2"
 authors = [
   { name="Jacob Vejby", email="javej at sdfi.dk" },
 ]
@@ -19,12 +19,12 @@ dependencies = [
   "typer >= 0.9,< 1",
   "rich >= 13.6,< 16",
   "requests >= 2.28.1,< 3",
-  "pyjwt[crypto] >= 2.8,< 2.13",
+  "pyjwt[crypto] >= 2.8,< 2.15",
   "geopandas >= 0.13.2",
 ]
 [dependency-groups]
 dev = [
-    "ruff==0.15.11",
+    "ruff==0.16.7",
 ]
 # (Jan 30 2025) Pip does not support dependency-groups yet, so
 # leave the optional dependencies for everything except Ruff.


=====================================
tests/mock_auth.py
=====================================
@@ -94,21 +94,6 @@ def mock_token(requests_mock: Any) -> None:
 
 
 def mock_jwks(mocker: Any) -> None:
-    class MockResponse:
-        def __init__(self, json_data) -> None:
-            self.json_data = json_data
-
-        def __enter__(self) -> "MockResponse":
-            return self
-
-        def read(self) -> bytes:
-            return json.dumps(self.json_data).encode("utf-8")
-
-        def __exit__(
-            self, exc_type: object, exc_value: object, traceback: object
-        ) -> None:
-            pass
-
     n = private_key.public_key().public_numbers().n
     e = private_key.public_key().public_numbers().e
     n = base64.urlsafe_b64encode(
@@ -130,4 +115,6 @@ def mock_jwks(mocker: Any) -> None:
             }
         ]
     }
-    mocker.patch("urllib.request.urlopen", return_value=MockResponse(jwks))
+    # Patch PyJWT's own fetch hook rather than urllib: PyJWT 2.14 stopped
+    # calling urllib.request.urlopen when it began rejecting redirects.
+    mocker.patch("jwt.PyJWKClient.fetch_data", return_value=jwks)



View it on GitLab: https://salsa.debian.org/debian-gis-team/cdsetool/-/commit/3f42a6979ef8de51b5203b48509a3da7933d0cd3

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/cdsetool/-/commit/3f42a6979ef8de51b5203b48509a3da7933d0cd3
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20260920/cc04c0ae/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list