-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
NOT READY: warcio test #66
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #66 +/- ##
==========================================
Coverage ? 96.19%
==========================================
Files ? 19
Lines ? 2078
Branches ? 390
==========================================
Hits ? 1999
Misses ? 36
Partials ? 43
Continue to review full report at Codecov.
|
@N0taN3rd traditionally you've been my best reviewer :-) |
@@ -55,7 +55,7 @@ class ArcWarcRecordLoader(object): | |||
NON_HTTP_SCHEMES = ('dns:', 'whois:', 'ntp:') | |||
HTTP_SCHEMES = ('http:', 'https:') | |||
|
|||
def __init__(self, verify_http=True, arc2warc=True): | |||
def __init__(self, verify_http=True, arc2warc=True, fixup_bugs=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the spirit of how digest checking is handled by ArchiveIterator
, fixup_bugs=True
should probably default to False
warcio/warcio/archiveiterator.py
Line 46 in 759ab07
check_digests=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing code did the bug fixup unconditionally, I'm preserving that default.
digest checking defaults off because it's expensive and @ikreymer prefers people remain in the dark as to how many invalid warcs there are :-)
@@ -43,12 +43,13 @@ class ArchiveIterator(six.Iterator): | |||
def __init__(self, fileobj, no_record_parse=False, | |||
verify_http=False, arc2warc=False, | |||
ensure_http_headers=False, block_size=BUFF_SIZE, | |||
check_digests=False): | |||
check_digests=False, fixup_bugs=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixup_bugs=True
-> fixup_bugs=False
in the spirit of check_digests=False
@N0taN3rd has done a preliminary review, the main addition since then is some global checks. At this point I think the code is feature-complete, well, for the things I'm planning for the first pass, and the main work remaining is coverage. |
An opinionated WARC standards-conformance tool.
Ready for review - I have yet to work on test coverage.