@@ -531,10 +531,9 @@ def validate_core_landing_page_body(
531531 )
532532 return False
533533 if geometry is None :
534- logger .fatal (
535- " Item Search configured for validation, but `--geometry` parameter not specified"
534+ logger .warning (
535+ " Item Search configured for validation, but `--geometry` parameter not specified. Intersection tests will not be run "
536536 )
537- return False
538537
539538 if "children" in conformance_classes and not any (
540539 cc_children_regex .fullmatch (x ) for x in conforms_to
@@ -677,7 +676,7 @@ def validate_api(
677676 conforms_to = conforms_to ,
678677 warnings = warnings ,
679678 errors = errors ,
680- geometry = geometry , # type:ignore
679+ geometry = geometry ,
681680 conformance_classes = ccs_to_validate ,
682681 r_session = r_session ,
683682 validate_pagination = validate_pagination ,
@@ -1108,8 +1107,7 @@ def validate_features(
11081107 open_assets_urls : bool = True ,
11091108) -> None :
11101109 if not geometry :
1111- errors += f"[{ Context .FEATURES } ] Geometry parameter required for running Features validations."
1112- return
1110+ warnings += f"[{ Context .FEATURES } ] Geometry parameter required for running Features validations."
11131111
11141112 if not collection :
11151113 errors += f"[{ Context .FEATURES } ] Collection parameter required for running Features validations."
@@ -1358,7 +1356,7 @@ def validate_item_search(
13581356 conforms_to : List [str ],
13591357 warnings : Warnings ,
13601358 errors : Errors ,
1361- geometry : str ,
1359+ geometry : Optional [ str ] ,
13621360 conformance_classes : List [str ],
13631361 r_session : Session ,
13641362 validate_pagination : bool ,
@@ -1430,14 +1428,15 @@ def validate_item_search(
14301428 validate_item_search_collections (
14311429 search_url , collections_url , methods , errors , r_session
14321430 )
1433- validate_item_search_intersects (
1434- search_url = search_url ,
1435- collection = collection ,
1436- methods = methods ,
1437- errors = errors ,
1438- geometry = geometry ,
1439- r_session = r_session ,
1440- )
1431+ if geometry is not None :
1432+ validate_item_search_intersects (
1433+ search_url = search_url ,
1434+ collection = collection ,
1435+ methods = methods ,
1436+ errors = errors ,
1437+ geometry = geometry ,
1438+ r_session = r_session ,
1439+ )
14411440
14421441 if validate_pagination :
14431442 validate_item_pagination (
@@ -2747,7 +2746,7 @@ def validate_item_pagination(
27472746 root_url : str ,
27482747 search_url : str ,
27492748 collection : Optional [str ],
2750- geometry : str ,
2749+ geometry : Optional [ str ] ,
27512750 methods : Set [Method ],
27522751 errors : Errors ,
27532752 use_pystac_client : bool ,
@@ -2888,14 +2887,15 @@ def validate_item_pagination(
28882887 if len (items ) > len ({item ["id" ] for item in items }):
28892888 errors += f"[{ context } ] POST pagination - duplicate items returned from paginating items"
28902889
2891- search = client .search (
2892- method = "POST" , collections = [collection ], intersects = geometry
2893- )
2894- if len (list (take (20000 , search .items_as_dicts ()))) == 20000 :
2895- errors += (
2896- f"[{ context } ] POST pagination - paged through 20,000 results. This could mean the last page "
2897- "of results references itself, or your collection and geometry combination has too many results."
2890+ if geometry is not None :
2891+ search = client .search (
2892+ method = "POST" , collections = [collection ], intersects = geometry
28982893 )
2894+ if len (list (take (20000 , search .items_as_dicts ()))) == 20000 :
2895+ errors += (
2896+ f"[{ context } ] POST pagination - paged through 20,000 results. This could mean the last page "
2897+ "of results references itself, or your collection and geometry combination has too many results."
2898+ )
28992899 except Exception as e :
29002900 errors += f"pystac-client threw exception while testing pagination { e } "
29012901 elif collection is not None :
0 commit comments