OpenEnergyPlatform / omi

Repository for the Open Metadata Integration (OMI). For metadata definition see metadata repo:
https://github.com/OpenEnergyPlatform/metadata
GNU Affero General Public License v3.0
7 stars 4 forks source link

More Error messages needed #103

Open christian-rli opened 4 months ago

christian-rli commented 4 months ago

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

christian-rli commented 3 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.

henhuy commented 3 months ago

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):

henhuy commented 3 months ago

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

nesnoj commented 3 months ago

Great, big thanks for these efforts! (I guess this will also fix #40)