validate_file_using_schema#
Validate a file or files in a directory using a schema.
Input files can be metadata, schema, or data files in yaml, json, or ecsv format.
Command line arguments#
- file_name (str)
input file to be validated
- model_parameters_directory (str)
directory with json files of model parameters to be validated
- schema (str)
schema file (jsonschema format) used for validation
- data_type (str)
type of input data (allowed types: metadata, schema, data)
Raises#
- FileNotFoundError
if file to be validated is not found
Example#
simtools-validate-file-using-schema \\
--file_name tests/resources/MLTdata-preproduction.meta.yml \\
--schema simtools/schemas/metadata.metaschema.yml \\
--data_type metadata