Expand description
Utility functions for dataset authors.
Provides helpers to download files, extract archives, verify SHA-256 hashes, and manage the dataset acquisition workflow.
Functions§
- acquire_
dataset - Get a dataset file, using a preparation closure that the caller provides.
- download_
to - Download a remote file into the given directory.
- download_
to_ with_ retries - Download a remote file into the given directory. It retries transient failures.
- gunzip
- Decompress a gzip (
.gz) file into a single output file. - read_
latin1 - Read a file as Latin-1 (ISO-8859-1) text.
- sha256_
file - Compute a file’s SHA256 hash and return it as a lowercase hex string.
- untar
- Extract a tar (
.tar) archive into a target directory. - untar_
gz - Extract a gzip-compressed tar (
.tar.gz/.tgz) archive into a target directory. - unzip
- Extract a zip archive into a target directory.
- verify_
sha256 - Verify that a file’s SHA256 hash matches an expected value (case-insensitive).