You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If user puts empty entries in the stratigraphy in global_variables, e.g.:
MyFormation:
stratigraphic: Truename: My Fm. Topalias:
- MyFormation
- OtherAlias
- # <-- PROBLEM!stratigraphic_alias:
- Some GP. Top
- SomeOther GP. Base
- # <-- PROBLEM!
---> This will currently export with null in outgoing metadata. In validation, it is expected to be string hence not validated. Tricky to debug. fmu-dataio should catch this and either warn or ignore or both.
Partial (?) solution in #386. However, does not ignore them - just warns.
A reflection: The whole validation of the config should probably be improved. This seems like a task for jsonschema or Pydantic or similar, and do proper validation of the config.
I tried jsonschema, but abandoned it for two reason:
The nature of the "stratigraphy" block, with the custom keys, is not ideal for jsonschema
The error messages coming out of json schema are too sparse to be informative to end user. E.g. if an empty entry is detected, it will not validate with a message that looks something like: "null is not a string".
Instead of validating the whole config in one go, we can create schemas for each entry, and check them one-by-one. That will enable us to add more meaningful information to the error messages.
If user puts empty entries in the stratigraphy in
global_variables
, e.g.:---> This will currently export with
null
in outgoing metadata. In validation, it is expected to bestring
hence not validated. Tricky to debug.fmu-dataio
should catch this and either warn or ignore or both.Originally posted by @perolavsvendsen in #373 (comment)
Suggested solution:
The text was updated successfully, but these errors were encountered: