-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate case dictionaries #424
Comments
I'd like to tackle this! Just so I understand correctly, is there somewhere that generates |
@AiredaleDev great! It's manually updated when new parameters are added/removed. You can find the "true" list of acceptable runtime parameters in the Keep in mind that:
A bit of extra context: When you call |
Currently, we have a file in the toolchain named toolchain/mfc/run/case_dicts.py that lists all the keys a case dictionary can have for each target. This is done by programmatically generating the lists on the fly. We need to do this because each target has its own set of inputs (keys) it accepts. If you specify one that it does not know about, it will fail to load the input data.
However, we do not check data-types. This can cause trouble when Fortran tries to read values from the
.inp
files we generate. Depending on the compiler, the error message can be very misleading, sometimes pointing to innocent lines in the.inp
files.To mitigate this issue, we could define a schema in Python for these case dictionaries and use them to validate the JSON we get from cases. There are a few libraries that do this. One of them is
jsonschema
. It might not be the most appropriate.There might be a better way of doing this (that does not require too much work) I cannot think of (perhaps with a larger-scoped change).
The text was updated successfully, but these errors were encountered: