Skip to content

redplanet.user_config.get_max_size_to_calculate_hash_GiB

get_max_size_to_calculate_hash_GiB() -> float | None

Get the maximum size of a local file (in GiB) for which a hash will be calculated in order to verify its integrity. If the file is larger than this size, the hash will not be calculated.

Returns:

Type Description
float | None
Notes

IMPLEMENTATION NOTE: if this returns None, then all hashes are calculated by default (to see implementation logic, check redplanet.DatasetManager.main._get_fpath_dataset()).

Source code in src/redplanet/user_config/max_hash_size.py
def get_max_size_to_calculate_hash_GiB() -> float | None:
    """
    Get the maximum size of a local file (in GiB) for which a hash will be calculated in order to verify its integrity. If the file is larger than this size, the hash will not be calculated.

    Returns
    -------
    float | None

    Notes
    -----
    IMPLEMENTATION NOTE: if this returns `None`, then all hashes are calculated by default (to see implementation logic, check `redplanet.DatasetManager.main._get_fpath_dataset()`).
    """
    return _max_size_to_calculate_hash_GiB