From f750fa516c09ecd55129723a783a64746cd9b73b Mon Sep 17 00:00:00 2001 From: Deepak Chandan Date: Tue, 27 Feb 2024 22:14:40 -0500 Subject: [PATCH] specify collection assets as yaml list rather than dict --- .../implementations/CMIP6_UofT/collection_config.yml | 6 ++---- STACpopulator/populator_base.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/STACpopulator/implementations/CMIP6_UofT/collection_config.yml b/STACpopulator/implementations/CMIP6_UofT/collection_config.yml index bf8c151..9d3665f 100644 --- a/STACpopulator/implementations/CMIP6_UofT/collection_config.yml +++ b/STACpopulator/implementations/CMIP6_UofT/collection_config.yml @@ -7,13 +7,11 @@ spatialextent: [-180, -90, 180, 90] temporalextent: ['1850-01-01', '2500-01-01'] links: - homepage: - rel: about + - rel: about title : Project homepage target : https://wcrp-cmip.org/cmip-phase-6-cmip6/ media_type: text/html - license: - rel: license + - rel: license title : License target : https://raw.githubusercontent.com/WCRP-CMIP/CMIP6_CVs/main/LICENSE-CC-BY media_type: text/plain diff --git a/STACpopulator/populator_base.py b/STACpopulator/populator_base.py index 5ad5c20..44341f3 100644 --- a/STACpopulator/populator_base.py +++ b/STACpopulator/populator_base.py @@ -159,7 +159,7 @@ def __make_collection_links(self) -> List[pystac.Link]: """ links = [] config_links = self._collection_info.pop("links", {}) - for link_name, link_info in config_links.items(): + for link_info in config_links: links.append(pystac.Link(**link_info)) return links