rsciio.tests.registry_utils#
Download all test data if they are not already locally available in |
|
Make a registry of files and hashes for the given directory. |
|
Update the |
- 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.datafolder.- Parameters:
- pooch_object
pooch.PoochorNone, 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.
- pooch_object
- 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:
- directory
str Directory of the test data to put in the registry. All file names in the registry will be relative to this directory.
- output
str Name of the output registry file.
- recursivebool
If True, will recursively look for files in subdirectories of directory.
- exclude_pattern
listorNone List of pattern to exclude.
- directory
Notes
Adapted from fatiando/pooch BSD-3-Clause
- rsciio.tests.registry_utils.update_registry()#
Update the
rsciio.tests.registry.txtfile, 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.