Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dataset parsing for Hyrax catalogs #760

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions src/siphon/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,11 @@ def __init__(self, catalog_url):
current_dataset = child.attrib['name']
self._process_dataset(child)

if previous_dataset:
# see if the previously processed dataset has access elements as children
# if so, these datasets need to be processed specially when making
# access_urls
if self.datasets[previous_dataset].access_element_info:
self.ds_with_access_elements_to_process.append(previous_dataset)
# see if the previously processed dataset has access elements as children
# if so, these datasets need to be processed specially when making
# access_urls
if previous_dataset and self.datasets[previous_dataset].access_element_info:
self.ds_with_access_elements_to_process.append(previous_dataset)

previous_dataset = current_dataset

Expand All @@ -346,6 +345,11 @@ def __init__(self, catalog_url):
service_skip = self.services[-1].number_of_subservices
service_skip_count = 0

# Needed if the last dataset had such info, since it's only processed looking backwards
# when a new dataset is encountered.
if previous_dataset and self.datasets[previous_dataset].access_element_info:
self.ds_with_access_elements_to_process.append(previous_dataset)

self._process_datasets()

def __str__(self):
Expand Down
Loading
Loading