Validation¶
Validation class for ChemKED schema.
- class pyked.validation.OurValidator(*args, **kwargs)[source]¶
Custom validator with rules for Quantities and references.
- pyked.validation.compare_name(given_name, family_name, question_name)[source]¶
Compares a name in question to a specified name separated into given and family.
The name in question
question_namecan be of varying format, including “Kyle E. Niemeyer”, “Kyle Niemeyer”, “K. E. Niemeyer”, “KE Niemeyer”, and “K Niemeyer”. Other possibilities include names with hyphens such as “Chih-Jen Sung”, “C. J. Sung”, “C-J Sung”.Examples
>>> compare_name('Kyle', 'Niemeyer', 'Kyle E Niemeyer') True >>> compare_name('Chih-Jen', 'Sung', 'C-J Sung') True
- pyked.validation.row_uncertainty_kinds(metadata)[source]¶
The kinds of uncertainty that a profile’s metadata describes without giving a value.
A concentration profile row may end with an uncertainty of its own. The profile’s uncertainty metadata says what that last value is with the descriptive keys of one kind, such as
evaluated-standard-deviation-type, given without the value of that kind, which is in the rows instead. Without such keys the last value of a row is an absolute uncertainty in the units of the profile.
- pyked.validation.units = <pint.registry.UnitRegistry object>¶
Unit registry to contain the units used in PyKED