stairval package
Stairval is a framework for validating hierarchical data structures.
- class stairval.Auditor[source]
Bases:
Generic
[ITEM
]Auditor checks the inputs for sanity issues and relates the issues with sanitized inputs as
SanitationResults
.The auditor may sanitize the input as a matter of discretion and returns the input as OUT.
- class stairval.Issue(level: Level, message: str, solution: str | None = None)[source]
Bases:
object
Issue summarizes an issue found in the input data.
The issue has a
level
, amessage
with human-friendly description, and an optionalsolution
for addressing the issue.
- class stairval.Level(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum
An enum to represent severity of the
DataSanityIssue
.- WARN = 1
Warning is an issue when something not entirely right. However, unlike
Level.ERROR
, the analysis should complete albeit with sub-optimal results 😧.
- ERROR = 2
Error is a serious issue in the input data and the downstream analysis may not complete or the analysis results may be malarkey 😱.