Skip to content

Conversation

@bmaranville
Copy link
Contributor

In addition to timestamp, it would be nice for reproducibility if we could specify a hash of the file contents for File objects, which are used in the Measurement class.

Copy link
Contributor

@arm61 arm61 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a good feature to me.

@aglavic
Copy link
Collaborator

aglavic commented Feb 22, 2023

I think it's a good idea.

Some suggestions/comments:

  1. Add a test for the new class.
  2. Hashes are, by default, binary strings. How would we deal with that? Is it compatible with YAML? (Or did you plan to use the hexdigest representation, in which case the attribute should maybe be renamed.)
  3. Add a convenience method in the ContentHash class to check a string against the given hash digest.
  4. Add a convenience class mathod to ContentHash create the object from the test string automatically.

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.

4 participants