rsciio.tests.registry_utils#

rsciio.tests.registry_utils.download_all([...])

Download all test data if they are not already locally available in rsciio.tests.data folder.

rsciio.tests.registry_utils.make_registry(...)

Make a registry of files and hashes for the given directory.

rsciio.tests.registry_utils.update_registry()

Update the rsciio.tests.registry.txt file, which is required after adding or updating test data files.

rsciio.tests.registry_utils.download_all(pooch_object=None, ignore_hash=None, show_progressbar=True)#

Download all test data if they are not already locally available in rsciio.tests.data folder.

Parameters:
pooch_objectpooch.Pooch or None, default=None

The registry to be used. If None, a RosettaSciIO registry will be used.

ignore_hashbool or None, default=None

Don’t compare the hash of the downloaded file with the corresponding hash in the registry. On windows, the hash comparison will fail for non-binary file, because of difference in line ending. If None, the comparision will only be used on unix system.

show_progressbarbool, default=True

Whether to show the progressbar or not.

rsciio.tests.registry_utils.make_registry(directory, output, recursive=True, exclude_pattern=None)#

Make a registry of files and hashes for the given directory.

This is helpful if you have many files in your test dataset as it keeps you from needing to manually update the registry.

Parameters:
directorystr

Directory of the test data to put in the registry. All file names in the registry will be relative to this directory.

outputstr

Name of the output registry file.

recursivebool

If True, will recursively look for files in subdirectories of directory.

exclude_patternlist or None

List of pattern to exclude.

Notes

Adapted from fatiando/pooch BSD-3-Clause

rsciio.tests.registry_utils.update_registry()#

Update the rsciio.tests.registry.txt file, which is required after adding or updating test data files.

Unix system only. This is not supported on windows, because the hash comparison will fail for non-binary file, because of difference in line ending.