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
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
tardis.io.configuration.config_validator.validate_dict(config_dict, schemapath=PosixPath('/home/runner/work/tardis/tardis/tardis/io/configuration/schemas/base.yml'), validator=<class 'jsonschema.validators.create.<locals>.Validator'>)[source]
tardis.io.configuration.config_validator.validate_yaml(configpath, schemapath=PosixPath('/home/runner/work/tardis/tardis/tardis/io/configuration/schemas/base.yml'), validator=<class 'jsonschema.validators.create.<locals>.Validator'>)[source]