IAMconsortium / nomenclature

A package to work with IAMC-style variable templates
https://nomenclature-iamc.readthedocs.io/
Apache License 2.0
19 stars 14 forks source link

Add warning-feature to DataValidator #426

Open danielhuppmann opened 1 week ago

danielhuppmann commented 1 week ago

As a next step for scenario validation and vetting, we need to extend the DataValidator class to enable showing a warning instead of raising an error.

My proposed implementation is the following:

Does that make sense, @phackstock?

dc-almeida commented 5 days ago

Clarification:

display the warning-list as a DataFrame

Any example of how this would look? And from what I understand, the fallback is always on raising the error if no warning level is specified.

danielhuppmann commented 5 days ago

Any example of how this would look?

I'd say as a first step, take the same as

https://github.com/IAMconsortium/nomenclature/blob/3a76cba2f5baf6c7f54be9d45d40c1a698738f6c/tests/test_validate_data.py#L108

but add a "warning-level" column.

And from what I understand, the fallback is always on raising the error if no warning level is specified.

Correct.