@@ -537,10 +537,9 @@ def validate_core_landing_page_body(
537537 )
538538 return False
539539 if geometry is None :
540- logger .fatal (
541- " Item Search configured for validation, but `--geometry` parameter not specified"
540+ logger .warning (
541+ " Item Search configured for validation, but `--geometry` parameter not specified. Intersection tests will not be run "
542542 )
543- return False
544543
545544 if "children" in conformance_classes and not any (
546545 cc_children_regex .fullmatch (x ) for x in conforms_to
@@ -697,7 +696,7 @@ def validate_api(
697696 conforms_to = conforms_to ,
698697 warnings = warnings ,
699698 errors = errors ,
700- geometry = geometry , # type:ignore
699+ geometry = geometry ,
701700 conformance_classes = ccs_to_validate ,
702701 r_session = r_session ,
703702 validate_pagination = validate_pagination ,
@@ -1130,10 +1129,6 @@ def validate_features(
11301129 open_assets_urls : bool = True ,
11311130 stac_check_config : Optional [str ] = None ,
11321131) -> None :
1133- if not geometry :
1134- errors += f"[{ Context .FEATURES } ] Geometry parameter required for running Features validations."
1135- return
1136-
11371132 if not collection :
11381133 errors += f"[{ Context .FEATURES } ] Collection parameter required for running Features validations."
11391134 return
@@ -1383,7 +1378,7 @@ def validate_item_search(
13831378 conforms_to : List [str ],
13841379 warnings : Warnings ,
13851380 errors : Errors ,
1386- geometry : str ,
1381+ geometry : Optional [ str ] ,
13871382 conformance_classes : List [str ],
13881383 r_session : Session ,
13891384 validate_pagination : bool ,
@@ -1455,14 +1450,15 @@ def validate_item_search(
14551450 validate_item_search_collections (
14561451 search_url , collections_url , methods , errors , r_session
14571452 )
1458- validate_item_search_intersects (
1459- search_url = search_url ,
1460- collection = collection ,
1461- methods = methods ,
1462- errors = errors ,
1463- geometry = geometry ,
1464- r_session = r_session ,
1465- )
1453+ if geometry is not None :
1454+ validate_item_search_intersects (
1455+ search_url = search_url ,
1456+ collection = collection ,
1457+ methods = methods ,
1458+ errors = errors ,
1459+ geometry = geometry ,
1460+ r_session = r_session ,
1461+ )
14661462
14671463 if validate_pagination :
14681464 validate_item_pagination (
@@ -2772,7 +2768,7 @@ def validate_item_pagination(
27722768 root_url : str ,
27732769 search_url : str ,
27742770 collection : Optional [str ],
2775- geometry : str ,
2771+ geometry : Optional [ str ] ,
27762772 methods : Set [Method ],
27772773 errors : Errors ,
27782774 use_pystac_client : bool ,
@@ -2913,14 +2909,15 @@ def validate_item_pagination(
29132909 if len (items ) > len ({item ["id" ] for item in items }):
29142910 errors += f"[{ context } ] POST pagination - duplicate items returned from paginating items"
29152911
2916- search = client .search (
2917- method = "POST" , collections = [collection ], intersects = geometry
2918- )
2919- if len (list (take (20000 , search .items_as_dicts ()))) == 20000 :
2920- errors += (
2921- f"[{ context } ] POST pagination - paged through 20,000 results. This could mean the last page "
2922- "of results references itself, or your collection and geometry combination has too many results."
2912+ if geometry is not None :
2913+ search = client .search (
2914+ method = "POST" , collections = [collection ], intersects = geometry
29232915 )
2916+ if len (list (take (20000 , search .items_as_dicts ()))) == 20000 :
2917+ errors += (
2918+ f"[{ context } ] POST pagination - paged through 20,000 results. This could mean the last page "
2919+ "of results references itself, or your collection and geometry combination has too many results."
2920+ )
29242921 except Exception as e :
29252922 errors += f"pystac-client threw exception while testing pagination { e } "
29262923 elif collection is not None :
0 commit comments