Skip to content

Commit

Permalink
Add event item for Glide Collection
Browse files Browse the repository at this point in the history
  • Loading branch information
Rup-Narayan-Rajbanshi committed Jan 10, 2025
1 parent 6e2eb24 commit c81d2ee
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pystac_monty/sources/glide.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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"]
Expand Down

0 comments on commit c81d2ee

Please sign in to comment.