Skip to content

Commit

Permalink
add filter argument to pooch retrieve to avoid raised deprecationwarning
Browse files Browse the repository at this point in the history
  • Loading branch information
veenstrajelmer authored Oct 22, 2024
1 parent b55b8ed commit 19ad08f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions hydromt/data_catalog/data_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,15 +633,14 @@ def _cache_archive(
if Path(archive_uri).suffix == ".zip":
kwargs.update(processor=pooch.Unzip(extract_dir=root))
elif Path(archive_uri).suffix == ".gz":
kwargs.update(processor=pooch.Untar(extract_dir=root))
kwargs.update(processor=pooch.Untar(extract_dir=root, filter='data'))
if Path(archive_uri).exists(): # check if arhive is a local file
kwargs.update(donwloader=_copy_file)
pooch.retrieve(
archive_uri,
known_hash=sha256,
path=str(root),
fname=Path(archive_uri).name,
filter='data',
**kwargs,
)
return root
Expand Down

0 comments on commit 19ad08f

Please sign in to comment.