From c81d2ee69ec752bd3066218c91bfbe024a8306f0 Mon Sep 17 00:00:00 2001 From: rup-narayan-rajbanshi Date: Wed, 8 Jan 2025 12:27:52 +0545 Subject: [PATCH] Add event item for Glide Collection --- pystac_monty/sources/glide.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pystac_monty/sources/glide.py b/pystac_monty/sources/glide.py index 6873a20..1419579 100644 --- a/pystac_monty/sources/glide.py +++ b/pystac_monty/sources/glide.py @@ -31,6 +31,14 @@ def __init__(self, data: GlideDataSource) -> None: def make_items(self) -> list[Item]: items = [] + """ Create glide event items """ + glide_events = self.make_event_items() + items.append(glide_events) + + return items + + def make_event_item(self) -> list[Item]: + event_items = [] # validate data for glide transformation glide_events = self.check_and_get_glide_events() @@ -69,9 +77,9 @@ def make_items(self) -> list[Item]: item.add_link(Link("via", self.data.get_source_url(), "application/json", "Glide Event Data")) - items.append(item) + event_items.append(item) - return items + return event_items def make_date(self, data: dict) -> datetime: year = data["year"]