input4mips_validation.validation.cf_checker#
input4mips_validation.validation.cf_checker
#
Validation with the cf-checker
check_with_cf_checker(filepath, ds, no_raise_if_only_warnings=False, conventions_attribute='Conventions')
#
Check a file with the cf-checker
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
Path | str
|
Filepath to check |
required |
ds
|
Dataset
|
Dataset that corresponds to This is required to we can tell cf-checker which CF conventions to use while checking the file. |
required |
no_raise_if_only_warnings
|
bool
|
If |
False
|
conventions_attribute
|
str
|
The attribute which contains the conventions information used by cf-checker. We provide this as an argument just in case, it is very unlikely that you will want to change this. |
'Conventions'
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If If |
Source code in src/input4mips_validation/validation/cf_checker.py
only_cf_checker_warnings_raised(cf_checker_output)
#
Determine if the CF-checker only raised warnings
This is extremely sensitive to the implementation of the cf-checker, particularly its error reporting (status of error reporting at last check).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cf_checker_output
|
str
|
CF-checker output to parse |
required |
Returns:
| Type | Description |
|---|---|
bool
|
|