hathi_validate package¶
Submodules¶
hathi_validate.configure_logging module¶
-
hathi_validate.configure_logging.configure_logger(debug_mode=False, log_file=None)¶
hathi_validate.process module¶
-
exception
hathi_validate.process.InvalidChecksum¶
-
exception
hathi_validate.process.ValidationError¶ Bases:
Exception
-
hathi_validate.process.calculate_md5(filename, chunk_size=8192)¶
-
hathi_validate.process.extracts_checksums(report)¶
-
hathi_validate.process.find_errors_marc(filename) → hathi_validate.result.ResultSummary¶ Validate the MARC file
Parameters: filename – Returns:
-
hathi_validate.process.find_errors_meta(filename, path, require_page_data=True)¶ Validate meta.yml file could also validate that the values are correct by comparing with the images
Parameters: filename – Yields: Error messages
-
hathi_validate.process.find_errors_ocr(path) → hathi_validate.result.ResultSummary¶ Validate all xml files located in the given path to make sure they are valid to the alto scheme
Parameters: path – Path to find the alto xml files Returns:
-
hathi_validate.process.find_extra_subdirectory(path) → hathi_validate.result.ResultSummary¶ Check path for any subdirectories
Parameters: path – Yields: Any subdirectory
-
hathi_validate.process.find_failing_checksums(path, report) → hathi_validate.result.ResultSummary¶ validate that the checksums in the .fil file match
Parameters: - path –
- report –
Returns: Error report
-
hathi_validate.process.find_missing_files(path: str) → hathi_validate.result.ResultSummary¶ check for expected files exist on the path
Parameters: path – Yields: Any files missing
-
hathi_validate.process.find_non_utf8_characters(file_path: str) → hathi_validate.result.ResultSummary¶
-
hathi_validate.process.is_same_hash(*hashes) → bool¶
-
hathi_validate.process.parse_checksum(line)¶
-
hathi_validate.process.parse_yaml(filename)¶
-
hathi_validate.process.process_directory(path: str, require_page_data=True)¶
-
hathi_validate.process.run_validation(validation_test: hathi_validate.validator.absValidator)¶
-
hathi_validate.process.run_validations(validators: List[hathi_validate.validator.absValidator])¶