Skip to content

Commit

Permalink
make get_urls public
Browse files Browse the repository at this point in the history
  • Loading branch information
scottstanie committed Sep 30, 2024
1 parent 3c0ccab commit b1ba7b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/opera_utils/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def _download_for_burst_ids(
raise ValueError(msg)
logger.info(msg)
session = _get_auth_session()
urls = _get_urls(results)
urls = get_urls(results)
asf.download_urls(
urls=urls, path=str(output_dir), session=session, processes=max_jobs
)
Expand Down Expand Up @@ -293,11 +293,12 @@ def filter_results_by_date_and_version(results: ASFSearchResults) -> ASFSearchRe
return ASFSearchResults(filtered_results)


def _get_urls(
def get_urls(
results: asf.ASFSearchResults,
type_: Literal["https", "s3"] = "https",
file_ext: str = ".h5",
) -> list[str]:
"""Parse the `ASFSearchResults` object for HTTPS or S3 urls."""
if type_ == "https":
return [r.properties["url"] for r in results]
elif type_ == "s3":
Expand Down

0 comments on commit b1ba7b4

Please sign in to comment.