-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX - EPUB validation module based on W3C's EPUBCheck #543
Merged
Conversation
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
Added EPUB module to jhove-ext-modules. This uses the EPUBcheck library, with a new MasterReport implementation for EPUBcheck that focuses on collecting and exploring relevant data for JHOVE RepInfo data. Tests included.
Signature check defaults to valid=true. The signature check doesn't do anything to check validity of a file. This overrides the `checkSignature()` method to make `valid=UNDETERMINED` by default in all cases.
Fixed most issues based on this: https://app.codacy.com/app/openpreserve/jhove/pullRequest?prid=3805655
- E-PUB module test baseline update added to `jhove-bbt/scripts/create-1.23-target.sh`; - simplified test process and added more explicit logging; - fixed small `shellcheck` lint warnings, particularly error prone directory cycling; - added comments to disable `shellcheck` inclusion warning; and - removed `bin/.gitignore` generated by Eclipse.
- replaced `ArrayList` with `TreeSet` for elements testing suggested order mattered; - helper method to avoid null Property values been added to sets; - dedicated `Comparator` implementations for `Message` and `Property`; and - added example and error files for E-PUB module testing.
…encies Inconsistencies were found in how these lists were formed and this opened the door to confusing reports. Removing the distinction between local and remote to match original EPUBCheck module.
Codecov Report
@@ Coverage Diff @@
## integration #543 +/- ##
================================================
+ Coverage 49.44% 49.65% +0.2%
- Complexity 984 992 +8
================================================
Files 56 56
Lines 7768 7768
Branches 1409 1409
================================================
+ Hits 3841 3857 +16
+ Misses 3457 3445 -12
+ Partials 470 466 -4
Continue to review full report at Codecov.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change is to add the
EPUB-ptc
extension module version 1.0. The module wraps the W3C EPUBCheck validation tool as a JHOVE module.Some notes in advance of full documentation:
checkSignatures()
method is based on the Library of Congress EPUB2and EPUB3 documentation. For thisvalid
is always set toUNDETERMINED
. This check only looks at "magic numbers" and file extension. If the signature matches, it sets "well formed" to true. Note that it does not perform the additional package checks that contribute to "well formed"-ness inparse()
so there is a small inconsistency there.(severity="FATAL") or (severity="ERROR" and message-id begins with "PKG-")
. In other words, fatal errors and package errors make the file "Not well formed".severity="ERROR"
.Includes #460 contributed by @karenhanson