File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 4343 GEODINI_API : " https://geodini.k8s.labs.ds.io"
4444 STAC_CATALOG_NAME : " planetarycomputer"
4545 STAC_CATALOG_URL : " https://planetarycomputer.microsoft.com/api/stac/v1"
46+ DEFAULT_TARGET_COLLECTIONS : " ['landsat-8-c2-l2', 'sentinel-2-l2a']"
4647
4748 # Sensitive environment variables stored as Kubernetes secrets
4849 secrets :
Original file line number Diff line number Diff line change 11from datetime import date
2+ import json
23import logging
34import os
45from dataclasses import dataclass
2122STAC_CATALOG_URL = os .getenv (
2223 "STAC_CATALOG_URL" , "https://planetarycomputer.microsoft.com/api/stac/v1"
2324)
25+ DEFAULT_TARGET_COLLECTIONS = json .loads (
26+ os .getenv ("DEFAULT_TARGET_COLLECTIONS" , '["landsat-8-c2-l2", "sentinel-2-l2a"]' )
27+ )
28+
2429
2530logger = logging .getLogger (__name__ )
2631
@@ -277,10 +282,7 @@ async def item_search(ctx: Context) -> ItemSearchResult:
277282 # determine the collections to search
278283 target_collections = await search_collections (ctx .query ) or []
279284 logger .info (f"Target collections: { pformat (target_collections )} " )
280- default_target_collections = [
281- "landsat-8-c2-l2" ,
282- "sentinel-2-l2a" ,
283- ]
285+ default_target_collections = DEFAULT_TARGET_COLLECTIONS
284286 if target_collections :
285287 explanation = "Considering the following collections:"
286288 for result in target_collections .collections :
You can’t perform that action at this time.
0 commit comments