Skip to content

Commit

Permalink
Fix unzip option and documentation (#55)
Browse files Browse the repository at this point in the history
Closes #53 

Co-authored-by: Dave Tromp <[email protected]>
Co-authored-by: Jonathan de Bruin <[email protected]>
  • Loading branch information
3 people authored Sep 14, 2023
1 parent 3ad235f commit beb81bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion datahugger/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,11 @@ def _get(
output_folder: Union[Path, str],
**kwargs,
):
if len(self.files) == 1 and self.files[0]["link"].endswith(".zip"):
if (
len(self.files) == 1
and self.files[0]["link"].endswith(".zip")
and self.unzip
):
self._unpack_single_folder(self.files[0]["link"], output_folder)
return

Expand Down
2 changes: 1 addition & 1 deletion docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Disable auto unzip function


``` python
datahugger.get("10.5061/dryad.x3ffbg7m8", "data", auto_unzip=False)
datahugger.get("10.5061/dryad.x3ffbg7m8", "data", unzip=False)
```


Expand Down

0 comments on commit beb81bf

Please sign in to comment.