Skip to content
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

add digest_algorithm option in writer #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ThomasLiennard
Copy link

Add new digest_algorithm option to WarcWriter and RecordBuilder to set digest hash algorithm to something other than sha1.

Add new digest_algorithm option to WarcWriter and RecordBuilder to set digest hash algorithm.
@codecov
Copy link

codecov bot commented Nov 3, 2020

Codecov Report

Merging #119 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #119   +/-   ##
=======================================
  Coverage   98.42%   98.42%           
=======================================
  Files          18       18           
  Lines        1650     1655    +5     
  Branches      265      266    +1     
=======================================
+ Hits         1624     1629    +5     
  Misses          6        6           
  Partials       20       20           
Impacted Files Coverage Δ
warcio/warcwriter.py 97.80% <ø> (ø)
warcio/recordbuilder.py 95.39% <100.00%> (+0.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa702cb...ec6d33d. Read the comment docs.

@Mr0grog
Copy link

Mr0grog commented Aug 22, 2023

This would be lovely to have! Given the notes about encoding in the annotated WARC 1.1 spec, it might be nice if it selected a different encoding (or let you specify an encoding) depending on the algorithm (e.g. base-32 encoding a sha-256 digest might get you a technically invalid header value, so base16 is better for that algorithm).

@wumpus
Copy link
Collaborator

wumpus commented Aug 28, 2023

Apologies for being so picky after such a long time, but here are some comments:

  • pullreqs should be made against the "develop" branch
  • the documentation needs to mention this new feature
  • this feature needs to work with all ways that warcio creates warcs, including capture_http()
  • what do you expect to happen with an invalid digest_algorithm name? You should document and test that so that the new interface will remain stable
  • you need to test that warcio check is happy with this digest (very likely, but still test it)
  • you have added some end-of-line whitespace; look at "git diff" to see it

@wumpus
Copy link
Collaborator

wumpus commented Aug 28, 2023

(If you are no longer interested in this PR I'm willing to fix these things)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants