weldx.asdf.validators.wx_unit_validator#

weldx.asdf.validators.wx_unit_validator(validator, wx_unit, instance, schema)#

Custom validator for checking dimensions for objects with ‘unit’ property.

ASDF documentation: https://asdf.readthedocs.io/en/2.8.1/asdf/extensions.html#adding-custom-validators

Parameters
  • validator – A jsonschema.Validator instance.

  • wx_unit – Enable unit validation for this schema.

  • instance – Tree serialization (with default dtypes) of the instance

  • schema – Dict representing the full ASDF schema.

Yields

asdf.ValidationError

Return type

Iterator[ValidationError]