-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor multiple warning levels for same data validation filter (#461)
* Refactor multiple warning levels for same data validation filter * Coerce legacy format criteria into new DataValidatorCriteriaMultiple class * Stop validation after higher severity fail; update tests * Remove debugging print Co-authored-by: Daniel Huppmann <[email protected]> * Fix warning level skipping; add third variant to test * Apply suggested changes * Remove ErrorCollector --------- Co-authored-by: David Almeida <[email protected]> Co-authored-by: Daniel Huppmann <[email protected]>
- Loading branch information
1 parent
d5c355c
commit 6ec1e19
Showing
7 changed files
with
150 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
tests/data/validation/validate_data/validate_warning_joined.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
- variable: Primary Energy | ||
year: 2010 | ||
validation: | ||
- upper_bound: 5 | ||
lower_bound: 1 | ||
- warning_level: low | ||
upper_bound: 2.5 | ||
lower_bound: 1 | ||
- variable: Primary Energy|Coal | ||
year: 2010 | ||
upper_bound: 5 | ||
lower_bound: 1 |
12 changes: 12 additions & 0 deletions
12
tests/data/validation/validate_data/validate_warning_joined_asc.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
- variable: Primary Energy | ||
year: 2010 | ||
validation: | ||
- warning_level: low | ||
upper_bound: 2.5 | ||
lower_bound: 1 | ||
- upper_bound: 5 | ||
lower_bound: 1 | ||
- variable: Primary Energy|Coal | ||
year: 2010 | ||
upper_bound: 5 | ||
lower_bound: 1 |
6 changes: 3 additions & 3 deletions
6
...ation/validate_data/validate_warning.yaml → ...alidate_data/validate_warning_legacy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters