module

avl.verify

Functions for data verification

Functions
  • check_global_attrs(ds) (list of (str, str)) Return a list of issues related to global attributes</>
  • check_time_coord(ds) (list of (str, str)) Return a list of issues related to time co-ordinates</>
  • check_xy_coords(ds) (list of (str, str)) Return a list of issues related to x/y co-ordinates</>
  • get_rules() (list of callable(Dataset: list of (str, str))) Get verification rules</>
  • make_report(dataset_list_path) (str) Make dataset verification report</>
  • verify_dataset(dataset, level, open_params) (list of (str, str)) Verifies that given dataset complies to the AVL dataset conventions.</>
function

avl.verify.verify_dataset(dataset, level='ERROR', open_params=None)

Verifies that given dataset complies to the AVL dataset conventions.

Parameters
  • dataset (str, Mapping, or Dataset) The dataset. May be an xarray.Dataset, a path, or a Zarr store.
  • level (str, optional) Either "ERROR" (only errors) or "WARNING" (errors and warnings).
  • open_params (dict(str: any), optional) Optional open parameters, ignored if dataset is an xarray.Dataset.
Returns (list of (str, str))

A list of issues. Each issue is a 2-tuple comprising an issue severity level ("WARNING" or "ERROR") and the issue message. An empty list indicates a 100%-compliance.

function

avl.verify.make_report(dataset_list_path)

Make dataset verification report

Parameters
  • dataset_list_path (str) path to a text file containing a list of dataset
Returns (str)

A string containing Markdown source for a table summarizing verification results for the files listed in the input file

function

avl.verify.get_rules()

Get verification rules

Returns (list of callable(Dataset: list of (str, str)))

A list containing all the rules used for verification

function

avl.verify.check_global_attrs(ds)

Return a list of issues related to global attributes

Parameters
  • ds (Dataset) a dataset to check
Returns (list of (str, str))

a list of issues related to global attributes

function

avl.verify.check_time_coord(ds)

Return a list of issues related to time co-ordinates

Parameters
  • ds (Dataset) a dataset to check
Returns (list of (str, str))

a list of issues related to time co-ordinates

function

avl.verify.check_xy_coords(ds)

Return a list of issues related to x/y co-ordinates

Parameters
  • ds (Dataset) a dataset to check
Returns (list of (str, str))

a list of issues related to x/y co-ordinates