hats.io.validation#
Functions#
|
Checks if a catalog is valid for a given base catalog pointer |
|
Checks if a COLLECTION is valid for a given base catalog pointer |
|
Checks if collection.properties file is valid for a given base catalog pointer |
Module Contents#
- is_valid_catalog(pointer: str | pathlib.Path | upath.UPath, strict: bool = False, fail_fast: bool = False, verbose: bool = True) bool[source]#
Checks if a catalog is valid for a given base catalog pointer
- Parameters:
- pointerstr | Path | UPath
pointer to base catalog directory
- strictbool
should we perform additional checking that every optional file exists, and contains valid, consistent information. (Default value = False)
- fail_fastbool
if performing strict checks, should we return at the first failure, or continue and find all problems? (Default value = False)
- verbosebool
if performing strict checks, should we print out counts, progress, and approximate sky coverage? (Default value = True)
- Returns:
- bool
True if both the properties and partition_info files are valid, False otherwise
- is_valid_collection(pointer: str | pathlib.Path | upath.UPath, strict: bool = False, fail_fast: bool = False, verbose: bool = True) bool[source]#
Checks if a COLLECTION is valid for a given base catalog pointer
- Parameters:
- pointerstr | Path | UPath
pointer to base catalog collection directory
- strictbool
should we perform additional checking that every optional file exists, and contains valid, consistent information. (Default value = False)
- fail_fastbool
if performing strict checks, should we return at the first failure, or continue and find all problems? (Default value = False)
- verbosebool
if performing strict checks, should we print out counts, progress, and approximate sky coverage? (Default value = True)
- Returns:
- bool
True if the collection properties are valid, and all sub-catalogs pass validation.