Skip to content

Commit c9c267c

Browse files
committed
fix collection summaries check
1 parent 15d93d4 commit c9c267c

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ The format is (loosely) based on [Keep a Changelog](http://keepachangelog.com/)
2121

2222
- Improved bbox validation output to show detailed information about mismatches between bbox and geometry bounds, including which specific coordinates differ and by how much ([#126](https://github.com/stac-utils/stac-check/pull/126))
2323

24+
### Fixed
25+
26+
- Fixed collection summaries check incorrectly showing messages for Item assets ([#121](https://github.com/stac-utils/stac-check/pull/127))
27+
2428
### Updated
2529

2630
- Improved README with table of contents, better formatting, stac-check logo, and enhanced documentation ([#122](https://github.com/stac-utils/stac-check/pull/122))

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ linting:
129129
links_title: true
130130
# Ensure that links in catalogs and collections include self link
131131
links_self: true
132+
# check if a bbox that crosses the antimeridian is correctly formatted
133+
check_bbox_antimeridian: true
132134

133135
settings:
134136
# Number of links before the bloated links warning is shown

stac_check/lint.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,11 @@ def create_best_practices_dict(self) -> Dict:
676676
best_practices_dict["check_catalog_id"] = [msg_1]
677677

678678
# best practices - collections should contain summaries
679-
if self.check_summaries() == False and config["check_summaries"] == True:
679+
if (
680+
self.asset_type == "COLLECTION"
681+
and self.check_summaries() == False
682+
and config["check_summaries"] == True
683+
):
680684
msg_1 = "A STAC collection should contain a summaries field"
681685
msg_2 = "It is recommended to store information like eo:bands in summaries"
682686
best_practices_dict["check_summaries"] = [msg_1, msg_2]
@@ -804,7 +808,7 @@ def create_best_practices_dict(self) -> Dict:
804808
west, _, _, east, _, _ = bbox
805809

806810
msg_1 = f"BBox crossing the antimeridian should have west longitude > east longitude (found west={west}, east={east})"
807-
msg_2 = "Current bbox format appears to be belting the globe instead of properly crossing the antimeridian"
811+
msg_2 = f"Current bbox format appears to be belting the globe instead of properly crossing the antimeridian. Bbox: {bbox}"
808812

809813
best_practices_dict["check_bbox_antimeridian"] = [msg_1, msg_2]
810814

0 commit comments

Comments
 (0)