[Git][debian-gis-team/xarray-safe-rcm][master] 5 commits: New upstream version 2024.02.0

Antonio Valentino (@antonio.valentino) gitlab at salsa.debian.org
Wed Feb 21 07:44:59 GMT 2024



Antonio Valentino pushed to branch master at Debian GIS Project / xarray-safe-rcm


Commits:
49bbd284 by Antonio Valentino at 2024-02-21T07:36:28+00:00
New upstream version 2024.02.0
- - - - -
05839651 by Antonio Valentino at 2024-02-21T07:36:29+00:00
Update upstream source from tag 'upstream/2024.02.0'

Update to upstream version '2024.02.0'
with Debian dir feefb4a2c46399d8825dd247422accf6748f1c15
- - - - -
603679d2 by Antonio Valentino at 2024-02-21T07:37:18+00:00
New upstream release

- - - - -
b87efb58 by Antonio Valentino at 2024-02-21T07:39:11+00:00
Update dates in d/copyright

- - - - -
c0ee6de3 by Antonio Valentino at 2024-02-21T07:39:52+00:00
Set distribution to unstable

- - - - -


6 changed files:

- .github/workflows/pypi.yaml
- .pre-commit-config.yaml
- debian/changelog
- debian/copyright
- safe_rcm/api.py
- safe_rcm/product/reader.py


Changes:

=====================================
.github/workflows/pypi.yaml
=====================================
@@ -11,9 +11,9 @@ jobs:
     if: github.repository == 'umr-lops/xarray-safe-rcm'
     steps:
       - name: Checkout
-        uses: actions/checkout at v3
+        uses: actions/checkout at v4
       - name: Set up Python
-        uses: actions/setup-python at v4
+        uses: actions/setup-python at v5
         with:
           python-version: "3.x"
       - name: Install dependencies
@@ -27,7 +27,7 @@ jobs:
         run: |
           twine check dist/*
       - name: Upload build artifacts
-        uses: actions/upload-artifact at v3
+        uses: actions/upload-artifact at v4
         with:
           name: packages
           path: dist/*
@@ -45,10 +45,10 @@ jobs:
 
     steps:
       - name: Download build artifacts
-        uses: actions/download-artifact at v3
+        uses: actions/download-artifact at v4
         with:
           name: packages
           path: dist/
 
       - name: Publish to PyPI
-        uses: pypa/gh-action-pypi-publish at a56da0b891b3dc519c7ee3284aff1fad93cc8598
+        uses: pypa/gh-action-pypi-publish at 2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf


=====================================
.pre-commit-config.yaml
=====================================
@@ -4,7 +4,7 @@ ci:
 # https://pre-commit.com/
 repos:
   - repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: v4.4.0
+    rev: v4.5.0
     hooks:
       - id: trailing-whitespace
       - id: end-of-file-fixer
@@ -12,28 +12,28 @@ repos:
       - id: check-yaml
       - id: check-toml
   - repo: https://github.com/pycqa/isort
-    rev: 5.12.0
+    rev: 5.13.2
     hooks:
       - id: isort
   - repo: https://github.com/psf/black
-    rev: 23.3.0
+    rev: 24.2.0
     hooks:
       - id: black
       - id: black-jupyter
   - repo: https://github.com/keewis/blackdoc
-    rev: v0.3.8
+    rev: v0.3.9
     hooks:
       - id: blackdoc
   - repo: https://github.com/pycqa/flake8
-    rev: 6.0.0
+    rev: 7.0.0
     hooks:
       - id: flake8
   - repo: https://github.com/kynan/nbstripout
-    rev: 0.6.1
+    rev: 0.7.1
     hooks:
       - id: nbstripout
         args: [--extra-keys=metadata.kernelspec metadata.language_info.version]
   - repo: https://github.com/pre-commit/mirrors-prettier
-    rev: v3.0.0-alpha.9-for-vscode
+    rev: v4.0.0-alpha.8
     hooks:
       - id: prettier


=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+xarray-safe-rcm (2024.02.0-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Update dates in d/copyright.
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it>  Wed, 21 Feb 2024 07:39:34 +0000
+
 xarray-safe-rcm (2023.06.1-3) unstable; urgency=medium
 
   [ Bas Couwenberg ]


=====================================
debian/copyright
=====================================
@@ -8,7 +8,7 @@ Copyright: 2023, xarray-safe-rcm developers
 License: Expat
 
 Files: debian/*
-Copyright: 2023, Antonio Valentino <antonio.valentino at tiscali.it>
+Copyright: 2023-2024, Antonio Valentino <antonio.valentino at tiscali.it>
 License: Expat
 
 License: Expat


=====================================
safe_rcm/api.py
=====================================
@@ -5,6 +5,7 @@ from fnmatch import fnmatchcase
 import datatree
 import fsspec
 import xarray as xr
+from fsspec.implementations.dirfs import DirFileSystem
 from tlz.dicttoolz import valmap
 from tlz.functoolz import compose_left, curry, juxt
 
@@ -74,6 +75,7 @@ def open_rcm(
 
     storage_options = backend_kwargs.get("storage_options", {})
     mapper = fsspec.get_mapper(url, **storage_options)
+    relative_fs = DirFileSystem(path=url, fs=mapper.fs)
 
     try:
         declared_files = read_manifest(mapper, "manifest.safe")
@@ -85,8 +87,7 @@ def open_rcm(
     missing_files = [
         path
         for path in declared_files
-        if not ignored_file(path, manifest_ignores)
-        and not mapper.fs.exists(mapper._key_to_str(path))
+        if not ignored_file(path, manifest_ignores) and not relative_fs.exists(path)
     ]
     if missing_files:
         raise ExceptionGroup(
@@ -147,16 +148,12 @@ def open_rcm(
         ),
         imagery_paths,
     )
-    imagery_urls = valmap(
-        mapper._key_to_str,
-        resolved,
-    )
     imagery_dss = valmap(
         compose_left(
-            curry(mapper.fs.open),
+            curry(relative_fs.open),
             curry(xr.open_dataset, engine="rasterio", **dataset_kwargs),
         ),
-        imagery_urls,
+        resolved,
     )
     dss = [ds.assign_coords(pole=coord) for coord, ds in imagery_dss.items()]
     imagery = xr.concat(dss, dim="pole")


=====================================
safe_rcm/product/reader.py
=====================================
@@ -125,6 +125,7 @@ def read_product(mapper, product_path):
                     default_dims=["stacked"],
                 ),
                 lambda obj: obj.set_index({"stacked": ["pole", "pulse"]}),
+                lambda obj: obj.drop_duplicates("stacked", keep="last"),
                 lambda obj: obj.unstack("stacked"),
             ),
         },



View it on GitLab: https://salsa.debian.org/debian-gis-team/xarray-safe-rcm/-/compare/b6781cb00760a3b2cedbd9b051b0956e838a2b8a...c0ee6de3e9383c5e871de0c4df6ffbefa17a4534

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/xarray-safe-rcm/-/compare/b6781cb00760a3b2cedbd9b051b0956e838a2b8a...c0ee6de3e9383c5e871de0c4df6ffbefa17a4534
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/20240221/75b8e62a/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list