From f318c6920b5d6577013f552807caa6bf212d4834 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Tue, 27 May 2025 18:11:46 +0100 Subject: [PATCH 1/2] lib360dataquality: Make sure we don't run all test types if specified If test_classes has been set as an empty array the code will evaluate to false, whereas the intended behaviour was to not run all the test types. --- lib360dataquality/cove/threesixtygiving.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib360dataquality/cove/threesixtygiving.py b/lib360dataquality/cove/threesixtygiving.py index db57470..ebda2e3 100644 --- a/lib360dataquality/cove/threesixtygiving.py +++ b/lib360dataquality/cove/threesixtygiving.py @@ -368,7 +368,7 @@ def common_checks_360( upload_dir: directory file exists in if non-json file_type, also used to store validation errors json json_data: { grants: [,,] } schema_obj: See lib360dataQuality/cove/schema.py for Schema360 - tests: array of test functions to run. Defaults to all available. + test_classes: array of test functions to run. Defaults to all available if None. """ schema_name = schema_obj.pkg_schema_name @@ -378,7 +378,7 @@ def common_checks_360( cell_source_map = common_checks["cell_source_map"] # If no particular test classes are supplied then run all defined here - if not test_classes: + if test_classes is None: test_classes = [TestType.QUALITY_TEST_CLASS, TestType.USEFULNESS_TEST_CLASS] if context["file_type"] == "xlsx": From ec33cb30277330cc9976816ae57d3d96d4839a99 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Wed, 28 May 2025 16:33:17 +0100 Subject: [PATCH 2/2] tools: cove_checks: Update the common_checks_360 arguments for new dqt --- tools/cove_checks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/cove_checks.py b/tools/cove_checks.py index ebfff44..e96ac96 100755 --- a/tools/cove_checks.py +++ b/tools/cove_checks.py @@ -66,7 +66,8 @@ def main(): file_path, file_type, lib_cove_config, - schema.schema_url, + schema.schema_file, + schema.pkg_schema_file ) ) with open(context["converted_path"], "r") as fp_data: