CheckResult#

class pymovements.CheckResult(code: str, severity: str, message: str, sources: list[str] = <factory>)[source]#

Result of a single validation check.

code#

Short identifier, e.g. 'trial_columns_exist'.

Type:

str

severity#

One of 'pass', 'warning', 'fail', or 'error'. See the notes section for the semantics of each class.

Type:

str

message#

Human-readable description of the outcome.

Type:

str

sources#

File paths of source files that were checked.

Type:

list[str]

Notes

On the meaning of each severity class:

  • 'pass': the check ran and the data satisfied the criterion

  • 'fail': the check ran but the data did not satisfy a required criterion

  • 'warning': the check ran but the data did not satisfy a warning-level criterion

  • 'error': a precondition for the check was not met so the check could not be performed.

Examples

>>> from pymovements import CheckResult
>>> r = CheckResult('time_column_exists', 'pass', 'OK')
>>> r.severity
'pass'

Methods

__init__(code, severity, message, sources)