Validate YAML schema and format in parameter files #911
Labels
enhancement
Enhancing an existing feature of adding a new one
yaml default parameters
Anything related to the YAML configuration files for default parameters
Description
The modules use a
.yaml
file to define its parameters - however their format and schema are not validated on loading.So it's possible to add repeated parameters or parameters missing specific fields.
Since the schema is not validated, you will only observe errors at runtime, in a specific module, in a specific condition.
Describe the solution you'd like
libio.read_from_yaml
should be refactored to do a schema/format validation;haddock3/src/haddock/libs/libio.py
Line 87 in 48f59fb
Additional context
There is no built-in python way of doing this faik, but there are several third-party librares for this such as
pydantic-yaml
andstrictyaml
The text was updated successfully, but these errors were encountered: