pynbody.test_utils

pynbody.test_utils#

Utilities for downloading and unpacking test data packages

WARNING: This module must not depend on a working pynbody installation. It is used during CI to download test data before pynbody is built/installed. Only use standard library modules and osfclient (which is available in CI).

Functions

download_and_unpack_test_data(archive_name)

Download and unpack test data with the given archive name and unpack path.

download_ionfrac_table(name, destination)

Download an ion fraction table from the pynbody data repository

ensure_test_data_available(*package_names)

Ensure that the specified test data packages are available in the testdata directory.

get_osf_file_object(osf_project_id, archive_name)

Retrieve the OSF file object for the given archive name in the specified OSF project.

ionfrac_tables_hash()

Return a hash of the ionfrac table names

precache_ionfrac_tables([verbose])

Download all ionfrac tables needed for tests

precache_test_data([verbose, extended])

Download and unpack all test data packages.

test_data_hash()

Return a hash representing the data packages to be downloaded

Modules