adios_db.models.oil.validation package
- adios_db.models.oil.validation.is_not_iso_or_year(datestr)
- adios_db.models.oil.validation.is_only_ignored(status)
Check if all the status codes are ones that are on the ignored list
expects a dict of teh form returned by unpack_status
- adios_db.models.oil.validation.unpack_status(status)
unpacks the status messages into list of tuples
(error_code, message
Submodules
adios_db.models.oil.validation.errors module
adios_db.models.oil.validation.validate module
Validation of a single oil record
The actual validation is done in the Oil object (and sub-objects)
This just provides some convenient wrappers around the validate call
- adios_db.models.oil.validation.validate.validate(oil)
validate an Oil object
oil.status is updated in place – this is simply a wrapper around Oil.reset_validation() – probably no longer needed
- adios_db.models.oil.validation.validate.validate_json(oil_json)
validate a json-compatible-python record
An Oil object is returned, if it’s possible to do so.
The “status” field is updated in place, with no other alterations of the record
- Comment: the E010 error is redundant. We could easily get by with just
the validate() function.
adios_db.models.oil.validation.warnings module
warnings.py
All the warnings