validate parameters through pydantic
adresses #457 (closed)
changes are quite vastly spread. Basically:
modifies lib.types:
- adds
ValidatePublicMembersclass- its mixed into all the flagging function-mixins and ensures all flagging methods are decorated with the
qcMethodSignaturedecorator (that triggers pydantic type checking based on assigned typehints)
- its mixed into all the flagging function-mixins and ensures all flagging methods are decorated with the
- adds comparative types
IntandFloat, that can instantiate constrained typehints through comparative syntax-
Int > 0(integer greater zero),Float[0,1](float in [0,1] interval.),Float <= 10(float smaller or equal 10)
-
- adds additional types (pydantic basemodels) for common constructs like frequency strings:
-
FreqStr,OffsetStr,OffsetLike,ArrayLike,SaQC, ...
-
- adds context aware types for qc functions (checked against signature context):
-
SaQCField,NewSaQCField
-
modifies funcs.*
- modifies all the qc functions signatures with pydantic aligned type hinting
- removes prior, functional validation framework (
validate_window,validate_offset,...)
Edited by Peter Lünenschloß