input4mips_validation.validation#
| Sub-package | Description |
|---|---|
| Conventions | Validation of the Conventions attribute |
| allowed_characters | Support for defining rules around the characters allowed in metadata |
| cf_checker | Validation with the cf-checker |
| comment | Validation of the comment attribute |
| creation_date | Validation of the creation_date attribute |
| database | Database validation |
| datasets_to_write_to_disk | Validation of datasets that we are writing to disk |
| Validation of emails | |
| error_catching | Tools for catching errors in validation without stopping |
| exceptions | Exceptions related to validation that don't obviously fit elsewhere |
| external_variables | Validation of the external_variables attribute |
| file | Validation of an individual file in isolation |
| frequency | Validation of the frequency attribute |
| orcid | Validation of ORCID's |
| regexp | Validation of values against regular expressions |
| tracking_id | Validation of the tracking_id attribute |
| tree | Validation of a tree of files |
| variable_id | Validation of the variable_id attribute |
input4mips_validation.validation
#
Validation module
InvalidFileError
#
Bases: ValueError
Raised when a file does not pass all of the validation
Source code in src/input4mips_validation/validation/exceptions.py
__init__(filepath, error_container)
#
Initialise the error
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
Path | str
|
The filepath we tried to validate |
required |
error_container
|
list[tuple[str, Exception]]
|
The thing which was being done and the error which was caught while validating the file. |
required |
Source code in src/input4mips_validation/validation/exceptions.py
InvalidTreeError
#
Bases: ValueError
Raised when a tree does not pass all of the validation
Source code in src/input4mips_validation/validation/exceptions.py
__init__(root, error_container)
#
Initialise the error
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
Path | str
|
The root of the tree we tried to validate |
required |
error_container
|
list[tuple[str, Exception]]
|
The thing which was being done and the error which was caught while validating the file. |
required |