Open christian-rli opened 5 months ago
@henhuy I thought up a list of possible error types:
in the metadata:
I have provided a metadata string for each of the errors above in a separate branch. Maybe it's useful to you. I wasn't sure what a minimal metadata string had to include, so maybe they're unnecessarily big.
Checking against data:
I haven't created samples for these, because I saw that you had a test data table. So I would like use that for any error sample files.
Tried to implement metadata checks from above. Metadata files were VERY helpful, thx! Following findings ("x" means a test is included which checks for given issue):
wrong_key.json
will only throw error due to additional key "titel", but will not know that this is a typo)Checking against data:
- metadata don't match data structure
- missing column
- extra column
- wrong data type in a column (Warning or error?)
- duplicate or null values in ID column
Added tests for all cases. And: Wrong data type raises an error
Great, big thanks for these efforts! (I guess this will also fix #40)
OMI can benefit from useful error messages.
For example:
I would recommend creating a list of possible errors first and to then write useful messages and tests for them.
Also, maybe have a look a the license check performed on OEP (implemented by @jh-RLI ) and if it makes sense to put it into OMI or leave it there.
See #99