Skip to content
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

Add warning-feature to DataValidator #426

Open
danielhuppmann opened this issue Nov 14, 2024 · 0 comments
Open

Add warning-feature to DataValidator #426

danielhuppmann opened this issue Nov 14, 2024 · 0 comments
Assignees

Comments

@danielhuppmann
Copy link
Member

danielhuppmann commented Nov 14, 2024

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:

  • Add a warning-level attribute to a validation-criteria item, which defaults to None, but can be set to e.g. "red", "yellow"

  • This will probably require an intermediate class DataValidationCriteria(IamcDataFilter) with the new attribute, and DataValidationCriteriaValue and ** DataValidationCriteriaBounds** inherit from that.

  • If the validation fails and the warning-level is not None, add the value to a warning-list in

    for item in self.criteria_items:

    instead of the error-list.

  • If the warning-list is not empty, display the warning-list as a DataFrame (after the error-list, but before raising the error).

Does that make sense, @phackstock?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants