Skip to content

Commit

Permalink
Schema validations: reduce noise from unneeded logging messages (unic…
Browse files Browse the repository at this point in the history
  • Loading branch information
sven-oly authored Nov 5, 2024
1 parent 396128b commit afc6eb1
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion schema/check_generated_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def main(args):
if os.path.exists(test_data_path):
check_path = os.path.join(test_data_path, 'icu*')
icu_dirs = glob.glob(check_path)
logging.debug('ICU DIRECTORIES = %s', icu_dirs)
for dir_name in icu_dirs:
icu_versions.append(os.path.basename(dir_name))

Expand Down
1 change: 0 additions & 1 deletion schema/check_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def save_schema_validation_summary(self, validation_status):
failed_validations = []
passed_validations = []
for result in validation_status:
logging.debug(result)
if result['result']:
passed_validations.append(result)
else:
Expand Down
1 change: 0 additions & 1 deletion schema/check_test_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ def main(args):
passed_validations = []
schema_count = len(all_results)
for result in all_results:
logging.debug(result)
if result['result']:
passed_validations.append(result)
else:
Expand Down
11 changes: 2 additions & 9 deletions schema/schema_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def validate_json_file(self, schema_and_data_paths):
validate(data_to_check, schema)
# Everything worked!
result_data['result'] = True
except ValidationError as err:
except exceptions.ValidationError as err:
result_data['result'] = False
result_data['error'] = err
logging.error('ValidationError for test output %s and schema %s',
Expand Down Expand Up @@ -154,7 +154,6 @@ def validate_test_data_with_schema(self):
results = self.parallel_check_test_data_schema(schema_test_info)

for result_data in results:
logging.debug('test result data = %s', result_data)
if not result_data['data_file_name']:
# This is not an error but simply a test that wasn't run.
continue
Expand Down Expand Up @@ -192,7 +191,6 @@ def get_schema_data_info(self, icu_version, test_type):
'test_result_file': test_file_name
}
else:
# logging.warning('## get_schema_data_info. No file at test_file_name: %s', test_file_name);
return None

def check_test_data_against_schema(self, schema_info):
Expand Down Expand Up @@ -465,8 +463,6 @@ def main(args):

logging.info('Checking test outputs')
all_test_out_results = schema_validator.validate_test_output_with_schema()
for result in all_test_out_results:
logging.debug(' %s', result)

# Check all schema files for correctness.
schema_errors = schema_validator.check_schema_files()
Expand All @@ -477,13 +473,10 @@ def main(args):

logging.info('Checking generated data')
all_test_data_results = schema_validator.validate_test_data_with_schema()
for result in all_test_data_results:
logging.debug(' %s', result)

logging.info('Checking test outputs')
all_test_out_results = schema_validator.validate_test_output_with_schema()
for result in all_test_out_results:
logging.debug(' %s', result)

return


Expand Down

0 comments on commit afc6eb1

Please sign in to comment.