-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d9ad1bc
commit 02373ca
Showing
21 changed files
with
283 additions
and
192 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
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
11 changes: 8 additions & 3 deletions
11
soda-core/src/soda_core/contracts/impl/check_types/invalidity_check_yaml.py
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 |
---|---|---|
@@ -1,25 +1,30 @@ | ||
from __future__ import annotations | ||
|
||
from soda_core.common.logs import Logs | ||
from soda_core.common.yaml import YamlObject | ||
from soda_core.contracts.impl.contract_yaml import CheckYaml, ColumnYaml, CheckYamlParser, MissingAncValidityCheckYaml | ||
|
||
|
||
class InvalidCheckYamlParser(CheckYamlParser): | ||
|
||
def get_check_type_names(self) -> list[str]: | ||
return ['invalid_count', 'invalid_percent'] | ||
return ['invalid'] | ||
|
||
def parse_check_yaml( | ||
self, | ||
check_type_name: str, | ||
check_yaml_object: YamlObject, | ||
column_yaml: ColumnYaml | None, | ||
logs: Logs | ||
) -> CheckYaml | None: | ||
return InvalidCheckYaml( | ||
type_name=check_type_name, | ||
check_yaml_object=check_yaml_object, | ||
logs=logs | ||
) | ||
|
||
|
||
class InvalidCheckYaml(MissingAncValidityCheckYaml): | ||
|
||
def __init__(self, check_yaml_object: YamlObject): | ||
super().__init__(check_yaml_object) | ||
def __init__(self, type_name: str, check_yaml_object: YamlObject, logs: Logs): | ||
super().__init__(type_name=type_name, check_yaml_object=check_yaml_object, logs=logs) |
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
11 changes: 8 additions & 3 deletions
11
soda-core/src/soda_core/contracts/impl/check_types/missing_check_yaml.py
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 |
---|---|---|
@@ -1,27 +1,32 @@ | ||
from __future__ import annotations | ||
|
||
from typing import Optional | ||
|
||
from soda_core.common.logs import Logs | ||
from soda_core.common.yaml import YamlObject | ||
from soda_core.contracts.impl.contract_yaml import CheckYaml, ColumnYaml, CheckYamlParser, MissingAncValidityCheckYaml | ||
|
||
|
||
class MissingCheckYamlParser(CheckYamlParser): | ||
|
||
def get_check_type_names(self) -> list[str]: | ||
return ['missing_count', 'missing_percent'] | ||
return ['missing'] | ||
|
||
def parse_check_yaml( | ||
self, | ||
check_type_name: str, | ||
check_yaml_object: YamlObject, | ||
column_yaml: ColumnYaml | None, | ||
logs: Logs | ||
) -> CheckYaml | None: | ||
return MissingCheckYaml( | ||
type_name=check_type_name, | ||
check_yaml_object=check_yaml_object, | ||
logs=logs | ||
) | ||
|
||
|
||
class MissingCheckYaml(MissingAncValidityCheckYaml): | ||
|
||
def __init__(self, type_name: str, check_yaml_object: YamlObject): | ||
super().__init__(type_name=type_name, check_yaml_object=check_yaml_object) | ||
def __init__(self, type_name: str, check_yaml_object: YamlObject, logs: Logs): | ||
super().__init__(type_name=type_name, check_yaml_object=check_yaml_object, logs=logs) |
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
Oops, something went wrong.