Module trase.tools.data_release_package.validate.validators
Validation functions for a data release package, split by concern.
How to add a new validation:
Define a function whose name starts with validate_ in one of the modules in this
package. It must accept a single pathlib.Path argument – the local package folder
being validated – and return an iterator of error message strings, yielding nothing
if there are no issues. It is automatically discovered by cli.get_all_validation_functions.
Example
def validate_something(package_dir: Path) -> Iterator[str]: if problem_found: yield "Description of the issue"
If the validation reads the actual data from S3 rather than just the local package
folder, mark it with @accesses_s3 from trase.tools.data_release_package.validate.markers.
Marked validations are left out by --skip-s3, which is what the test suite uses so
that tests never touch the network.
Sub-modules
trase.tools.data_release_package.validate.validators.data-
Validates the data behind the
*.data.txtpointers … trase.tools.data_release_package.validate.validators.documentation-
Validates the
documentation/folder. trase.tools.data_release_package.validate.validators.metadata-
Validates the
metadata/*.jsonfiles. trase.tools.data_release_package.validate.validators.pointers-
Validates
*.data.txtpointer files … trase.tools.data_release_package.validate.validators.structure-
Validates the top-level file/folder layout of a data release package.