Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cove/cove_360/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
from libcove.lib.exceptions import CoveInputDataError

from lib360dataquality.cove.schema import Schema360, ExtensionsError
from lib360dataquality.cove.threesixtygiving import TEST_CLASSES, TestType
from lib360dataquality.cove.threesixtygiving import TEST_CLASSES
from lib360dataquality.additional_test import TestType
from lib360dataquality.cove.threesixtygiving import common_checks_360

from cove_360.models import SuppliedDataStatus
Expand Down
15 changes: 11 additions & 4 deletions tools/cove_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@

from lib360dataquality.cove.threesixtygiving import (
common_checks_360,
USEFULNESS_TEST_CLASS,
QUALITY_TEST_CLASS,
)
from lib360dataquality.additional_test import TestType
from lib360dataquality.cove.settings import COVE_CONFIG
from lib360dataquality.cove.schema import Schema360

Expand Down Expand Up @@ -78,11 +77,19 @@ def main():

if args.usefulness_only and not args.quality_only:
common_checks_360(
context, working_dir, data, schema, test_classes=[USEFULNESS_TEST_CLASS]
context,
working_dir,
data,
schema,
test_classes=[TestType.USEFULNESS_TEST_CLASS],
)
elif args.quality_only and not args.usefulness_only:
common_checks_360(
context, working_dir, data, schema, test_classes=[QUALITY_TEST_CLASS]
context,
working_dir,
data,
schema,
test_classes=[TestType.QUALITY_TEST_CLASS],
)
else:
common_checks_360(context, working_dir, data, schema)
Expand Down
8 changes: 4 additions & 4 deletions tools/extract_lib_messages.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from lib360dataquality.cove.threesixtygiving import (
TEST_CLASSES,
QUALITY_TEST_CLASS,
USEFULNESS_TEST_CLASS,
)

from lib360dataquality.additional_test import TestType


def run_check(check):
test = check(
Expand All @@ -23,11 +23,11 @@ def run_check(check):
def main():
"""Extract and print out the error messages from the different classes of additional checks"""
print("----------- Quality Tests ----------")
for check in TEST_CLASSES[QUALITY_TEST_CLASS]:
for check in TEST_CLASSES[TestType.QUALITY_TEST_CLASS]:
run_check(check)

print("----------- Usefulness Tests -------")
for check in TEST_CLASSES[USEFULNESS_TEST_CLASS]:
for check in TEST_CLASSES[TestType.USEFULNESS_TEST_CLASS]:
run_check(check)


Expand Down