[Git][debian-gis-team/stac-check][master] 4 commits: New upstream version 1.6.0+ds

Antonio Valentino (@antonio.valentino) gitlab at salsa.debian.org
Tue Mar 18 22:06:56 GMT 2025



Antonio Valentino pushed to branch master at Debian GIS Project / stac-check


Commits:
45b3d480 by Antonio Valentino at 2025-03-18T22:00:21+00:00
New upstream version 1.6.0+ds
- - - - -
8c42c83d by Antonio Valentino at 2025-03-18T22:00:21+00:00
Update upstream source from tag 'upstream/1.6.0+ds'

Update to upstream version '1.6.0+ds'
with Debian dir efab5cf646ee5a3f8398fafa0b3b875616b5f163
- - - - -
1b775ff2 by Antonio Valentino at 2025-03-18T22:02:02+00:00
New upstream release

- - - - -
805e329b by Antonio Valentino at 2025-03-18T22:04:35+00:00
Set diatribution to unstable

- - - - -


9 changed files:

- .github/workflows/test-runner.yml
- CHANGELOG.md
- debian/changelog
- + sample_files/1.0.0/bad-item.json
- + sample_files/1.0.0/collectionless-item.json
- + sample_files/1.0.0/core-item-unlocated-null-bbox.json
- setup.py
- stac_check/lint.py
- tests/test_lint.py


Changes:

=====================================
.github/workflows/test-runner.yml
=====================================
@@ -41,7 +41,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
+        python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
 
     steps:
       - uses: actions/checkout at v3


