tardis.io.configuration.config_validator module¶
- tardis.io.configuration.config_validator.extend_with_default(validator_class)[source]¶
Extend a
jsonschema.IValidator
to also set default values on properties. By default jsonschema ignores default values.- Parameters:
- validator_class
The
jsonschema.IValidator
class to extend
- Returns:
- The extended
jsonschema.IValidator
- The extended
- tardis.io.configuration.config_validator.is_quantity(checker, instance)[source]¶
Check if the provided instance is of type astropy.units.quantity.Quantity
- Parameters:
- checker:
Object of
TypeChecker
. Passed by jsonschema internally.- instance:
The instance to be checked.
- Returns:
- bool: True if the instance is of type astropy.units.quantity.Quantity else False