Skip to content

Commit

Permalink
Merge pull request #9 from bio-oracle/dev
Browse files Browse the repository at this point in the history
Convert dataset ID to lowercase
  • Loading branch information
vinisalazar authored Sep 23, 2024
2 parents 7509030 + 3800b57 commit 90bc125
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pyo_oracle/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def download_layers(
log: bool = True,
timestamp: bool = True,
timeout: int = 120,
skip_convert_to_lowercase: bool = False,
**httpx_kwargs,
) -> None:
"""
Expand All @@ -45,6 +46,7 @@ def download_layers(
log (bool, optional): If True, a log of the download will be created.
timestamp (bool, optional): If True, a timestamp will be added to the downloaded files' names.
timeout (int, optional): Timeout in seconds for the download request.
skip_convert_to_lowercase (bool, optional): If True, the dataset ID will not be converted to lowercase.
httpx_kwargs (dict, optional): Additional keyword arguments to pass to the httpx function.
Returns:
Expand Down Expand Up @@ -73,6 +75,9 @@ def download_layers(
return

for dataset_id in dataset_ids:
if not dataset_id.islower() and not skip_convert_to_lowercase:
print(f"Converting dataset ID '{dataset_id}' to lowercase.")
dataset_id = dataset_id.lower()
_download_layer(
dataset_id,
output_directory,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages = ["pyo_oracle"]

[project]
name = "pyo_oracle"
version = "0.0.4a"
version = "0.0.5"
authors = [
{ name="Vini Salazar", email="[email protected]" },
]
Expand Down

0 comments on commit 90bc125

Please sign in to comment.