=====================================
CHANGELOG.md
=====================================
@@ -6,7 +6,21 @@ The format is (loosely) based on [Keep a Changelog](http://keepachangelog.com/)
 
 ## Unreleased
 
-### Changed
+### Added
+
+## [v1.6.0] - 2025-03-14
+
+### Added
+
+- Test for Python 3.13 in workflow ([#120](https://github.com/stac-utils/stac-check/pull/120))
+
+### Fixed
+
+- Prevented `KeyError` in `check_unlocated()` when `bbox` is unset ([#104](https://github.com/stac-utils/stac-check/pull/119))
+
+### Updated
+
+- Updated stac-validator to v3.6.0 ([#120](https://github.com/stac-utils/stac-check/pull/120))
 
 ## [v1.5.0] - 2025-01-17
 
@@ -167,7 +181,8 @@ The format is (loosely) based on [Keep a Changelog](http://keepachangelog.com/)
 - Validation from stac-validator 2.3.0
 - Links and assets validation checks
 
-[Unreleased]: https://github.com/stac-utils/stac-check/compare/v1.5.0...main
+[Unreleased]: https://github.com/stac-utils/stac-check/compare/v1.6.0...main
+[v1.6.0]: https://github.com/stac-utils/stac-check/compare/v1.5.0...v1.6.0
 [v1.5.0]: https://github.com/stac-utils/stac-check/compare/v1.4.0...v1.5.0
 [v1.4.0]: https://github.com/stac-utils/stac-check/compare/v1.3.3...v1.4.0
 [v1.3.3]: https://github.com/stac-utils/stac-check/compare/v1.3.2...v1.3.3


=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+stac-check (1.6.0+ds-1) unstable; urgency=medium
+
+  * New upstream release.
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it>  Tue, 18 Mar 2025 22:04:15 +0000
+
 stac-check (1.5.0+ds-1) unstable; urgency=medium
 
   * New upstream release.


=====================================
sample_files/1.0.0/bad-item.json
=====================================
@@ -0,0 +1,111 @@
+{
+  "stac_version": "1.0.0",
+  "stac_extensions": [
+    "https://stac-extensions.github.io/eo/v1.0.0/schema.json"
+  ],
+  "type": "Feature",
+  "bbox": [
+    -122.59750209,
+    37.48803556,
+    -122.2880486,
+    37.613537207
+  ],
+  "geometry": {
+    "type": "Polygon",
+    "coordinates": [
+      [
+        [
+          -122.308150179,
+          37.488035566
+        ],
+        [
+          -122.597502109,
+          37.538869539
+        ],
+        [
+          -122.576687533,
+          37.613537207
+        ],
+        [
+          -122.2880486,
+          37.562818007
+        ],
+        [
+          -122.308150179,
+          37.488035566
+        ]
+      ]
+    ]
+  },
+  "properties": {
+    "title": "Full Item",
+    "description": "A STAC item without an id",
+    "datetime": null,
+    "start_datetime": "2016-05-03T13:22:30Z",
+    "end_datetime": "2016-05-03T13:27:30Z",
+    "created": "2016-05-04T00:00:01Z",
+    "updated": "2017-01-01T00:30:55Z",
+    "license": "various",
+    "providers": [
+      {
+        "name": "Remote Data, Inc",
+        "description": "Producers of awesome spatiotemporal assets",
+        "roles": [
+          "producer",
+          "processor"
+        ],
+        "url": "http://remotedata.it"
+      }
+    ],
+    "platform": "cool_sat2",
+    "instruments": [
+      "cool_sensor_v1"
+    ]
+  },
+  "links": [
+    {
+      "rel": "root",
+      "href": "./catalog.json",
+      "type": "application/json",
+      "title": "Example Catalog"
+    },
+    {
+      "rel": "parent",
+      "href": "./catalog.json",
+      "type": "application/json",
+      "title": "Example Catalog"
+    },
+    {
+      "rel": "alternate",
+      "type": "text/html",
+      "href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/CS3-20160503_132130_04.html",
+      "title": "HTML representation of this STAC Item"
+    },
+    {
+      "rel": "license",
+      "type": "text/html",
+      "href": "http://remotedata.io/license.html",
+      "title": "Data License for Remote Data, Inc."
+    }
+  ],
+  "assets": {
+    "analytic": {
+      "href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/analytic.tif",
+      "title": "4-Band Analytic",
+      "eo:bands": [
+        {
+          "name": "band1"
+        },
+        {
+          "name": "band1"
+        },
+        {
+          "name": "band2"
+        },
+        {
+          "name": "band3"
+        }
+      ]
+    }
+  }
+}


=====================================
sample_files/1.0.0/collectionless-item.json
=====================================
@@ -0,0 +1,144 @@
+{
+  "stac_version": "1.0.0",
+  "stac_extensions": [
+    "https://stac-extensions.github.io/eo/v1.0.0/schema.json",
+    "https://stac-extensions.github.io/view/v1.0.0/schema.json"
+  ],
+  "type": "Feature",
+  "id": "CS3-20160503_132131_08",
+  "bbox": [
+    -122.59750209,
+    37.48803556,
+    -122.2880486,
+    37.613537207
+  ],
+  "geometry": {
+    "type": "Polygon",
+    "coordinates": [
+      [
+        [
+          -122.308150179,
+          37.488035566
+        ],
+        [
+          -122.597502109,
+          37.538869539
+        ],
+        [
+          -122.576687533,
+          37.613537207
+        ],
+        [
+          -122.2880486,
+          37.562818007
+        ],
+        [
+          -122.308150179,
+          37.488035566
+        ]
+      ]
+    ]
+  },
+  "properties": {
+    "title": "Full Item",
+    "description": "A sample STAC Item demonstrates an Item that does not have a collection, which is not recommended, but allowed by the spec.",
+    "datetime": null,
+    "start_datetime": "2016-05-03T13:22:30Z",
+    "end_datetime": "2016-05-03T13:27:30Z",
+    "created": "2016-05-04T00:00:01Z",
+    "updated": "2017-01-01T00:30:55Z",
+    "license": "various",
+    "providers": [
+      {
+        "name": "Remote Data, Inc",
+        "description": "Producers of awesome spatiotemporal assets",
+        "roles": [
+          "producer",
+          "processor"
+        ],
+        "url": "http://remotedata.it"
+      }
+    ],
+    "platform": "cool_sat2",
+    "instruments": [
+      "cool_sensor_v1"
+    ],
+    "view:sun_elevation": 33.4,
+    "gsd": 0.512,
+    "cs:type": "scene",
+    "cs:anomalous_pixels": 0.14,
+    "cs:earth_sun_distance": 1.014156,
+    "cs:sat_id": "CS3",
+    "cs:product_level": "LV1B"
+  },
+  "links": [
+    {
+      "rel": "root",
+      "href": "./catalog.json",
+      "type": "application/json",
+      "title": "Example Catalog"
+    },
+    {
+      "rel": "parent",
+      "href": "./catalog.json",
+      "type": "application/json",
+      "title": "Example Catalog"
+    },
+    {
+      "rel": "alternate",
+      "type": "text/html",
+      "href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/CS3-20160503_132130_04.html",
+      "title": "HTML representation of this STAC Item"
+    },
+    {
+      "rel": "license",
+      "type": "text/html",
+      "href": "http://remotedata.io/license.html",
+      "title": "Data License for Remote Data, Inc."
+    }
+  ],
+  "assets": {
+    "analytic": {
+      "href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/analytic.tif",
+      "title": "4-Band Analytic",
+      "eo:bands": [
+        {
+          "name": "band1"
+        },
+        {
+          "name": "band1"
+        },
+        {
+          "name": "band2"
+        },
+        {
+          "name": "band3"
+        }
+      ]
+    },
+    "thumbnail": {
+      "href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/thumbnail.png",
+      "title": "Thumbnail",
+      "type": "image/png",
+      "roles": [
+        "thumbnail"
+      ]
+    },
+    "udm": {
+      "href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/UDM.tif",
+      "title": "Unusable Data Mask"
+    },
+    "json-metadata": {
+      "href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/extended-metadata.json",
+      "title": "Extended Metadata",
+      "type": "application/json",
+      "roles": [
+        "metadata"
+      ]
+    },
+    "ephemeris": {
+      "href": "http://cool-sat.com/catalog/CS3-20160503_132130_04/S3-20160503_132130_04.EPH",
+      "title": "Satellite Ephemeris Metadata"
+    }
+  }
+}


=====================================
sample_files/1.0.0/core-item-unlocated-null-bbox.json
=====================================
@@ -0,0 +1,93 @@
+{
+    "stac_version": "1.0.0",
+    "stac_extensions": [],
+    "type": "Feature",
+    "id": "20201211_223832_CS2",
+    "geometry": null,
+    "properties": {
+      "title": "Core Item",
+      "description": "A sample STAC Item that includes examples of all common metadata",
+      "datetime": null,
+      "start_datetime": "2020-12-11T22:38:32.125Z",
+      "end_datetime": "2020-12-11T22:38:32.327Z",
+      "created": "2020-12-12T01:48:13.725Z",
+      "updated": "2020-12-12T01:48:13.725Z",
+      "platform": "cool_sat1",
+      "instruments": [
+        "cool_sensor_v1"
+      ],
+      "constellation": "ion",
+      "mission": "collection 5624",
+      "gsd": 0.512
+    },
+    "collection": "simple-collection",
+    "links": [
+      {
+        "rel": "collection",
+        "href": "./collection.json",
+        "type": "application/json",
+        "title": "Simple Example Collection"
+      },
+      {
+        "rel": "root",
+        "href": "./collection.json",
+        "type": "application/json",
+        "title": "Simple Example Collection"
+      },
+      {
+        "rel": "parent",
+        "href": "./collection.json",
+        "type": "application/json",
+        "title": "Simple Example Collection"
+      },
+      {
+        "rel": "alternate",
+        "type": "text/html",
+        "href": "http://remotedata.io/catalog/20201211_223832_CS2/index.html",
+        "title": "HTML version of this STAC Item"
+      }
+    ],
+    "assets": {
+      "analytic": {
+        "href": "https://storage.googleapis.com/open-cogs/stac-examples/20201211_223832_CS2_analytic.tif",
+        "type": "image/tiff; application=geotiff; profile=cloud-optimized",
+        "title": "4-Band Analytic",
+        "roles": [
+          "data"
+        ]
+      },
+      "thumbnail": {
+        "href": "https://storage.googleapis.com/open-cogs/stac-examples/20201211_223832_CS2.jpg",
+        "title": "Thumbnail",
+        "type": "image/jpg",
+        "roles": [
+          "thumbnail"
+        ]
+      },
+      "visual": {
+        "href": "https://storage.googleapis.com/open-cogs/stac-examples/20201211_223832_CS2.tif",
+        "type": "image/tiff; application=geotiff; profile=cloud-optimized",
+        "title": "3-Band Visual",
+        "roles": [
+          "visual"
+        ]
+      },
+      "udm": {
+        "href": "https://storage.googleapis.com/open-cogs/stac-examples/20201211_223832_CS2_analytic_udm.tif",
+        "title": "Unusable Data Mask",
+        "type": "image/tiff; application=geotiff;"
+      },
+      "json-metadata": {
+        "href": "http://remotedata.io/catalog/20201211_223832_CS2/extended-metadata.json",
+        "title": "Extended Metadata",
+        "type": "application/json",
+        "roles": [
+          "metadata"
+        ]
+      },
+      "ephemeris": {
+        "href": "http://cool-sat.com/catalog/20201211_223832_CS2/20201211_223832_CS2.EPH",
+        "title": "Satellite Ephemeris Metadata"
+      }
+    }
+  }
\ No newline at end of file


=====================================
setup.py
=====================================
@@ -3,7 +3,7 @@
 
 from setuptools import find_packages, setup
 
-__version__ = "1.5.0"
+__version__ = "1.6.0"
 
 with open("README.md", "r") as fh:
     long_description = fh.read()
@@ -20,7 +20,7 @@ setup(
         "requests>=2.32.3",
         "jsonschema>=4.23.0",
         "click>=8.1.8",
-        "stac-validator>=3.5.0",
+        "stac-validator>=3.6.0",
         "PyYAML",
         "python-dotenv",
     ],


=====================================
stac_check/lint.py
=====================================
@@ -437,7 +437,9 @@ class Linter:
             bool: True if the STAC item is unlocated, False otherwise.
         """
         if "geometry" in self.data:
-            return self.data["geometry"] is None and self.data["bbox"] is not None
+            return (
+                self.data.get("geometry") is None and self.data.get("bbox") is not None
+            )
         else:
             return False
 


=====================================
tests/test_lint.py
=====================================
@@ -126,13 +126,13 @@ def test_linter_collection_recursive():
     assert linter.recursive == True
     assert linter.validate_all[0] == {
         "version": "1.0.0",
-        "path": "sample_files/1.0.0/catalog-with-bad-item.json",
+        "path": "sample_files/1.0.0/./bad-item.json",
         "schema": [
-            "https://schemas.stacspec.org/v1.0.0/catalog-spec/json-schema/catalog.json"
+            "https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json"
         ],
-        "valid_stac": True,
-        "asset_type": "CATALOG",
-        "validation_method": "recursive",
+        "valid_stac": False,
+        "error_message": "'id' is a required property",
+        "error_type": "JSONSchemaValidationError",
     }
 
 
@@ -272,6 +272,11 @@ def test_unlocated_item():
     assert linter.check_unlocated() == True
     assert linter.check_geometry_null() == True
 
+    file = "sample_files/1.0.0/core-item-unlocated-null-bbox.json"
+    linter = Linter(file)
+    assert linter.check_unlocated() == False
+    assert linter.check_geometry_null() == True
+
 
 def test_bloated_item():
     file = "sample_files/1.0.0/core-item-bloated.json"



View it on GitLab: https://salsa.debian.org/debian-gis-team/stac-check/-/compare/71914990aa836423f9c4c091ceed09a5993d348c...805e329be06f2cbd030cb12f3f7099e769825816

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/stac-check/-/compare/71914990aa836423f9c4c091ceed09a5993d348c...805e329be06f2cbd030cb12f3f7099e769825816
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/20250318/b1e6753d/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list